Skip to content

build: remove hardcoded Scala 2.12 version from gen-scala-server scripted tests; add scala-2_13 test suite#649

Draft
He-Pin wants to merge 3 commits intoapache:mainfrom
He-Pin:port/2-gen-scala-server
Draft

build: remove hardcoded Scala 2.12 version from gen-scala-server scripted tests; add scala-2_13 test suite#649
He-Pin wants to merge 3 commits intoapache:mainfrom
He-Pin:port/2-gen-scala-server

Conversation

@He-Pin
Copy link
Member

@He-Pin He-Pin commented Mar 8, 2026

Motivation

Multiple gen-scala-server scripted test build.sbt files contained a hardcoded scalaVersion := "2.12.x". This prevented the sbt scripted plugin from running them under Scala 2.13, even when the CI matrix passed a 2.13 version.

Modification

  • Removed scalaVersion settings from 11 sbt-plugin/src/sbt-test/gen-scala-server/*/build.sbt files so they pick up the version provided by the scripted runner
  • Added a new sbt-plugin/src/sbt-test/scala-2_13/01-basic-client-server/ scripted test directory that mirrors the gen-scala-server/01-basic-client-server test without any Scala version pinning

Result

The scripted tests are now version-agnostic and run under whichever Scala version the sbt scripted runner provides, enabling 2.12/2.13 cross-version CI coverage without separate test sets.

References

…pted tests and add scala-2_13 test suite

Remove the obsolete `scalaVersion := "2.12.20"` pin (and the stale
"Can be removed when we move to 2.12.14" comment) from all eleven
gen-scala-server scripted-test `build.sbt` files. These tests run under
the Scala version selected by the sbt-plugin project (currently 2.12),
so the explicit pin is redundant and creates maintenance noise.

Add a new scripted-test directory `sbt-plugin/src/sbt-test/scala-2_13/`
with a basic client-server test that explicitly sets
`scalaVersion := "2.13.16"`. This mirrors the existing
`scala3/01-basic-client-server` scripted test and gives us a dedicated
Scala 2.13 smoke-test for the sbt plugin, verifying that PekkoGrpcPlugin
works correctly under 2.13 (in addition to the default 2.12 scripted run
and the existing Scala 3 suite).

Upstream commit: akka/akka-grpc@ff09d8fa
Upstream PR:     akka/akka-grpc#1715

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
He-Pin and others added 2 commits March 8, 2026 19:33
- Add scalaVersion := "2.13.18" to gen-scala-server scripted tests
  that were missing it (02-05, 09, 11), preventing Scala 2.12 fallback
  that caused pekko-grpc-runtime_2.12 resolution failures
- Format 07-gen-basic-server-with-pekko/build.sbt to align case x
  with other pattern match arms (scalafmt 3.10.7 compatibility)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…3 test from 2.13.16

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants