Releases: scala/scala
Scala 2.13.8
The Scala team at Lightbend is pleased to announce the availability of Scala 2.13.8.
This is a modest, incremental release focused on addressing regressions in 2.13.7.
Highlights
- Make REPL work again on Mac M1 (upgrade JLine & JNA) (#9807 by @SethTisue)
- Fix slicing of views of
IndexedSeq
s (including fixing 2.13.7reverseIterator
regression) (#9799 by @som-snytt) - Fix 2.13.7 regression in implicit resolution (#9829 by @joroKr21)
- Fix 2.13.7
releaseFence
regression affecting GraalVM compatibility (#9825 by @lrytz) - Fix 2.13.7 regression affecting wildcards and F-bounded types (#9806 by @joroKr21)
A few small changes that will ship in 2.12.16 are also included in this release.
For the complete 2.13.8 change lists, see all merged PRs and all closed bugs.
Compatibility
As usual for our minor releases, Scala 2.13.8 is binary-compatible with the whole Scala 2.13 series.
Upgrading from 2.12? Enable -Xmigration
while upgrading to request migration advice from the compiler.
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 8 contributors, according to git shortlog -sn --no-merges @ ^v2.13.7 ^2.12.x
. Thank you A. P. Marki, Seth Tisue, Georgi Krastev, Jason Zaugg, Lukas Rytz, Martijn Hoekstra, Philippus Baalman, Chris Kipp.
Thanks to Lightbend for their continued sponsorship of the Scala core team’s efforts. Lightbend offers commercial support for Scala.
Scala 2.13 notes
The release notes for Scala 2.13.0 have important information applicable to the whole 2.13 series.
Obtaining Scala
Scala releases are available through a variety of channels, including (but not limited to):
- Bump the
scalaVersion
setting in your sbt-based project - Download a distribution from scala-lang.org
- Obtain JARs via Maven Central
Scala 2.13.7
The Scala team at Lightbend is pleased to announce the availability of Scala 2.13.7.
Align with Scala 3
- Update TASTy reader to support Scala 3.1 (#9791 by @bishabosha)
- Allow
import x.{*, given}
under-Xsource:3
(#9724 by @smarter) - Allow
case
in pattern bindings even without-Xsource:3
(#9721 by @smarter) - Deprecate top-level wildcard type parameters (#9712 by @som-snytt)
JDK and Java compatibility
- Support JDK 18 (#9702 by @SethTisue)
- Support JDK 16 records in Java sources (#9551 by @harpocrates)
- Allow concrete private interface methods in Java sources (#9748 by @dengziming)
- Use
StringConcatFactory
for string concatenation on JDK 9+ (#9556 by @harpocrates)
Android compatibility
- Add
ClassValueCompat
to support systems withoutjava.lang.ClassValue
(such as Android) (#9752 by @nwk37011) - For Android compatibility, make
Statics.releaseFence()
also catchNoSuchMethodException
forjava.lang.invoke.VarHandle.releaseFence()
call (#9739 by @nwk37011)
Concurrency
- Fix asymmetric failure behavior of
Future#{zip,zipWith,traverse,sequence}
by making them fail fast regardless of ordering (#9655 by @lihaoyi)
Collections
- Make
ArrayBuffer
's iterator fail fast when buffer is mutated (#9258 by @NthPortal) - Fix
ArrayOps
bugs (by avoidingArraySeq#array
, which does not guarantee element type) (#9641 by @som-snytt) - Deprecate
IterableOps.toIterable
(#9774 by @lrytz)
Other changes
- Accept supplementary Unicode characters in identifiers (#9687 by @som-snytt)
- Improve tab completion and code assist in REPL (#9656 by @retronym)
Some small changes that will ship in 2.12.16 are also included in this release.
For the complete 2.13.7 change lists, see all merged PRs and all closed bugs.
Compatibility
As usual for our minor releases, Scala 2.13.7 is binary-compatible with the whole Scala 2.13 series.
Upgrading from 2.12? Enable -Xmigration
while upgrading to request migration advice from the compiler.
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 25 contributors, according to git shortlog -sn --no-merges @ ^v2.13.6 ^2.12.x
. Thank you A. P. Marki, Lukas Rytz, Seth Tisue, Jason Zaugg, Jamie Thompson, NthPortal, Georgi Krastev, Guillaume Martres, Dale Wijnand, Martijn Hoekstra, Alec Theriault, Rafał Sumisławski, Matt Dziuban, Li Haoyi, Doug Roper, Sébastien Doeraene, VladKopanev, danicheg, dengziming, megri, nwk37011, Magnolia.K, 梦境迷离, Mathias, James Judd.
Thanks to Lightbend for their continued sponsorship of the Scala core team’s efforts. Lightbend offers commercial support for Scala.
Scala 2.13 notes
The release notes for Scala 2.13.0 have important information applicable to the whole 2.13 series.
Obtaining Scala
Scala releases are available through a variety of channels, including (but not limited to):
- Bump the
scalaVersion
setting in your sbt-based project - Download a distribution from scala-lang.org
- Obtain JARs via Maven Central
Scala 2.12.15
This release improves compatibility with JDK 17 and 18:
- Avoids
IllegalArgumentException
in JDK 17+ for lambda deserialization (#9676) - Upgrades to ASM 9.2, for JDK 18 support in optimizer (#9701)
and facilitates cross-building with Scala 3 with:
- Allow
case
in pattern bindings even without-Xsource:3
(#9740 by @smarter) - Allow
import x.{*, given}
under-Xsource:3
(#9736 by @smarter) - Handle star in import selector (under
-Xsource:3
) (#9665 by @som-snytt)
For complete 2.12.15 change lists, see all merged PRs and all closed bugs.
Compatibility
As usual for our minor releases, Scala 2.12.15 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 4 contributors, according to git shortlog -sn --no-merges @ ^v2.12.14 ^2.11.x
. Thank you Jason Zaugg, Seth Tisue, A.P. Marki, Guillaume Martres.
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):
- Bump the
scalaVersion
setting in your sbt-based project - Download a distribution from scala-lang.org
- Obtain JARs via Maven Central
Scala 2.12.14
- Backports improvements to
-Xsource:3
to help projects cross build between 2.12.x, 2.13.x and 3.x.
(#9589, #9595 and #9620 by @smarter and @neko-kai) - Reduces lock contention between compilers when reading classpath JAR files. (#9549 by @retronym)
- Propagate custom
TaskSupport
through operations of parallel collections. (#9529, backport of fix for scala/scala-parallel-collections#152, by @lrytz) - Upgrade to asm 9.1, for JDK 17 support (#9488 by @SethTisue)
- Fix cyclic error in runtime reflection (protobuf), a regression that prevented Spark upgrading to 2.12.13 (#9478 by @retronym)
- Allow annotated literals inside as annotation args. (#9342 by @gzm0)
For complete 2.12.14 change lists, see all merged PRs and all closed bugs.
Compatibility
As usual for our minor releases, Scala 2.12.14 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 40 contributors, according to git shortlog -sn --no-merges HEAD ^v2.12.13 ^2.11.x
. Thank you Jason Zaugg, Lukas Rytz, Guillaume Martres, Dale Wijnand, Seth Tisue, A. P. Marki, Mike Skells, Tom Grigg, Kai, Mario Galic, Martijn Hoekstra, tanishiking, Philippus, Adriaan Moors, Sébastien Doeraene, Tobias Schlatter, Andrii, Filipe Regadas, Alexey Kotlyarov.
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):
- Bump the
scalaVersion
setting in your sbt-based project - Download a distribution from scala-lang.org
- Obtain JARs via Maven Central
Scala 2.13.6
The Scala 2 team at Lightbend is pleased to announce the availability of Scala 2.13.6.
Highlights
- TASTy Reader support for Scala 3.0.0 (#9617 by @bishabosha)
- The splain compiler plugin by @tek was integrated into the compiler, available with the
-Vimplicits
and-Vtype-diffs
flags (#7785) - Escaped double quotes now work as expected in string interpolations, both
s"\""
ands"$""
(#8830 by @eed3si9n and #9536 by @martijnhoekstra)
Other Changes
- Optimized
BigInt
implementation (#9628) by @denisrosset - Support JDK15 text blocks in Java parser (#9548) by @harpocrates
- Stricter override checking for protected Scala members which override Java members (#9525) by @kynthus
- Check
private[this]
members in override checking (#9542) - More accurate outer checks in patterns (#9504)
- Allow renaming imports from
_root_
(#9482) by @som-snytt - Make more annotations extend
ConstantAnnotation
(9336) by @BalmungSan - A number of syntax changes were added to simplify cross-building between Scala 2 and 3
- Don't error (only warn) on symbol literals under
-Xsource:3
(#9602) - Support writing
&
instead ofwith
in types under-Xsource:3
(#9594) - Support Scala 3 vararg splice syntax under
-Xsource:3
(#9584) - Support Scala 3 wildcard and renaming imports under
-Xsource:3
(#9582) - Allow soft keywords open and infix under
-Xsource:3
(#9580) - Align leading infix operator with Scala 3 improvements (#9567)
- Support
?
as wildcard marker under-Xsource:3
(#9560) - Support case in pattern bindings under
-Xsource:3
(#9558) - Parse
+_
and-_
in types as identifiers under-Xsource:3
to support Scala 3.2 placeholder syntax (#9605)
- Don't error (only warn) on symbol literals under
Some small changes that will ship in 2.12.14 are also included in this release.
For the complete 2.13.6 change lists, see all merged PRs and all closed bugs.
Compatibility
As usual for our minor releases, Scala 2.13.6 is binary-compatible with the whole Scala 2.13 series.
Upgrading from 2.12? Enable -Xmigration
while upgrading to request migration advice from the compiler.
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 25 contributors, according to git shortlog -sn --no-merges HEAD ^v2.13.5 ^2.12.x
. Thank you A. P. Marki, Lukas Rytz, Dale Wijnand, Jamie Thompson, Seth Tisue, 梦境迷离, Guillaume Martres, Martijn Hoekstra, Denis Rosset, Aaron S. Hawley, Kai, Eugene Yokota, Jason Zaugg, Anatolii Kmetiuk, Ikko Ashimine, superseeker13, Eugene Platonov, Diego E. Alonso Blas, Filipe Regadas, Hatano Yuusuke, Luis Miguel Mejía Suárez, Rafał Sumisławski, Alec Theriault, Tom Grigg, Torsten Schmits.
Thanks to Lightbend for their continued sponsorship of the Scala core team’s efforts. Lightbend offers commercial support for Scala.
Scala 2.13 notes
The release notes for Scala 2.13.0 have important information applicable to the whole 2.13 series.
Obtaining Scala
Scala releases are available through a variety of channels, including (but not limited to):
- Bump the
scalaVersion
setting in your sbt-based project - Download a distribution from scala-lang.org
- Obtain JARs via Maven Central
Scala 2.13.5
Scala 2.13.5
The Scala 2 team at Lightbend is pleased to announce the availability of Scala 2.13.5.
Highlights
- TASTy reader: add support for Scala 3.0.0-RC1 (#9501, #9394, #9357) — thank you @bishabosha!
- Allow name-based extractors to be irrefutable (#9343) — thank you @martijnhoekstra!
- Upgrade to ASM 9.1, for JDK 16 and 17 support in the optimizer (#9489, #9480)
Other changes
- Assorted improvements to exhaustivity checking in pattern matching (#9479, #9472, #9474, #9313, #9462)
- Assorted improvements to handling of higher-kinded types, aligning with Scala 3 (#9400, #9404, #9405, #9414, #9417, #9439) — thank you @joroKr21!
- Make
-target
support JVM 13, 14, 15, 16, and 17 (#9489, #9481) - Omit
@nowarn
annotations from generated code, for forwards compatibility at compile-time (#9491) - Add linting of unused context bounds (via
-Wunused:synthetics
or-Wunused:params
) (#9346) — thank you @som-snytt! - Lift artificial restrictions on
ConstantAnnotation
s (#9379) - Make Java
Map
wrappers handle nulls according toput
/remove
contract (#9344) — thank you @som-snytt! - Make language specification available as a PDF (#7432) — thank you @sake92!
Some small changes that will ship in 2.12.14 are also included in this release.
For complete 2.13.5 change lists, see all merged PRs and all closed bugs.
Compatibility
As usual for our minor releases, Scala 2.13.5 is binary-compatible with the whole Scala 2.13 series.
Upgrading from 2.12? Enable -Xmigration
while upgrading to request migration advice from the compiler.
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 23 contributors, according to git shortlog -sn --no-merges HEAD ^v2.13.4 ^2.12.x
. Thank you Seth Tisue, A. P. Marki, Dale Wijnand, NthPortal, Jamie Thompson, Lukas Rytz, Martijn Hoekstra, Georgi Krastev, Jason Zaugg, Jasper Moeys, Sakib Hadziavdic, Anatolii Kmetiuk, Arnaud Gourlay, Marcono1234, Chia-Ping Tsai, Mike Skells, Stefan Zeiger, Waleed Khan, Yann Bolliger, Guillaume Martres, 梦境迷离, Ethan Atkins, Darcy Shen.
Thanks to Lightbend for their continued sponsorship of the Scala core team’s efforts. Lightbend offers commercial support for Scala.
Scala 2.13 notes
The release notes for Scala 2.13.0 have important information applicable to the whole 2.13 series.
Obtaining Scala
Scala releases are available through a variety of channels, including (but not limited to):
- Bump the
scalaVersion
setting in your sbt-based project - Download a distribution from scala-lang.org
- Obtain JARs via Maven Central
Scala 2.12.13
Highlights
- Adds support for configurable warnings and errors (
@nowarn
and-Wconf
), backported from 2.13
For a tour of this capability, consult this blog post by Lukas Rytz.
Standard library
- To permit compiling on JDK 15, avoid clash with new
CharSequence#isEmpty
method #9292- The clash is avoided by making
CharSequence
wrappers inPredef
non-implicit. - The change is binary compatible, but not source compatible. Call sites may need updating.
- The same change was included in Scala 2.13.4.
- The clash is avoided by making
Other changes
- Improves pattern matching exhaustivity warnings for patterns involving tuples
- Improves performance of building
immutable.{TreeMap,TreeSet}
by using mutation within the builder
For complete 2.12.13 change lists, see all merged PRs and all closed bugs.
Compatibility
As usual for our minor releases, Scala 2.12.13 is binary-compatible with the whole Scala 2.12 series.
The internal implementation of groupBy
has been optimized to reduce allocations. This can result in different ordering elements if you iterate the resulting Map
. The ordering of the returned map is not specified behaviour and should not be relied upon, for ordering sensitive use cases consider building a LinkedHashMap
or TreeMap
instead.
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 40 contributors, according to git shortlog -sn --no-merges HEAD ^v2.12.12 ^2.11.x
. Thank you Mike Skells, Jason Zaugg, Lukas Rytz, Dale Wijnand, A. P. Marki, Harrison Houghton, Darcy Shen, Seth Tisue, Ivano Pagano, João Ferreira, Ethan Atkins, NthPortal.
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):
- Bump the
scalaVersion
setting in your sbt-based project - Download a distribution from scala-lang.org
- Obtain JARs via Maven Central
Scala 2.13.4
Scala 2.13.4:
- Restores default global
ExecutionContext
to 2.12 behavior - Improves pattern matching, especially in exhaustivity checking
- Adds experimental support for consuming some libraries built by Scala 3
and more! Details below.
Concurrency
NOTE The following change affects parallelism and performance. If you use scala.concurrent.ExecutionContext.global
you may
want to adapt your code. (But note that Akka is unaffected, because it uses its own execution contexts.)
In 2.13.0 we made ExecutionContext.global
"opportunistic". This enabled "batching" of nested tasks
to execute on the same thread, avoiding an expensive context switch. That strategy requires
user code to wrap long-running and/or blocking tasks with blocking { ... }
to maintain parallel
execution.
For 2.13.4, we restore 2.12's default non-batching behavior, which is safer for arbitrary user code. Users wanting
increased performance may override the default, if they believe their code uses blocking
correctly.
We make that choice available via ExecutionContext.opportunistic
.
Using ExecutionContext.opportunistic
requires a bit of extra boilerplate, made necessary by binary
compatibility constraints on the standard library. Detailed instructions are in
ExecutionContext.global's Scaladoc.
Further detail: #9270/#9296/scala/bug#12089,
Pattern matching
The pattern matcher is now much better at warning you if a match isn't exhaustive.
The following types of matches no longer disable exhaustivity checking:
- guards (
case <pattern> if <condition> => ...
) #9140 - custom extractors (user-defined
unapply
orunapplySeq
) #9140/#9162 - unsealed types, if you opt in via
-Xlint
or-Xlint:strict-unsealed-patmat
#9140/#9299
Additionally,
- private classes are now treated as if sealed #9211
- singleton types no longer prematurely widen #9209
- tuples are handled properly #9147/#9163/#9147
New warnings reported can be resolved by:
- adding any missing cases
- in the case of complementary guards (e.g.
if n > 0
andif n <= 0
) by dropping the last guard - for custom extractors: demarking irrefutable extractors as such, by defining the return type as
Some
- for sealed types: marking traits or parent classes sealed, parent classes abstract, and classes final
- explicitly declaring the default case:
case x => throw new MatchError(x)
Otherwise, your options for suppressing warnings include:
- annotate the scrutinee with
@unchecked
, such as(foo: @unchecked) match { ... }
- disable exhaustivity checking in the presence of guards and custom extractors with
-Xnon-strict-patmat-analysis
- disable exhaustivity checking of unsealed types with
-Xlint:-strict-unsealed-patmat
- use
-Wconf
to suppress the warnings globally, with e.g.-Wconf:msg=match may not be exhaustive:i
Scala 3 interop
This release enables the Scala 2 compiler to consume some libraries built in Scala 3. #9109/#9293
The new capability is experimental. To enable it, add -Ytasty-reader
to your compiler options.
Not all Scala 3 built libraries are supported, because not all Scala 3 features can be supported.
The library author must stay within the supported subset.
For more details and caveats see the blog post Forward Compatibility for the Scala 3 Transition.
Standard library changes
- When compiling on JDK 15, avoid clash with new
CharSequence#isEmpty
method #9292- The clash is avoided by making
CharSequence
wrappers inPredef
non-implicit. - The change is binary compatible, but not source compatible. Call sites may need updating.
- The clash is avoided by making
- Make
LazyList.cons.apply
lazier #9095 - Make
MapView#values
preserve laziness #9090 - Make
ListBuffer
's iterator fail when the buffer is mutated #9174 - Un-deprecate useful
StringOps
methods, despite Unicode concerns #9246
Compiler changes
- Allow using
classOf
with object type (e.g.classOf[Foo.type]
) #9279 - Fix back-quoted constructor params with identical prefixes #9008
- Enable range positions (
-Yrangepos
) by default #9146
Other changes
Some changes that will also ship in 2.12.13 are also included in this release, most notably:
- When compiling on JDK 15, avoid clash with new
CharSequence#isEmpty
method #9292- To avoid the clash,
implicit
was removed fromPredef
's implicit conversions toSeqCharSequence
andArrayCharSequence
. - This change is binary compatible, but not source compatible. User code may need updating. See PR for details.
- To avoid the clash,
For complete 2.13.4 change lists, see all merged PRs and all closed bugs.
Compatibility
As usual for our minor releases, Scala 2.13.4 is binary-compatible with the whole Scala 2.13 series.
Upgrading from 2.12? Enable -Xmigration
while upgrading to request migration advice from the compiler.
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 40 contributors, according to git shortlog -sn --no-merges HEAD ^v2.13.3 ^2.12.x
. Thank you Jamie Thompson, Dale Wijnand, A. P. Marki, NthPortal, Lukas Rytz, Seth Tisue, Jason Zaugg, Georgi Krastev, Eugene Yokota, Martijn Hoekstra, Trey Cahill, Rado Buransky, Ergys Dona, Mike Skells, Greg Pfeil, Kazuhiro Sera, Mitsuhiro Shibuya, NagaChaitanya Vellanki, Sergei Petunin, Sébastien Doeraene, Takahashi Osamu, Viktor Klang, mwielocha, Nicolas Stucki, Jan Arne Sparka, Philippus Baalman, Glenn Liwanag, Rafał Sumisławski, Renato Cavalcanti, Sergei, nooberfsh, Dmitrii Naumenko, Simão Martins, counter2015, Jian Lan, Liu Fengyun, Kanishka, Julien Richard-Foy, Janek Bogucki, Björn Regnell.
Thanks to Lightbend for their continued sponsorship of the Scala core team’s efforts. Lightbend offers commercial support for Scala.
Scala 2.13 notes
The release notes for Scala 2.13.0 have important information applicable to the whole 2.13 series.
Obtaining Scala
Scala releases are available through a variety of channels, including (but not limited to):
- Bump the
scalaVersion
setting in your sbt-based project - Download a distribution from scala-lang.org
- Obtain JARs via Maven Central
Scala 2.12.12
Highlights
This release adds compiler support for scala-async and backports substantial performance improvements to collections.
- The compiler now includes a phase that performs the transformation for the async/await DSL for working with Scala Futures.
This transform is based on the macro implementation inscala-async
but has been substantially rewritten to fix some
long standing bugs, reduce the overhead of compilation and simplify the extension points for third party effect systems.
scala-async
1.0.0 will be released shortly building atop this phase. (#8816) immutable.{TreeSet, TreeMap}
are now based on a backport of the 2.13.x implementation. (#8749)- The builders for
immutable.{HashMap, HashSet}
are more efficient -- they now use mutation during building to reduce memory churn. (#8726)
Further highlights
- Minor improvements to compiler performance. The allocation rate of the compiler is reduced by 10%.
This is not a complete list of changes. For that, see all merged PRs and all closed bugs.
Compatibility
As usual for our minor releases, Scala 2.12.12 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 13 contributors, according to git shortlog -sn --no-merges v2.12.11..v2.12.12
. Thank you Jason Zaugg, Mike Skells, Lukas Rytz, Harrison Houghton, Adriaan Moors, Stefan Zeiger, Dale Wijnand, Seth Tisue, A. P. Marki, Eugene Yokota, NthPortal, Georgi Krastev and Martijn Hoekstra.
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):
- Bump the
scalaVersion
setting in your sbt-based project - Download a distribution from scala-lang.org
- Obtain JARs via Maven Central
Scala 2.13.3
Scala 2.13.3 is primarily a bugfix release.
It also includes:
- improvements to warnings and linting
- experimental
-Xasync
support
For more detail, read on.
Behavior changes
Symbol#toString
is nowSymbol(foo)
instead of the deprecated single-quote form'foo
(#8933)
Bugfixes
- Fix 2.13-only bug in Java collection converters that caused some operations to perform an extra pass (#9058)
- Fix 2.13.2 performance regression in
Vector
: restore special cases for small operands inappendedAll
andprependedAll
(#9036) - Increase laziness of
#::
forLazyList
(#8985) - Allow trailing backslash in string interpolators (#8942)
- Respect
@uncheckedVariance
in higher-kinded types (fixing 2.13.2 regression) (#8938)
Warnings and linting
- Deprecate auto-application of (non-Java-defined) methods with a single empty parameter list (#8833)
- The PR has instructions for suppressing the warning if it is unwanted
- Warn by default on mismatch of presence/absence of an empty parameter list when overriding (#8846)
-Xlint:nullary-override
is no longer accepted, since this now warns by default
- Discourage multi-argument infix syntax: lint applications (
x op (a, b)
), also lint operator-name definitions (#8951) - Fix
@nowarn
to use correct semantics for&
(#9032) - Make
-Wunused:imports
work again even when-Ymacro-annotations
is enabled (#8962) - Replace
-Wself-implicit
with-Xlint:implicit-recursion
(#9019) - Under
-Xsource:3
, disallow auto-eta-expansion of SAMs (#9049)
Experimental -Xasync
This successor to scala-async allows usage with other effect systems besides scala.concurrrent.Future
.
- Compiler support for scala-async; enable with
-Xasync
(#8816)
We will publish a blog post with more detail on this work by @retronym, building on his earlier collaboration with @phaller. In the meantime, see the PR description.
This feature will also be included in the 2.12.12 release.
Other changes
For complete 2.13.3 change lists, see all merged PRs and all closed bugs.
Some changes that will ship in 2.12.12 are also included in this release, most notably:
- Annotation parsing &
@Deprecated
(#8781) - Fix Scaladoc tool on JDK 11 with
-release 8
: exclude sig files inSymbol#sourceFile
(#8849)
Compatibility
As usual for our minor releases, Scala 2.13.3 is binary-compatible with the whole Scala 2.13 series.
Upgrading from 2.12? Enable -Xmigration
during upgrade to request migration advice from the compiler.
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 28 contributors, according to git shortlog -sn --no-merges HEAD ^v2.13.2 ^2.12.x
. Thank you A. P. Marki, Jason Zaugg, Seth Tisue, Dale Wijnand, Lukas Rytz, Georgi Krastev, David Barri, Eugene Yokota, Diego E. Alonso Blas, Akhtiam Sakaev, Glenn Liwanag, changvvb, Evgeny Ganchurin, Mike Skells, Martijn Hoekstra, yudedako, Anatolii Kmetiuk, Gilles Peiffer, JyotiSachdeva.ext, Karol Chmist, Kenji Yoshida, Lorenzo Costanzia di Costigliole, NthPortal, Steven Barnes, Sébastien Doeraene, Travis Brown, counter2015, nogurenn.
Thanks to Lightbend for their continued sponsorship of the Scala core team’s efforts. Lightbend offers commercial support for Scala.
Scala 2.13 notes
The release notes for Scala 2.13.0 have important information applicable to the whole 2.13 series.
Obtaining Scala
Scala releases are available through a variety of channels, including (but not limited to):
- Bump the
scalaVersion
setting in your sbt-based project - Download a distribution from scala-lang.org
- Obtain JARs via Maven Central