This is an automated email from the ASF dual-hosted git repository.
engelen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git
The following commit(s) were added to refs/heads/main by this push:
new d98942dd3b chore: drop custom `+~` version switching (#1324)
d98942dd3b is described below
commit d98942dd3b021874ac324464f3fd788f9be046df
Author: Arnout Engelen <[email protected]>
AuthorDate: Mon May 13 10:56:26 2024 +0200
chore: drop custom `+~` version switching (#1324)
as this feature is in sbt since https://github.com/sbt/sbt/pull/6894
and https://github.com/sbt/sbt/pull/6936
---
.github/workflows/nightly-1.0-builds.yml | 4 ++--
.github/workflows/nightly-builds.yml | 4 ++--
.github/workflows/scala3-build.yml | 2 +-
.github/workflows/scala3-compile.yml | 2 +-
project/PekkoBuild.scala | 27 ---------------------------
5 files changed, 6 insertions(+), 33 deletions(-)
diff --git a/.github/workflows/nightly-1.0-builds.yml
b/.github/workflows/nightly-1.0-builds.yml
index 10c40701cb..7fcd1c88af 100644
--- a/.github/workflows/nightly-1.0-builds.yml
+++ b/.github/workflows/nightly-1.0-builds.yml
@@ -108,7 +108,7 @@ jobs:
# No need to specify the full Scala version. Only the Scala
# binary version is required and Pekko build will set the right
# full version from it.
- scalaVersion: ["2.12", "2.13", "3.3"]
+ scalaVersion: ["2.12.x", "2.13.x", "3.3.x"]
javaVersion: [8, 11, 17, 21]
steps:
- name: Checkout
@@ -142,4 +142,4 @@ jobs:
-Dpekko.actor.testkit.typed.timefactor=2 \
-Dpekko.test.tags.exclude=gh-exclude,timing \
-Dpekko.test.multi-in-test=false \
- clean "+~ ${{ matrix.scalaVersion }} test" checkTestsHaveRun
+ clean "++ ${{ matrix.scalaVersion }} test" checkTestsHaveRun
diff --git a/.github/workflows/nightly-builds.yml
b/.github/workflows/nightly-builds.yml
index 738bb3eec3..4677289826 100644
--- a/.github/workflows/nightly-builds.yml
+++ b/.github/workflows/nightly-builds.yml
@@ -116,7 +116,7 @@ jobs:
# No need to specify the full Scala version. Only the Scala
# binary version is required and Pekko build will set the right
# full version from it.
- scalaVersion: ["2.12", "2.13", "3.3"]
+ scalaVersion: ["2.12.x", "2.13.x", "3.3.x"]
javaVersion: [8, 11, 17, 21]
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
@@ -152,7 +152,7 @@ jobs:
-Dpekko.actor.testkit.typed.timefactor=2 \
-Dpekko.test.tags.exclude=gh-exclude,timing \
-Dpekko.test.multi-in-test=false \
- clean "+~ ${{ matrix.scalaVersion }} test" checkTestsHaveRun
+ clean "++ ${{ matrix.scalaVersion }} test" checkTestsHaveRun
# comment out test report until an apache or GitHub published action
(action-surefire-report) can be found or added allowlist from INFRA
# - name: Test Reports
diff --git a/.github/workflows/scala3-build.yml
b/.github/workflows/scala3-build.yml
index 68826baadd..bb9e8850ae 100644
--- a/.github/workflows/scala3-build.yml
+++ b/.github/workflows/scala3-build.yml
@@ -66,7 +66,7 @@ jobs:
-Dmultinode.Xms256M \
-Dmultinode.Xmx256M \
-Dmultinode.XX:+AlwaysActAsServerClassMachine \
- "+~ 3 ${{ matrix.command }}"
+ "++ 3.x ${{ matrix.command }}"
# comment out email actions until we have an email address to use (and
we need to get INFRA to whitelist dawidd6/action-send-mail)
#- name: Email on failure
diff --git a/.github/workflows/scala3-compile.yml
b/.github/workflows/scala3-compile.yml
index 49c36a3026..c4e5df0b2d 100644
--- a/.github/workflows/scala3-compile.yml
+++ b/.github/workflows/scala3-compile.yml
@@ -54,4 +54,4 @@ jobs:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
run: |
sbt \
- "+~ 3 ${{ matrix.command }}"
+ "++ 3.x ${{ matrix.command }}"
diff --git a/project/PekkoBuild.scala b/project/PekkoBuild.scala
index 75938f9220..820ec8ad27 100644
--- a/project/PekkoBuild.scala
+++ b/project/PekkoBuild.scala
@@ -39,7 +39,6 @@ object PekkoBuild {
val parallelExecutionByDefault = false // TODO: enable this once we're sure
it does not break things
lazy val rootSettings = Def.settings(
- commands += switchVersion,
UnidocRoot.pekkoSettings,
Protobuf.settings,
GlobalScope / parallelExecution := System
@@ -346,30 +345,4 @@ object PekkoBuild {
}
def majorMinor(version: String): Option[String] =
"""\d+\.\d+""".r.findFirstIn(version)
-
- // So we can `sbt "+~ 3 clean compile"`
- //
- // The advantage over `++` is twofold:
- // * `++` also requires the patch version, `+~` finds the first supported
Scala version that matches the prefix (if any)
- // * When subprojects need to be excluded, ++ needs to be specified for each
command
- //
- // So the `++` equivalent of the above example is `sbt "++ 3.1.2 clean" "++
3.1.2 compile"`
- val switchVersion: Command = Command.args("+~", "<version> <args>") {
(initialState: State, args: Seq[String]) =>
- {
- val requestedVersionPrefix = args.head
- val requestedVersion =
Dependencies.allScalaVersions.filter(_.startsWith(requestedVersionPrefix)).head
-
- def run(state: State, command: String): State = {
- val parsed = s"++ $requestedVersion
$command".foldLeft(Cross.switchVersion.parser(state))((p, i) => p.derive(i))
- parsed.resultEmpty match {
- case e: sbt.internal.util.complete.Parser.Failure =>
- throw new IllegalStateException(e.errors.mkString(", "))
- case sbt.internal.util.complete.Parser.Value(v) =>
- v()
- }
- }
- val commands = args.tail
- commands.foldLeft(initialState)(run)
- }
- }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]