Skip to content

SBT: upgrade sbt-2.0.0-RC10 and scala 3.8.3#422

Merged
kitbellew merged 3 commits intoscalameta:mainfrom
kitbellew:422
Apr 6, 2026
Merged

SBT: upgrade sbt-2.0.0-RC10 and scala 3.8.3#422
kitbellew merged 3 commits intoscalameta:mainfrom
kitbellew:422

Conversation

@kitbellew
Copy link
Copy Markdown
Contributor

No description provided.

@kitbellew
Copy link
Copy Markdown
Contributor Author

@eed3si9n has there been a change in sbt 2.x after RC6 which skips the root project when running a command? the tests fail since build.sbt in the root project of the scripted test is not touched when the test runs scalafmtSbtCheck?

in the set up, it has

lazy val p123 = project
  .in(file("."))
  .aggregate(
    p1,
    p2,
    p3
  )

earlier, running a command would call it on the root project and all three aggregated ones, but with the new version, only the aggregated ones.

@eed3si9n
Copy link
Copy Markdown
Contributor

eed3si9n commented Apr 6, 2026

has there been a change in sbt 2.x after RC6 which skips the root project when running a command?

I created a small project to try to reproduce it:

lazy val root = rootProject
  .aggregate(p1, p2, p3)

lazy val p1 = project
lazy val p2 = project
lazy val p3 = project

and got expected result:

sbt:root> hello
[info] p3
[info] root
[info] p1
[info] p2
[success] elapsed time: 0 s

where hello prints the name of the subproject, so aggregation seems to be working. Note, however, that sbt 2.x will cache the result by default. You can opt out of that by marking the key as @transient, and see if the behavior changes.

@kitbellew
Copy link
Copy Markdown
Contributor Author

@eed3si9n thank you for checking. a mystery. it didn't work with RC9/3.8.1 and now works with RC10/3.8.3.

@kitbellew kitbellew changed the title SBT: upgrade sbt and scala 3 SBT: upgrade sbt-2.0.0-RC10 and scala 3.8.3 Apr 6, 2026
@kitbellew kitbellew merged commit 992173d into scalameta:main Apr 6, 2026
4 checks passed
@kitbellew kitbellew deleted the 422 branch April 6, 2026 19:32
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