Scala 2.13.11
The Scala team at Lightbend is pleased to announce Scala 2.13.11.
The following changes are highlights of this release:
Collections
- Faster
Vector
concatenation (#10159 by @ansvonwa) - New
LinkedHashMap
/LinkedHashSet
implementation (#10221 by @liang3zy22)
Compatibility
- Support JDK 20 and 21 by upgrading to ASM 9.5 (#10363, #10184 by @Philippus)
- Fix crash reading JDK 21 classfiles (#10397)
- Support Java 17
sealed
in Java sources and classfiles (#10348, #10105 by @som-snytt) - Support Scala 3.3 in TASTy reader (#10299 by @bishabosha)
Align with Scala 3
- Accept
implicit _
,implicit (x: Int)
in lambdas, like Scala 3 does (#10327 by @som-snytt) - Deprecate infix type args, as they are dropped in Scala 3 (#10255 by @som-snytt)
- Allow eta-expansion of methods with dependent types (#10166)
- Abstract parent
copy
does not suspend casecopy
(#10085 by @som-snytt) - Don't GLB binders of type patterns, use the type directly (#10247)
- Under
-Xsource:3
, warn that inherited members no longer take precedence over outer definitions in Scala 3 (#10220, #10339) - Under
-Xsource:3
, adjust 2.13.9 change to ignore override type for whitebox macro expansion (#10188 by @som-snytt) - Under
-Xsource:3
, use narrowest type for pt of override (#10198 by @som-snytt) - Under
-Xsource:3
, warn about change to parenless lambda parens (#10320 by @som-snytt)
Lints and warnings
- Lint select from
Unit
, orInt
that incurs widening (#10372 by @som-snytt) - Lint for integral divisions that are widened to a float (#10369 by @som-snytt)
- Lint if args adapted to
Unit
and discarded (#10150 by @som-snytt) - Warn that implicit should have explicit type (#10083 by @som-snytt)
Other notable changes
- Disallow mixins where super calls bind to vals (#10268)
- Make scalac's argument-file processing more like javac's in handling spaces and line breaks (#10319 by @som-snytt)
- Bump JLine and JNA versions (#10318)
javabootclasspath
supersedesjrt
(#10336 by @som-snytt)- Report total errors on stderr (#10272 by @som-snytt)
- Fix pathologically slow compilation of some pattern matches since 2.13.7 (#10258 by @KisaragiEffective)
- Provide
equals
andhashCode
onIterableWrapper
again (fixing 2.13.9 regression) (#10205 by @som-snytt) - Improvements to
-Vimplicits
; errors now show complete implicit search tree (#9944 by @tribbloid) -Vprint
defaults to-Vprint:typer
; phases may be prefixed with~
to mean "before and after" (#10173 by @som-snytt)
2.13.11 also includes the changes from Scala 2.12.18. (A few of the most significant, such as those involving JDK 20 and 21 compatibility, are listed above.)
For the complete 2.13.11 change lists, see all merged PRs and all closed bugs.
Known issues
A few regressions have been discovered:
- Exhaustivity checker emits spurious warning when matching on Java enum type (2.13.11 regression) (scala/bug#12800)
- Duplicated
@Deprecated
annotations when extending Java interface with deprecated default method causejava.lang.annotation.AnnotationFormatError
when accessed via Java reflection (2.13.11 regression) (scala/bug#12799)
We'll address these in Scala 2.13.12.
Compatibility
As usual for our minor releases, Scala 2.13.11 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.
We especially acknowledge and thank A. P. Marki, also known as Som Snytt, who is responsible for a large share of the improvements in this release.
This release was brought to you by 28 contributors, according to git shortlog -sn --no-merges @ ^v2.13.10 ^2.12.x
. Thank you A. P. Marki, Lukas Rytz, Seth Tisue, Anselm von Wangenheim, Scala Steward, Liang Yan, Jamie Thompson, jxnu-liguobin, AminMal, Jason Zaugg, Kenji Yoshida, Rituraj, ashish, Chris Kipp, Dale Wijnand, Francesco Kriegel, Georgi Chochov, Goooler, João Costa, Kisaragi Marine, Rafał Sumisławski, Ruslans Tarasovs, Simon R, Sébastien Doeraene, Tomasz Godzik, Zhang Zhipeng, danarmak, hepin.p.
Thanks to Lightbend for their continued sponsorship of the Scala 2 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 project - Bump the
using scala
setting in your Scala-CLI project - Download a distribution from scala-lang.org
- Obtain JARs via Maven Central