Skip to content

Upgrade to sbt 2.0.10 and Scala 3.9.0 - #759

Merged
xerial merged 3 commits into
mainfrom
sbt2
Oct 3, 2026
Merged

xerial merged 3 commits into
mainfrom
sbt2

Conversation

@xerial

@xerial xerial commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • sbt 1.12.15 → 2.0.10 and Scala 3.7.1 → 3.9.0. Scala is only used for the build definition, since there are no Scala sources.
  • sbt-osgi 0.10.0 → 0.11.0-RC1, its first release for sbt 2. The other plugins (sbt-pgp, sbt-scalafmt, sbt-dynver) already had sbt 2 builds at their current versions.
  • build.sbt fixes for sbt 2 and Scala 3: url(...) → uri(...), and the infix exclude → .exclude(...).
  • CI on JDK 8 and 11: sbt 2 itself requires JDK 17+, so each test jdkN job installs JDK 21 for sbt. Tests run in a forked JVM on the matrix JDK via the new TEST_JAVA_HOME variable, which is applied to Test / forkOptions. Setting Test / javaHome instead would also make javac run on JDK 8, which fails on --release. The JAR integration test also uses TEST_JAVA_HOME.
  • testFull in CI: sbt 2's test skips tests that passed in a cached previous run, and switching TEST_JAVA_HOME doesn't invalidate that cache. CI caches ~/.cache, so it now runs testFull.
  • SnappyLoaderTest: it hard-coded target/classes, which sbt 2 no longer uses. It now gets the class path from Snappy's code source.
  • Output paths: sbt 2 builds into target/out/jvm/u/snappy-java/ instead of target/, so the musl job and test-jar-integration.sh now find the classes directory and jar with find.

Verification

  • Compared the sbt 2 build with the current sbt 1 build of main:
    • Jar contents are identical.
    • The POM is identical, apart from the version.
    • The OSGi manifest (Export/Import-Package, Bundle-NativeCode, activator, etc.) is identical, apart from version and timestamp fields.
  • ./sbt testFull on JDK 25: 139 passed, 1 ignored
  • TEST_JAVA_HOME=<zulu 8> ./sbt testFull with sbt on JDK 25: 139 passed, 1 ignored
  • script/test-jar-integration.sh with TEST_JAVA_HOME=<zulu 8>: passed
  • publishSigned and sonaRelease are still available, and publishTo resolves as before
  • CI matrix (JDK 8/11/17/21/25, musl)
  • Snapshot publish after merge

Notes

  • sbt-osgi for sbt 2 is still a release candidate. The generated manifest matches the current one.
  • sbt 2 needs JDK 17+ locally. The release and snapshot workflows already use JDK 21.

💎 Generated with Treasure Work

@github-actions github-actions Bot added the doc label Oct 3, 2026
@xerial
xerial enabled auto-merge (squash) October 3, 2026 22:20
xerial and others added 3 commits October 3, 2026 15:24
sbt 2 requires JDK 17+ to run, so CI now runs sbt on JDK 21 and forks
tests on the matrix JDK (8, 11, 17, 21, 25) via TEST_JAVA_HOME.

Co-Authored-By: Treasure Work <291137728+treasure-work@users.noreply.github.com>
…ses dynamically

- Set TEST_JAVA_HOME on Test / forkOptions instead of Test / javaHome, which
  also made javac run on JDK 8 and fail on --release
- SnappyLoaderTest hard-coded target/classes, which sbt 2 no longer uses

Co-Authored-By: Treasure Work <291137728+treasure-work@users.noreply.github.com>
Co-Authored-By: Treasure Work <291137728+treasure-work@users.noreply.github.com>
@xerial
xerial merged commit 4a5ab4e into main Oct 3, 2026
13 checks passed
@xerial
xerial deleted the sbt2 branch October 3, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant