sbt 2.0.5
The headline features of sbt 2.0.5 are:
- In-process test ClassLoader change
updatetask performance improvements- Common settings bug fix
See also sbt 2.0 change summary for the details.
Hi everyone. On behalf of the sbt project, I am happy to announce sbt 2.0.5. sbt 2.0 is a new major series of sbt, based on Scala 3 constructs and Bazel-compatible cache system. sbt 2.x is released under Semantic Versioning, and the plugins are expected to work throughout the 2.x series. Please try it out, and report any issues you might come across.
How to upgrade
The sbt version used for your build is upgraded by putting the following in project/build.properties:
sbt.version=2.0.5
This mechanism allows that sbt 2.0.5 is used only for the builds that you want.
Download the official sbt runner from SDKMAN, or download from https://github.com/sbt/sbt/releases/tag/v2.0.5 to upgrade the sbt shell script, sbtn, and the launcher.
Changes with compatibility implications
In-process test ClassLoader change
sbt 2.0.5 flips the default value of closeClassLoaders to true, which will close the in-process, ad-hoc test ClassLoaders. This is intended to fix AccessDeniedException observed on Windows.
While closing the ad-hoc test ClassLoader should work in many cases, some tests or libraries that do not join all threads may experience ClassNotFound issue.
To workaround the issue, you can fork the test as follows:
Test / fork := true
This was contributed by @eed3si9n in #9538
🐛 Bug fixes
- fix: Fixes
a/build.sbtsetting leakage by @eed3si9n in #9519 - fix: Fixes sbt runner failing to start sbtn on Windows by @ColOfAbRiX in #9520
- fix: Fixes forked run baseDirectory by @eed3si9n in #9531
- fix: Fixes remote cache header values with
=by @KilianSwissborg in #9534 - fix: Fixes pipelined build deadlocks by @BrianHotopp in #9542
🚀 Updates
- perf: Improve
updateperformance by fixing projectCache by @hoangmaihuy in #9522 - perf: Improve
updateperformance by avoiding artifact content hashing by @hoangmaihuy in #9524 - sbtn 2.0.0-731e6666 by @eed3si9n in #9545
Participation
sbt 2.0.5 is brought to you by 5 contributors. Eugene Yokota (eed3si9n), Mai Huy Hoàng, Brian Hotopp, Fabrizio Colonna, KilianSwissborg. Thanks!
Thanks to everyone who’s helped improve sbt and Zinc by using them, reporting bugs, improving our documentation, porting builds, porting plugins, and submitting and reviewing pull requests.
For anyone interested in helping sbt, there are many avenues for you to help, depending on your interest. If you’re interested, Contributing, “help wanted”, “good first issue”, and Discussions are good starting points.
FYI - Scala Days talk
I gave a talk in Scala Days 2025 about sbt 2.0 (recording, slide deck).
Donate to Scala Center
Scala Center is a non-profit center at EPFL to support education and open source.