Scala 2 compiler and standard library. Bugs at https://github.com/scala/bug; Scala 3 at https://github.com/scala/scala3
The Scala team at Lightbend is pleased to announce the availability of Scala 2.13.7.
import x.{*, given}
under -Xsource:3
(#9724 by @smarter)case
in pattern bindings even without -Xsource:3
(#9721 by @smarter)StringConcatFactory
for string concatenation on JDK 9+ (#9556 by @harpocrates)ClassValueCompat
to support systems without java.lang.ClassValue
(such as Android) (#9752 by @nwk37011)Statics.releaseFence()
also catch NoSuchMethodException
for java.lang.invoke.VarHandle.releaseFence()
call (#9739 by @nwk37011)Future#{zip,zipWith,traverse,sequence}
by making them fail fast regardless of ordering (#9655 by @lihaoyi)ArrayBuffer
's iterator fail fast when buffer is mutated (#9258 by @NthPortal)ArrayOps
bugs (by avoiding ArraySeq#array
, which does not guarantee element type) (#9641 by @som-snytt)IterableOps.toIterable
(#9774 by @lrytz)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.
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.
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.
The release notes for Scala 2.13.0 have important information applicable to the whole 2.13 series.
Scala releases are available through a variety of channels, including (but not limited to):
scalaVersion
setting in your sbt-based projectThis release improves compatibility with JDK 17 and 18:
IllegalArgumentException
in JDK 17+ for lambda deserialization (#9676)and facilitates cross-building with Scala 3 with:
case
in pattern bindings even without -Xsource:3
(#9740 by @smarter)import x.{*, given}
under -Xsource:3
(#9736 by @smarter)-Xsource:3
) (#9665 by @som-snytt)For complete 2.12.15 change lists, see all merged PRs and all closed bugs.
As usual for our minor releases, Scala 2.12.15 is binary-compatible with the whole Scala 2.12 series.
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.
The release notes for Scala 2.12.0 have important information applicable to the whole 2.12 series.
Scala releases are available through a variety of channels, including (but not limited to):
scalaVersion
setting in your sbt-based project-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)TaskSupport
through operations of parallel collections. (#9529, backport of fix for scala/scala-parallel-collections#152, by @lrytz)For complete 2.12.14 change lists, see all merged PRs and all closed bugs.
As usual for our minor releases, Scala 2.12.14 is binary-compatible with the whole Scala 2.12 series.
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.
The release notes for Scala 2.12.0 have important information applicable to the whole 2.12 series.
Scala releases are available through a variety of channels, including (but not limited to):
scalaVersion
setting in your sbt-based projectThe Scala 2 team at Lightbend is pleased to announce the availability of Scala 2.13.6.
-Vimplicits
and -Vtype-diffs
flags (#7785)s"\""
and s"$""
(#8830 by @eed3si9n and #9536 by @martijnhoekstra)BigInt
implementation (#9628) by @denisrosset
private[this]
members in override checking (#9542)_root_
(#9482) by @som-snytt
ConstantAnnotation
(9336) by @BalmungSan
-Xsource:3
(#9602)&
instead of with
in types under -Xsource:3
(#9594)-Xsource:3
(#9584)-Xsource:3
(#9582)-Xsource:3
(#9580)?
as wildcard marker under -Xsource:3
(#9560)-Xsource:3
(#9558)+_
and -_
in types as identifiers under -Xsource:3
to support Scala 3.2 placeholder syntax (#9605)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.
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.
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.
The release notes for Scala 2.13.0 have important information applicable to the whole 2.13 series.
Scala releases are available through a variety of channels, including (but not limited to):
scalaVersion
setting in your sbt-based projectThe Scala 2 team at Lightbend is pleased to announce the availability of Scala 2.13.5.
-target
support JVM 13, 14, 15, 16, and 17 (#9489, #9481)@nowarn
annotations from generated code, for forwards compatibility at compile-time (#9491)-Wunused:synthetics
or -Wunused:params
) (#9346) — thank you @som-snytt!ConstantAnnotation
s (#9379)Map
wrappers handle nulls according to put
/remove
contract (#9344) — thank you @som-snytt!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.
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.
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.
The release notes for Scala 2.13.0 have important information applicable to the whole 2.13 series.
Scala releases are available through a variety of channels, including (but not limited to):
scalaVersion
setting in your sbt-based project@nowarn
and -Wconf
), backported from 2.13For a tour of this capability, consult this blog post by Lukas Rytz.
CharSequence#isEmpty
method #9292
CharSequence
wrappers in Predef
non-implicit.immutable.{TreeMap,TreeSet}
by using mutation within the builderFor complete 2.12.13 change lists, see all merged PRs and all closed bugs.
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.
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.
The release notes for Scala 2.12.0 have important information applicable to the whole 2.12 series.
Scala releases are available through a variety of channels, including (but not limited to):
scalaVersion
setting in your sbt-based projectScala 2.13.4:
ExecutionContext
to 2.12 behaviorand more! Details below.
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,
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:
case <pattern> if <condition> => ...
) #9140
unapply
or unapplySeq
) #9140/#9162
-Xlint
or -Xlint:strict-unsealed-patmat
#9140/#9299
Additionally,
New warnings reported can be resolved by:
if n > 0
and if n <= 0
) by dropping the last guardSome
case x => throw new MatchError(x)
Otherwise, your options for suppressing warnings include:
@unchecked
, such as (foo: @unchecked) match { ... }
-Xnon-strict-patmat-analysis
-Xlint:-strict-unsealed-patmat
-Wconf
to suppress the warnings globally, with e.g. -Wconf:msg=match may not be exhaustive:i
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.
CharSequence#isEmpty
method #9292
CharSequence
wrappers in Predef
non-implicit.LazyList.cons.apply
lazier #9095
MapView#values
preserve laziness #9090
ListBuffer
's iterator fail when the buffer is mutated #9174
StringOps
methods, despite Unicode concerns #9246
classOf
with object type (e.g. classOf[Foo.type]
) #9279
-Yrangepos
) by default #9146
Some changes that will also ship in 2.12.13 are also included in this release, most notably:
CharSequence#isEmpty
method #9292
implicit
was removed from Predef
's implicit conversions to SeqCharSequence
and ArrayCharSequence
.For complete 2.13.4 change lists, see all merged PRs and all closed bugs.
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.
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.
The release notes for Scala 2.13.0 have important information applicable to the whole 2.13 series.
Scala releases are available through a variety of channels, including (but not limited to):
scalaVersion
setting in your sbt-based projectThis release adds compiler support for scala-async and backports substantial performance improvements to collections.
scala-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)immutable.{HashMap, HashSet}
are more efficient -- they now use mutation during building to reduce memory churn. (#8726)This is not a complete list of changes. For that, see all merged PRs and all closed bugs.
As usual for our minor releases, Scala 2.12.12 is binary-compatible with the whole Scala 2.12 series.
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.
The release notes for Scala 2.12.0 have important information applicable to the whole 2.12 series.
Scala releases are available through a variety of channels, including (but not limited to):
scalaVersion
setting in your sbt-based projectScala 2.13.3 is primarily a bugfix release.
It also includes:
-Xasync
supportFor more detail, read on.
Symbol#toString
is now Symbol(foo)
instead of the deprecated single-quote form 'foo
(#8933)Vector
: restore special cases for small operands in appendedAll
and prependedAll
(#9036)#::
for LazyList
(#8985)@uncheckedVariance
in higher-kinded types (fixing 2.13.2 regression) (#8938)-Xlint:nullary-override
is no longer accepted, since this now warns by defaultx op (a, b)
), also lint operator-name definitions (#8951)@nowarn
to use correct semantics for &
(#9032)-Wunused:imports
work again even when -Ymacro-annotations
is enabled (#8962)-Wself-implicit
with -Xlint:implicit-recursion
(#9019)-Xsource:3
, disallow auto-eta-expansion of SAMs (#9049)-Xasync
This successor to scala-async allows usage with other effect systems besides scala.concurrrent.Future
.
-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.
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:
@Deprecated
(#8781)-release 8
: exclude sig files in Symbol#sourceFile
(#8849)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.
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.
The release notes for Scala 2.13.0 have important information applicable to the whole 2.13 series.
Scala releases are available through a variety of channels, including (but not limited to):
scalaVersion
setting in your sbt-based projectScala 2.13.2 has:
Vector
implementationVector
(using "radix-balanced finger tree vectors"), for performance (#8534)Small vectors are now more compactly represented. Some operations are now drastically faster on large vectors. A few operations may be a little slower.
Kudos to @szeiger for this work.
-Wconf
flag for configurable warnings, @nowarn
annotation for local suppression (#8373)Note that scala-collection-compat 2.1.6 (or newer) provides @nowarn
for cross-built projects (as a no-op on 2.11 and 2.12).
Special thanks to Roman Janusz (@ghik), whose silencer plugin was the basis for this work.
-Yrepl-class-based
and -Yuse-magic-imports
(#8748)
-Yrepl-class-based
avoids deadlocks-Yuse-magic-imports
improves performance for long sessionsSpecial thanks to @som-snytt for spearheading the JLine 3 upgrade.
We are tracking JLine-related improvements and regressions here. There some known regressions in some less-vital features and behaviors; we plan to address these in future 2.13.x releases.
getClass
, toString
, etc) from root module import (#8541)Long
to Double
) (#8679)Float
/Double
(#8757)-Xsource:2.14
, only -Xsource:3
(#8812)-Xsource:3
) (#8419)-Xsource:3
) (#7702)Ordering
s; issue migration warning instead under -Xmigration
(#8721)-Wmacros:MODE
(#8799)-jdk-api-doc-base
flag) (#8663)sys.env
now throws on null environment variable (#8579)##
have no parameter list (instead of a single empty one) (#8814)This is not a complete list of changes. For that, see all merged PRs and all closed bugs.
2.13.2 also includes the changes in Scala 2.12.11, most notably:
As usual for our minor releases, Scala 2.13.2 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.
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 45 contributors, according to git shortlog -sn --no-merges HEAD ^v2.13.1 ^2.12.x
. Thank you Som Snytt, Jason Zaugg, Lukas Rytz, Dale Wijnand, Seth Tisue, Diego E. Alonso Blas, Georgi Krastev, Martijn Hoekstra, Eugene Yokota, Harrison Houghton, Stefan Zeiger, NthPortal, Anatolii, Linas Medžiūnas, Aaron S. Hawley, Guillaume Martres, Josh Lemer, Sébastien Doeraene, Jasper Moeys, Julien Truffaut, Oskar Haarklou Veileborg, Lucas Cardoso, Andrew Valencik, Adriaan Moors, yudedako, Steven Barnes, Brian Wignall, Ausmarton Zarino Fernandes, Oguz Albayrak, Philippus, Viktor Klang, Yang Bo, bnyu, psilospore, sinanspd, wholock, Jamie Thompson, Hamza Meknassi, Janek Bogucki, Flash Sheridan, Fabian Page, Kenji Yoshida, Denis Rosset, Lucas S Cardoso, Chris Birchall.
Thanks to Lightbend for their continued sponsorship of the Scala core team’s efforts. Lightbend offers commercial support for Scala.
The release notes for Scala 2.13.0 have important information applicable to the whole 2.13 series.
Scala releases are available through a variety of channels, including (but not limited to):
scalaVersion
setting in your sbt-based project