Scala 2.13 is almost here! We are delighted to present the first 2.13 release candidate.
We and our crew of community contributors have mainly been polishing the improved and simplified Scala collections library that first shipped in 2.13.0-M4 and 2.13.0-M5. Some other sorts of changes got in as well; see below.
We ask all library maintainers to test and publish their libraries for RC1 as soon as possible. This is crucial to validate the release candidate and enable 2.13 to go forward.
About these notes
These are the detailed technical release notes for RC1 only, documenting changes since M5 only.
As usual for Scala pre-releases, RC1 is not binary compatible with any other Scala version, including 2.13 milestones.
We will not break binary compatibility between RC1 and 2.13.0 unless really necessary.
Libraries for Scala 2.13.0-RC1
As libraries are published for RC1, they're added to https://github.com/scala/make-release-notes/blob/2.13.x/projects-2.13.md .
To learn about the collections changes since 2.12 and how to adapt your code, take a look at these documents:
- Scala 2.13's Collections
- The Architecture of Scala 2.13 Collections
- Implementing Custom Collections (Scala 2.13)
- Adding Custom Collection Operations (Scala 2.13)
- the FAQ wiki page. This document is intended for library maintainers and assumes familiarity with the 2.12 Scala collections
- scala-collection-compat provides shims for cross-building code that uses collections across Scala 2.11, 2.12, and 2.13; it also provides two sets of Scalafix rewrites, one for cross-building, one for moving to 2.13 only
These documents are still being expanded and improved.
Here's the biggest recent collections changes, since M5:
- Integrate converters from
- Make unified collection serialization opt-in instead of opt-out (#7624)
CollisionProofHashMap, a mutable hashmap that degrades to red-black trees in the worst case (#7633)
LazyListto always evaluate elements in order, and to have lazy empty-or-not status (#7558)
- Improved performance of small
- Add immutable
SeqMapimplemented via a customized
- Create trait
The scala-parallel-collections module will be published for RC1. (Thank you @julienrf!)
- The license was changed to Apache 2.0 (#7306)
- Accept underscore as numeric literal separator (#6989)
- Eta-expand 0-arity method if expected type is
x op ()now parses as
- More precise inference for overloaded methods when arguments types align (#7631)
- Disallow repeated param except in method signature (#7399)
- By-name implicits: Align detection of implicit recursion with the SIP (#7368)
- Enforce explicit return type for macros (#6942)
- Extension methods of overloads are themselves overloaded (#7896)
- Emit mixin forwarders as bridges to avoid needing generic signatures (#7843)
- Upgrade to ASM 7 for improved JDK 12 compat (#7384)
- Make object fields static, and move post-super init to
- More capable inliner (#7133)
- Usability: compiler suggests possible names in
Compiler option changes
-Xmax-classfile-length; hard-code to 240 (#7497)
- Significant performance improvements to
- Making the global EC a
- Add synchronous ("parasitic")
Standard library changes
- Restore and use
linesIteratorto avoid conflict with JDK 11's
Serializabletraits with type aliases (#6729)
- Provide a simple string matcher as the dual of the simple string interpolator (#7387)
andThenoverload which combines two partial functions (#7263)
- Converters among optional
PartialFunctions and extractor objects (#7111)
Usingto implement the loan pattern (#7468)
ControlThrowablenever suppresses (#7413)
Deprecations and linting
postfixOpssyntax an error (not just a warning) unless the feature is explicitly enabled (#6831)
- Deprecate symbol literals (#7395)
- Deprecate Unicode arrows
usecasescaladoc tag (#7462)
- Deprecate universal
unusedto suppress warnings (#7623)
- Allow suppressing value-discard warning via type ascription to
Compiler performance in 2.13 is 5-10% better than 2.12. The integration of the new collections library shows up in the performance graph as a nice improvement.
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 71 contributors, according to
git shortlog -sn --no-merges ^v2.13.0-M5 ^2.12.x v2.13.0-RC1. Thank you Lukas Rytz, A. P. Marki, Jason Zaugg, Josh Lemer, Diego E. Alonso-Blas, Adriaan Moors, Kenji Yoshida, Stefan Zeiger, NthPortal, Guillaume Martres, Georgi Krastev, Viktor Klang, Dale Wijnand, Seth Tisue, hepin1989, exoego, Rex Kerr, Julien Richard-Foy, Eugene Yokota, Harrison Houghton, Miles Sabin, yui-knk, Philippus, Odd Möller, Aaron S. Hawley, Allan Renucci, Jasper Moeys, Sébastien Doeraene, Xavier GUIHOT, chanyong.moon, Matthias Sperl, Anthony Tjuatja, Enno Runne, Song Kun, Benjamin Kurczyk, ashwin, Kobenko Mikhail, Li Haoyi, Martijn Hoekstra, Mike Skells, 虎鸣, Alden Torres, Andrei Baidarov, Andriy Plokhotnyuk, Benni, Callum Turnbull, Chris Birchall, Chris Phelps, Cody Allen, Daniel Dietrich, Daniel Slapman, Denis Buzdalov, Denys Shabalin, Jack Koenig, Jean Michel Rouly, LPTK, Lionel Parreaux, Martin Duhem, Narek Asadorian, PJ Fanning, Philip, Qiang Sima, Ruud Welling, Ryan McDougall, ShankarShastri, Sperl Matthias, Uttej Guduru, Vincent de Haan, Vlastimil Dort, Yang Bo, ccjoywang, mdedetrich, psilospore, texasbruce, tim-zh.
Scala releases are available through a variety of channels, including (but not limited to):