This is an automated email from the ASF dual-hosted git repository.
pjfanning pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-grpc.git
The following commit(s) were added to refs/heads/main by this push:
new 922fbb53 Update scala-library to 3.9.0 (#881)
922fbb53 is described below
commit 922fbb536b8cb3a8dcbbb1af5f1cad6786b595d2
Author: Scala Steward <[email protected]>
AuthorDate: Fri Sep 4 21:34:50 2026 +0200
Update scala-library to 3.9.0 (#881)
* Update scala-library to 3.9.0
* fix
* Drop stray $ from PekkoHttpServerProviderJava test object name
Motivation:
Scala 3.9.0 added syntax warning E230, which flags identifiers containing
`$` as reserved for internal compiler use. The interop-tests test sources
are compiled with `-Werror`, so `object PekkoHttpServerProviderJava$` turns
that warning into a build failure.
The trailing `$` is not intentional. It is a leftover from the Akka to
Pekko rename in 7ad0b5d6; the equivalent object in the sbt scripted test
copy of this spec is named `PekkoHttpServerProviderJava` with no `$`.
Modification:
Rename the object to `PekkoHttpServerProviderJava` and update its single
reference in `Servers.Pekko.Java`.
Result:
interop-tests test sources compile under Scala 3.9.0 with `-Werror`.
Tests:
- sbt -batch "++3.9.0!" Test/compile - success
References:
Refs #883
* Keep the sbt 2.x plugin on the Scala version sbt itself is built with
Motivation:
Bumping scala3Next to 3.9.0 broke the `sbt scripted tests (scala3, next)`
job. scala3Next was doing two unrelated jobs at once: it is the newest
Scala 3 release the library is compiled and tested against, and it is also
the Scala version the sbt 2.x plugin is cross-built with.
The second is not ours to choose. sbt uses its own Scala compiler to
compile build.sbt, and every sbt 2.x release to date, up to and including
2.0.8, depends on scala3-library_3 3.8.4. A plugin built with 3.9.0 emits
TASTy 28.9, which that compiler cannot read, so loading any build that
uses the plugin fails:
value autoImport is not a member of object
org.apache.pekko.grpc.sbt.PekkoGrpcPlugin
error while loading IArray$package,
TASTy file scala/IArray$package.tasty could not be read, failing with:
Forward incompatible TASTy file has version 28.9, produced by
Scala 3.9.0-bin-nonbootstrapped, expected stable TASTy from
28.0 to 28.8.
Modification:
Split the two roles apart. Add Versions.scala3ForSbtPlugin, pinned to the
Scala version sbt 2.x is built with, and use it in CrossScalaForSbtPlugin.
scala3Next stays free to track the newest Scala 3 release.
Add a `sbt-plugin-scala3` case to resolve-scala-version.sh and point the
`scala3` scripted matrix entry at it, so the scripted job builds the plugin
with a version sbt can load.
The scripted test projects still receive scala3Next through
-Dpekko.grpc.scala3.next.version, so their generated sources are still
compiled with the newest Scala 3 - which is the part of that job worth
testing. Publishing is unaffected: `+publish` picks up the cross version
from CrossScalaForSbtPlugin.
Result:
The sbt plugin is loadable by sbt 2.x again, and scala3Next can be bumped
independently of sbt's release cadence.
Tests:
- sbt -batch "++3.9.0!" Test/compile - success
- bash .github/scripts/resolve-scala-version.sh sbt-plugin-scala3 - 3.8.4
- bash .github/scripts/resolve-scala-version.sh next - 3.9.0
- sbt "sbt-plugin/scripted scala3/*" - not run locally, relying on CI
References:
Refs #881
---------
Co-authored-by: PJ Fanning <[email protected]>
---
.github/scripts/resolve-scala-version.sh | 3 +++
.github/workflows/build-test.yml | 4 ++--
build.sbt | 2 +-
.../scala/org/apache/pekko/grpc/interop/GrpcInteropSpec.scala | 4 ++--
project/Dependencies.scala | 9 +++++++--
5 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/.github/scripts/resolve-scala-version.sh
b/.github/scripts/resolve-scala-version.sh
index d2846cd3..2707015e 100644
--- a/.github/scripts/resolve-scala-version.sh
+++ b/.github/scripts/resolve-scala-version.sh
@@ -45,6 +45,9 @@ case "$scala_version" in
next)
resolve_from_build 's/.*val scala3Next = "\(.*\)".*/\1/p'
;;
+ sbt-plugin-scala3)
+ resolve_from_build 's/.*val scala3ForSbtPlugin = "\(.*\)".*/\1/p'
+ ;;
*)
printf '%s\n' "$scala_version"
;;
diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml
index 4b03e635..1a3dbff5 100644
--- a/.github/workflows/build-test.yml
+++ b/.github/workflows/build-test.yml
@@ -127,7 +127,7 @@ jobs:
- test-set: gen-scala-server
scala-version: 2.13
- test-set: scala3
- scala-version: next
+ scala-version: sbt-plugin-scala3
- test-set: gen-java
scala-version: 2.13
steps:
@@ -159,7 +159,7 @@ jobs:
- name: Scripted ${{ matrix.test-set }}
run: |-
cp .jvmopts-ci .jvmopts
- if [ "${{ matrix.scala-version }}" = "next" ]; then
+ if [ "${{ matrix.scala-version }}" = "sbt-plugin-scala3" ]; then
scala_version="$(bash .github/scripts/resolve-scala-version.sh
"${{ matrix.scala-version }}")"
sbt "++${scala_version}!" "sbt-plugin/scripted ${{ matrix.test-set
}}/*"
else
diff --git a/build.sbt b/build.sbt
index 8cf424ee..c73b3b26 100644
--- a/build.sbt
+++ b/build.sbt
@@ -196,7 +196,7 @@ lazy val sbtPlugin = Project(id = "sbt-plugin", base =
file("sbt-plugin"))
if
(!Dependencies.Versions.CrossScalaForSbtPlugin.contains(scalaVersion.value))
"1.12.15"
else {
scalaBinaryVersion.value match {
- case "2.12" => "1.12.13"
+ case "2.12" => "1.12.15"
case _ => "2.0.0"
}
}
diff --git
a/interop-tests/src/test/scala/org/apache/pekko/grpc/interop/GrpcInteropSpec.scala
b/interop-tests/src/test/scala/org/apache/pekko/grpc/interop/GrpcInteropSpec.scala
index a9299c2d..713d1bc1 100644
---
a/interop-tests/src/test/scala/org/apache/pekko/grpc/interop/GrpcInteropSpec.scala
+++
b/interop-tests/src/test/scala/org/apache/pekko/grpc/interop/GrpcInteropSpec.scala
@@ -50,7 +50,7 @@ class GrpcInteropPekkoJavaWithPekkoHttpJavaSpec extends
GrpcInteropTests(Servers
object Servers {
val IoGrpc = IoGrpcJavaServerProvider
object Pekko {
- val Java = PekkoHttpServerProviderJava$
+ val Java = PekkoHttpServerProviderJava
val Scala = PekkoHttpServerProviderScala
}
}
@@ -73,7 +73,7 @@ object Clients {
//--- Some more providers
-object PekkoHttpServerProviderJava$ extends PekkoHttpServerProvider {
+object PekkoHttpServerProviderJava extends PekkoHttpServerProvider {
val label: String = "pekko-grpc java server"
val pendingCases =
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index ea348084..97826f68 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -20,12 +20,17 @@ object Dependencies {
val scala212 = "2.12.21"
val scala213 = "2.13.18"
val scala3 = "3.3.8"
- val scala3Next = "3.8.4"
+ val scala3Next = "3.9.0"
+ // The Scala 3 version used to build the sbt 2.x plugin. It must not be
newer than the
+ // Scala version sbt 2.x itself is built with (sbt 2.0.x uses 3.8.4),
otherwise sbt cannot
+ // read the plugin's TASTy files and loading a build that uses the plugin
fails with
+ // "Forward incompatible TASTy file". Keep in sync with sbt 2.x, not with
scala3Next.
+ val scala3ForSbtPlugin = "3.8.4"
// the order in the list is important because the head will be considered
the default.
val CrossScalaForLib = Seq(scala213, scala3)
val CrossScalaForPlugin = Seq(scala212, scala3)
- val CrossScalaForSbtPlugin = Seq(scala212, scala3Next)
+ val CrossScalaForSbtPlugin = Seq(scala212, scala3ForSbtPlugin)
val CrossScalaAll = Seq(scala212, scala213, scala3)
// We don't force Pekko updates because downstream projects can upgrade
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]