Scala sbt 1.0.4 patch notes
Hi everyone. For those living in the US, I hope you had a nice Thanksgiving weekend. It’s one of my favorite times of the year, cooking meals together with family and friends and exchanging stories.
I would also like to announce sbt 1.0.4, which is a hotfix to sbt 1.0.x series. This is a binary compatible release for sbt 1 focusing on bug fixes. sbt 1 is released under Semantic Versioning, and the plugins are expected to work for sbt 1.x series.
Performance regression fixes
Speaking of Thanksgiving, I am thankful to all the contributors to Scala tooling ecosystem: Not just for coding contributions to sbt but also thought-provoking blog posts (e.g. Haoyi’s So, what’s wrong with SBT?), talks (e.g. Jeff’s Beyond the Build Tool), documentations, IDEs/editor interations, and alternative build tools (e.g. Chris’s cbt). Rather being cynical and just saying “sbt sucks!” these folks are rolling up their sleeves to fix sbt or come up with alternative solutions.
A number of folks have jumped in to tackle some of the performance regressions reported for sbt 1.
- Jorge (@jvican) from Scala Center has been looking into various perf improvements, and in Zinc 1.0.5 that is shipped with sbt 1.0.4, he provided the fix for classpath hashing performance by caching the hash result per JAR file.
- Sam Halliday (@fommil) has also been working on the classpath hashing issue, providing a public reproduction project, and sending a few pull requests.
- OlegYch (@OlegYch) fixed a performance regression of
- Leonard Ehrenfried (@leonardehrenfried) has been also looking into a performance benchmark and created an automated running harness based on Sam’s work. In addition, he has send a fix for Ivy-log4j performance regression. #3711/util#132
- From the Lightbend Tooling team, Dale (@dwijnand) has been looking into performance related issues, and getting insights from our in-house experts.
Here’s the no-op compile performance of sbt 1.0.4 using Leonard / Sam’s test project with 25 subprojects.
Note: I have subtracted the startup time from the benchmark report’s compile time, assuming you’d have sbt session already running:
|sbt 0.13.16||sbt 1.0.3||sbt 1.0.4|
|no-op compile x2*||37s||80s||33s|
As you can see, sbt 1.0.3 regressed in no-op compilation, and sbt 1.0.4 makes it 10 to 20% faster than 0.13.16.
Java 9 related fixes
sbt 1.0.4 removes some uses of reflection in Ivy that was causing warnings on Java 9, and Yoshida-san (@xuwei_k) fixed a bug we introduced in a previous version. With these changes propagated to both the launcher and library management, we should see fewer warnings.
ArrayIndexOutOfBoundsExceptionon Ivy when running on Java 9. ivy#27 by @xuwei-k
- Fixes Java 9 warning by upgrading to launcher 1.0.2. ivy#26/launcher#45 by @dwijnand
-jvm-debugon Java 9. launcher-package197 by @mkurz
Scala 2.13.0-M2 support
Adriaan (@adriaanm) has been improving the code structure around Scala’s REPL in Scala’s 2.13.x branch. This required some adjustment on sbt, and we are happy that we are addressing that while 2.13 is still at a milestone. This was a weird one since we had to confirm that it works by compiling the bridge using Scala 2.13.0-M2 using sbt 1.0.3, but sbt 1.0.3 can’t compile 2.13.0-M2 yet.
Other bug fixes
- Fixes undercompilation of value classes when the underlying type changes. zinc#444 by @smarter
runtask log level, previously always set to
debug. #3655/#3717 by @cunei
- Works around Scala compiler’s
templateStats()not being thread-safe. #3743 by @cunei
- Fixes “Attempting to overwrite” error message. lm#174 by @dwijnand
- Fixes incorrect eviction warning message. lm#179 by @xuwei-k
- Registers Ivy protocol only for
https:to be more plugin friendly. lm183 by @tpunder
- Fixes script issues related to
expr. launcher-package#199 by @thatfulvioguy
- Improves Zinc scripted testing. zinc#440 by @jvican
Thanks again to everyone who’s helped improve sbt and Zinc 1 by using them, reporting bugs, improving our documentation, porting builds, porting plugins, and submitting and reviewing pull requests.
sbt 1.0.4 was brought to you by 17 contributors, according to
git shortlog -sn --no-merges v1.0.3..v1.0.4 on sbt, zinc, librarymanagement, util, io, and website: Eugene Yokota, Kenji Yoshida (xuwei-k), Jorge Vicente Cantero (jvican), Dale Wijnand, Leonard Ehrenfried, Antonio Cunei, Brett Randall, Guillaume Martres, Arnout Engelen, Fulvio Valente, Jens Grassel, Matthias Kurz, OlegYch, Philippus Baalman, Sam Halliday, Tim Underwood, Tom Most. Thank you!
For anyone interested in helping sbt, there are many avenues you could help, depending on your interest.
- Migrate library builds to sbt 1, or update plugins.
- Report bugs when you see them.
- Send in fixes to bugs.
- Update documentation.
If you’re interested in other ideas, come talk to us on sbt-contrib.