Update sbt to 2.0.4 - #500
Conversation
📝 WalkthroughWalkthroughThe project’s SBT configuration is updated from version ChangesBuild configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@project/build.properties`:
- Line 1: Update the CI and publish job Java setup in .github/workflows/ci.yml
from Temurin 11 to JDK 17 to support the sbt.version 2.0.4 change, and verify
the build definition and plugins follow SBT 2.x migration requirements before
merging.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 11810b4b-07ca-4cf8-8720-5197cf3ad9f5
📒 Files selected for processing (1)
project/build.properties
| @@ -1 +1 @@ | |||
| sbt.version=1.12.14 | |||
| sbt.version=2.0.4 | |||
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -eu
# Check build definitions and plugins for upgrade-sensitive code.
rg -n '(^|[[:space:]])[A-Za-z0-9_]+:[A-Za-z0-9_]+' build.sbt project --glob '*.sbt' --glob '*.scala' || true
rg -n 'addSbtPlugin|sbtPlugin|scalaVersion|exportJars|Def\.uncached' build.sbt project --glob '*.sbt' --glob '*.scala' || true
# Check CI/toolchain declarations for JDK versions.
rg -n 'java-version|JAVA_HOME|jdk|temurin|zulu|java:' .github .circleci Dockerfile* Jenkinsfile* 2>/dev/null || trueRepository: nafg/slick-migration-api
Length of output: 1177
🏁 Script executed:
#!/bin/bash
set -eu
printf '--- files ---\n'
git ls-files 'project/*' 'build.sbt' '.github/workflows/*.yml' Dockerfile* 2>/dev/null || true
printf '\n--- project/build.properties ---\n'
cat -n project/build.properties
printf '\n--- build.sbt header ---\n'
sed -n '1,120p' build.sbt | cat -n
printf '\n--- project plugins ---\n'
cat -n project/plugins.sbt
printf '\n--- workflow relevant sections ---\n'
sed -n '1,140p' .github/workflows/ci.yml | cat -n
printf '\n--- publish-related settings ---\n'
rg -n 'publish|publishArtifact|sonatype|coursierResolver|dependencyResolution|organization|Test|Compile|Defaults|Settings|Compile / package|coverageEnabled|coverageEnabled|coverageExcludedPackages|coveralls' build.sbt project --glob '*.sbt' --glob '*.scala' || true
printf '\n--- scala/sbt/version references ---\n'
rg -n 'scalaVersion|crossScalaVersions|scalaRelease|sbt.version|scalaVersion :=' build.sbt project .github --glob '*.yml' --glob '*.yaml' --glob '*.scala' --glob '*.sbt' || trueRepository: nafg/slick-migration-api
Length of output: 253
🏁 Script executed:
#!/bin/bash
set -eu
echo '--- files ---'
git ls-files 'project/*' 'build.sbt' '.github/workflows/*.yml' Dockerfile* 2>/dev/null || true
echo
echo '--- project/build.properties ---'
cat -n project/build.properties
echo
echo '--- build.sbt header ---'
sed -n '1,120p' build.sbt | cat -n
echo
echo '--- project plugins ---'
cat -n project/plugins.sbt
echo
echo '--- workflow relevant sections ---'
sed -n '1,140p' .github/workflows/ci.yml | cat -n
echo
echo '--- publish-related settings ---'
rg -n 'publish|publishArtifact|sonatype|coursierResolver|dependencyResolution|organization|Test|Compile|Defaults|Settings|Compile / package|coverageEnabled|coveralls' build.sbt project --glob '*.sbt' --glob '*.scala' || true
echo
echo '--- scala/sbt/version references ---'
rg -n 'scalaVersion|crossScalaVersions|scalaRelease|sbt.version|scalaVersion :=' build.sbt project .github --glob '*.yml' --glob '*.yaml' --glob '*.scala' --glob '*.sbt' || trueRepository: nafg/slick-migration-api
Length of output: 7375
🌐 Web query:
SBT 2.0 JDK 17 requirement documentation
💡 Result:
sbt 2.x requires a minimum of JDK 17 to run [1][2][3]. This requirement is strictly enforced; the sbt runner is designed to detect the JDK version before launching and will terminate with an error message if it detects a version lower than JDK 17 [4]. The decision to move to JDK 17 as the baseline is driven by the fact that sbt 2.x uses Scala 3.8.x for build definitions and plugins [2][3], which itself requires JDK 17 or higher [2][3]. Official documentation recommends using Eclipse Adoptium Temurin JDK 17 [1]. While sbt 2.x requires JDK 17 to execute the build process, you can still compile code targeting older JDK versions (such as JDK 8) by using the --release flag in your build configuration [5].
Citations:
- 1: https://www.scala-sbt.org/2.x/docs/en/Setup.html
- 2: https://www.scala-lang.org/blog/2026/06/29/sbt2.html
- 3: http://eed3si9n.com/sbt-2.0.0
- 4: [2.x] fix: Runner should fail on JDK < 17 for sbt 2.x sbt/sbt#8825
- 5: https://users.scala-lang.org/t/rfc-sbt-2-0-on-jdk-17/12169
Align the build with SBT 2.x before relying on this version bump.
project/build.properties now pins SBT 2.0.4, which requires JDK 17, but the CI builds and publish job still run with Temurin 11. Update .github/workflows/ci.yml to JDK 17 and review the SBT 2.x migration notes for plugin/build-definition compatibility before merging.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@project/build.properties` at line 1, Update the CI and publish job Java setup
in .github/workflows/ci.yml from Temurin 11 to JDK 17 to support the sbt.version
2.0.4 change, and verify the build definition and plugins follow SBT 2.x
migration requirements before merging.
|
Tick the box to add this pull request to the merge queue (same as
|
|
Superseded by |
About this PR
📦 Updates org.scala-sbt:sbt from
1.12.14to2.0.4⚠📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a
.scala-steward.conffile.Have a fantastic day writing Scala!
⚙ Adjust future updates
Add this to your
.scala-steward.conffile to ignore future updates of this dependency:Or, add this to slow down future updates of this dependency: