Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Fixes with compatibility implications

Scala 2.12.9 generates shallower ASTs in pattern translation, to reduce stack size requirements (-Xss) during compilation.

Scala.js users must update to 0.6.28+ or 1.0.0-M8+ for compatibility with Scala 2.12.9. (#7375)

Highlights of 2.12.9

  • Improved compatibility with JDK 11, 12, and 13 (see below)
  • Experimental support for build pipelining and outline type checking (see below)
  • Fix large string interpolation causing StackOverflowError (#7995, #7996)

Compatibility with JDK 11, 12, and 13

Scala 2.12.9 contains various fixes to improve compatibility with JDK 11, 12, and 13.

  • Backport upgrade to ASM 7 for JDK 12 compatibility (#7780)
  • Fix -release N flag on JDK 12+ (#7763)
  • Fix "cannot be represented as URI" on JDK 13 (#8210)
  • Add JDK 9 constant types to the ClassfileParser to fix Scaladoc generation issue (#8289)

Build pipelining and outline type checking

Scala 2.12.9 adds experimental infrastructure intended to support build pipelining.

Build pipelining means that in a multi-project builds, a downstream subproject could be compiled immediately after its upstream subprojects have finished typechecking (more precisely, have finished the "pickler" phase), without waiting for the compiler to produce .class files.

To allow this, ClassfileParser is extended to support .sig files, containing just the Scala "pickle" (which would normall be parsed from information in class files).

see: #7712, #8077

Further highlights

  • Un-deprecate eta-expansion of 0-ary methods (#7740)
  • Fix Java signature for value classes appearing in type arguments (#8127)
  • Backport fix for interop between Java and generic inner Scala classes (#7977)
  • Make the inferred packedTypes deterministic in bytecode (#7751)
  • Add -doc-canonical-base-url to set a canonical URL in Scaladoc (#7998)
  • Backport fix for "illegal cyclic reference involving class" (#8161)
  • Cache materialized TypeTags (#8112)
  • Reduce the overhead of macro expansion (#8088)
  • and many other performance optimizations (mostly by Jason Zaugg and Diego E. Alonso-Blas: kudos!)

For more details, check out all closed bugs and merged PRs.

As usual for minor releases, Scala 2.12.9 is binary compatible with the whole Scala 2.12 series.

Contributors

A big thank you to everyone who's helped improve Scala by reporting bugs, improving our documentation, spreading kindness in discussions around Scala, and submitting and reviewing pull requests! You are all magnificent.

This release was brought to you by 26 contributors, according to git shortlog -sn --no-merges v2.12.8..2.12.x. Thank you Jason Zaugg, Diego E. Alonso-Blas, Seth Tisue, Harrison Houghton, Diego Alonso, Adriaan Moors, Lukas Rytz, Aaron S. Hawley, Eugene Yokota, Michael Pollmeier, ta.tanaka, Enno Runne, A. P. Marki, Diego E. Alonso Blas, Georgi Krastev, Kenji Yoshida, Stefan Zeiger, exoego, Benjamin Kurczyk, Anselm von Wangenheim, Alex Vayda, Sunil Mishra, Sébastien Doeraene, tgodzik, Dale Wijnand, Ryo Fukumuro.

Thanks to Lightbend for their continued sponsorship of the Scala core team’s efforts. Lightbend offers commercial support for Scala.

Scala 2.12 Notes

The release notes for Scala 2.12.0 have important information applicable to the whole 2.12 series.

Obtaining Scala

Scala releases are available through a variety of channels, including (but not limited to):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.