The Scala team at Akka is pleased to announce Scala 2.13.18.
This release fixes several regressions from 2.13.17. It is compatible with JDKs 8 to 26.
The following are highlights of this release:
Restore traditional behavior when passing a null array to a varargs method in Scala 3
When passing an array as "sequence argument" to a varargs method, method(arg: _*), the array is converted to a Seq.
In Scala 3 (the syntax is method(arg*)), this conversion is done by the ScalaRunTime.wrapXArray methods.
These methods were simplified in 2.13.17, which changed the semantics of a method((null: Array[T])*) invocation.
#11165 restores the previous null handling semantics.
Fixes for false positive warnings
- #11162 reverts
-Xlint:infer-anyto the behavior of 2.13.16.
The lint was extended in 2.13.17 to warn wheneverNothingis inferred for a higher-kinded type parameterT[_].
The new warning showed up in many projects: often as a false positive, but even the "true" positive warning was considered unhelpful / spurious in real-world use cases. - Fix false positive unused warning for private val used in annotation #11149
- Fix false positive
-Xlint:universal-methodswarning in synthetic code #11159
JDK 26 support
- Compiling on Java 26 is now supported #11179
New @uncheckedOverride annotation
The new @uncheckedOverride annotation is equivalent to the override keyword, except that it allows to override nothing. This is useful when cross-building: a method may override or not, depending on the version of some dependency. #11179
GPG key change
This release is signed with a different GPG key than previous Scala 2 releases. The new key is the same one used by Scala 3. #11158
Other notable changes
- On Java 25+,
sbt runnow detects main methods that are non-static, non-public or without parameter list #11137 - Regression fix: 2.13.17 was accidentally dropping certain annotations #11173
- Deprecate the
-Xmain-classcompiler flag #11156
More changes
For the complete 2.13.18 change lists, see all merged PRs and all closed bugs.
Compatibility
As usual for our minor releases, Scala 2.13.18 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.17 ^2.12.x. Thank you Lukas Rytz, A. P. Marki, Scala Steward, Seth Tisue, NthPortal, Evgeny Vereshchagin, Kenji Yoshida, Philippus Baalman.
Thanks to Akka for their continued sponsorship of the Scala 2 team’s efforts. Akka 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
using scalasetting in your Scala-CLI project - Bump the
scalaVersionsetting in your sbt or Mill project - Download a distribution from scala-lang.org
- Obtain JARs via Maven Central