Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

Update dependency scala to v2.13.8 #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 20, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
scala (source) 2.11.8 -> 2.13.8 age adoption passing confidence

Release Notes

scala/scala

v2.13.8

Compare Source

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

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):

v2.13.7

Compare Source

The Scala team at Lightbend is pleased to announce the availability of Scala 2.13.7.

Align with Scala 3
JDK and Java compatibility
Android compatibility
  • Add ClassValueCompat to support systems without java.lang.ClassValue (such as Android) (#​9752 by @​nwk37011)
  • For Android compatibility, make Statics.releaseFence() also catch NoSuchMethodException for java.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
Other changes

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):

v2.13.6

Compare Source

The Scala 2 team at Lightbend is pleased to announce the availability of Scala 2.13.6.

Highlights
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 of with 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)

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):

v2.13.5

Compare Source

Scala 2.13.5

The Scala 2 team at Lightbend is pleased to announce the availability of Scala 2.13.5.

Highlights
Other changes

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):

v2.13.4

Compare Source

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 or unapplySeq) #​9140/#​9162
  • unsealed types, if you opt in via -Xlint or -Xlint:strict-unsealed-patmat #​9140/#​9299

Additionally,

New warnings reported can be resolved by:

  1. adding any missing cases
  2. in the case of complementary guards (e.g. if n > 0 and if n <= 0) by dropping the last guard
  3. for custom extractors: demarking irrefutable extractors as such, by defining the return type as Some
  4. for sealed types: marking traits or parent classes sealed, parent classes abstract, and classes final
  5. explicitly declaring the default case: case x => throw new MatchError(x)

Otherwise, your options for suppressing warnings include:

  1. annotate the scrutinee with @unchecked, such as (foo: @&#8203;unchecked) match { ... }
  2. disable exhaustivity checking in the presence of guards and custom extractors with -Xnon-strict-patmat-analysis
  3. disable exhaustivity checking of unsealed types with -Xlint:-strict-unsealed-patmat
  4. 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 in Predef non-implicit.
    • The change is binary compatible, but not source compatible. Call sites may need updating.
  • 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 from Predef's implicit conversions to SeqCharSequence and ArrayCharSequence.
    • This change is binary compatible, but not source compatible. User code may need updating. See PR for details.

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):

v2.13.3

Compare Source

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 now Symbol(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 in appendedAll and prependedAll (#​9036)
  • Increase laziness of #:: for LazyList (#​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 in Symbol#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):

v2.13.2

Compare Source

Scala 2.13.2 has:

  • a brand-new Vector implementation
  • configurable warnings
  • an improved REPL (now JLine 3 based)
  • bugfixes and more
Vector
  • Rewrite Vector (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.

Configurable warnings
  • Add -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.

REPL improvements
  • REPL: upgrade to JLine 3 (benefits include multi-line editing) (#​8036)
  • Default true -Yrepl-class-based and -Yuse-magic-imports (#​8748)
    • -Yrepl-class-based avoids deadlocks
    • -Yuse-magic-imports improves performance for long sessions
  • Improve REPL display of method types (#​8319)

Special 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.

Language changes
  • Unicode escapes are now ordinary escape sequences (not processed early) (#​8282)
Compiler fixes
  • Plug many variance holes (in higher-kinded types, refined types, and private inner classes) (#​8545)
  • Fix variance handling for parameterized type aliases (#​8651)
  • Exclude universal members (getClass, toString, etc) from root module import (#​8541)
  • Matching strings makes switches in bytecode (#​8451)
Deprecations
  • Deprecate eta-expansion, via trailing underscore, of methods with no argument lists (#​8836)
  • Deprecate nested class shadowing in "override" position (#​8705)
  • Deprecate numeric conversions that lose precision (e.g., Long to Double) (#​8679)
  • Deprecate numeric widening of numeric literals which are not representable with Float/Double (#​8757)
  • Deprecate old-style constructor syntax (#​8591)
Improvements from the future
  • There is no more -Xsource:2.14, only -Xsource:3 (#​8812)
  • Allow infix operators at start of line (under -Xsource:3) (#​8419)
  • Case class copy and apply inherit access modifiers from constructor (under -Xsource:3) (#​7702)
Other fixes and improvements
  • Un-deprecate default floating point Orderings; issue migration warning instead under -Xmigration (#​8721)
  • Support macro annotation expansions in -Wmacros:MODE (#​8799)
  • Scaladoc can now link to Javadoc for the Java standard library for JDK versions 9 and up (overridable with new -jdk-api-doc-base flag) (#​8663)
  • sys.env now throws on null environment variable (#​8579)
  • Make the hashcode method ## 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:

  • Make optimizer work on JDK 13+ (#​8676).
Compatibility

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.

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 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.

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):

v2.13.1

Compare Source

Scala 2.13.1 is primarily a bug fix release that fixes several regressions in 2.13.0.

Collection-related regressions
  • Revert Stream.Cons to the 2.12 encoding (#​8354)
  • Don't rebuild scala.Seq to drop elems in unapplySeq (#​8340)
  • Blacken subtrees where necessary in RedBlackTree.take (#​8287)
  • Iterator#flatMap#hasNext calls outer#hasNext 1 time, not 2-3 times (#​8220)
  • s.c.Map#values returns a strict Iterable rather than a View (#​8195)
  • Vector.from(ArraySeq) copies elems rather than reusing unsafeArray (#​8194)
  • Fix mutable.HashSet.addAll: remove redundant call to super method (#​8192)
  • Fix mutable.ArraySeq.ofChar#addString (#​8176)
  • Fix HashMap#mapValuesInPlace (#​8421)
Other regressions
  • Avoid spurious "illegal cyclic reference" errors (#​8382)
  • Stabilize args of apply (#​8202)
  • Reject incomplete implicit dictionaries (#​8201)
  • Process exit code on script errors (#​8169)
  • Fix type inference involving wildcards (#​8129)
Other bug fixes and improvements
  • Extend the Gradle / sbt 0.13 leniency to Windows (#​8408)
  • Avoid unnecessary toSeq conversions in Seq methods (#​8374)
  • Avoid memory leaks in Stream methods (#​8367)
  • Precompile -i files for script runner (#​8349)
  • Stop warning on higher-kinded usage without -language:higherKinds (#​8348)
  • Simplify reporters (#​8338)
  • More efficient ArraySeq iteration (#​8300)
  • Enable hyperlinking to Java docs (#​8284)
  • Parent implicitNotFound message is supplemental (#​8280)
  • Add protected and private visibility filters to scaladoc (#​8183)
  • Fix vulnerability in jQuery used in ScalaDoc (#​8179)
  • Synthesize a PartialFunction from function literal (#​8172)
  • Fix parsing of try (#​8071)
  • Support emitting Java 9 bytecode by adding "-target:9" (#​8060)
  • Deprecate mutable.MultiMap (#​8005)
  • Add syntactic sugar for if(_) (#​7707)
  • A foreign definition induces ambiguity (#​7609)

This is not a complete list of changes. For that, see all merged PRs and all closed bugs.

Compatibility

Upgrading from 2.12? Enable -Xmigration while upgrading to request migration advice from the compiler.

As usual for our minor releases, Scala 2.13.1 is binary-compatible with the whole Scala 2.13 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 43 contributors, according to git shortlog -sn --no-merges HEAD ^v2.13.0 ^upstream/2.12.x. Thank you Som Snytt, Lukas Rytz, Aaron S. Hawley, exoego, Jason Zaugg, Dale Wijnand, Seth Tisue, Stefan Zeiger, NthPortal, Martijn Hoekstra, Jasper Moeys, Josh Lemer, Isaac Levy, Harrison Houghton, Benjamin Kurczyk, redscarf, 杨博 (Yang Bo), Adriaan Moors, Anatolii Kmetiuk, Eugene Yokota, Georgi Krastev, Miles Sabin, Philippus, xuwei-k, Magnolia.K, Mike Skells, 2efPer, Mitesh Aghera, NomadBlacky, Guillaume Martres, Odd Möller, yui-knk, Georg, Flash Sheridan, Diego E. Alonso Blas, Sébastien Doeraene, Atsushi Araki, psilospore, Akhtyam Sakaev, wanying.chan, Li Haoyi, M.Shibuya, Kota Mizushima.

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):

v2.13.0

Compare Source

We are delighted to announce the availability of Scala 2.13.0!

Release summary

2.13 improves Scala in the following areas:

  • Collections: Standard library collections have been overhauled for simplicity, performance, and safety. This is the centerpiece of the release.
  • Standard library: Future is faster and more robust. Elsewhere, useful classes and methods have been added.
  • Language: Literal types, partial unification, by-name implicits, more.
  • Compiler: 5-10% faster, deterministic output, improved optimizer.

To learn more, read on.

Collections redesign

Standard library collections have been overhauled for simplicity, performance, and safety.

This is the centerpiece of the release.

Most ordinary code that used the old collections will continue to work as-is, except as detailed below.

The most important collections changes are:

  • Simpler method signatures
    • No more CanBuildFrom. Transformation methods no longer take an implicit CanBuildFrom parameter.
    • The resulting library is easier to understand (in code, Scaladoc, and IDE code completion).
    • It also makes user code compile faster.
    • A new BuildFrom implicit is used in a handful of places that need it.
  • Simpler type hierarchy
    • No more Traversable and TraversableOnce.
      • They remain only as deprecated aliases for Iterable and IterableOnce.
    • Parallel collections are now a separate module.
      • As a result, GenSeq, GenTraversableOnce, et al are gone.
  • Immutable scala.Seq
    • Seq is now an alias for collection.immutable.Seq
      • Before, it was an alias for the possibly-mutable collection.Seq.
    • This also changes the type of varargs in methods and pattern matches.
    • Arrays passed as varargs are defensively copied. (#​6970)
  • Simplified views that work
    • collection.Views have been vastly simplified and should now work reliably.
  • Alphanumeric method names
    • All symbolic operators are now just aliases for descriptive alphanumeric method names.
    • Examples: ++ (alias for concat), +: (alias for prepended), :+ (alias for appended), and so on.
  • New, faster HashMap/Set implementations
    • Both immutable (d5ae93e) and mutable (#​7348) versions were completely replaced.
    • They substantially outperform the old implementations in most scenarios.
    • The mutable versions now perform on par with the Java standard library's implementations.
  • New concrete collections
  • New abstract collection type SeqMap

Additional collections changes:

  • New to(Collection) method
    • Replaces old to[Collection] method.
    • The argument is the companion object of the desired collection type, for example .to(Vector).
    • The API change enables support for all collection types (including Map, BitSet, et al).
  • No more collection.breakOut
    • It required CanBuildFrom, which no longer exists.
    • To avoid constructing intermediate collections, use .view and .to(Collection) instead.
  • List and Vector are safer
    • They now offer safe publication under the Java Memory Model, using releaseFence (#​6425)
  • Added in-place operations on mutable collections
    • filterInPlace, mapInPlace, flatMapInPlace, and others.
    • These methods update the original collection in-place, rather than creating a new collection to hold the results.
  • Java interop has moved
    • Extension methods for Scala are now in scala.jdk
    • Explicit converters for Java are in scala.jdk.javaapi
    • The reorganization centralizes all to-and-from-Java converters, including both collection and non-collection types, in a single package.
    • Added Stepper, which is like Iterator but supports efficient unboxed iteration, Java interop. (#​7458)
  • Collection serialization has changed
    • Collections now use the serialization proxy pattern uniformly whenever possible. (#​6676, #​7624, scala-dev#​562, sbt/sbt#​89)
    • In some classloading environments, notably sbt's non-forked test execution, code changes may be needed.
  • Added .unfold
    • This allows constructing a collection or iterator from an initial element and a repeated Option-returning operation, terminating on None.
    • This was added collection companion objects and to Iterator (#​6851)
  • Added .lengthIs/.sizeIs and .sizeCompare
    • These allow fluent size comparisons without traversing the whole collection (#​6950, #​6758)
    • Examples: xs.sizeIs < 10, xs.sizeIs == 2
  • Error-prone Map methods deprecated
    • Deprecated .filterKeys and .mapValues (#​7014)
    • Instead, use the new methods of the same names on MapView (e.g. .view.filterKeys)
  • Added .lazyZip
  • Added .tapEach method
    • This allows inserting side-effects in a chain of method calls on a collection or view. (#​7124)
  • Added .updatedWith and updateWith methods to Maps
    • updatedWith is on immutable.Map, updateWith is on mutable.Map. (#​7320, #​7517)
    • These methods allow modifying a map entry based on its current value.
  • Added .maxOption, .minOption, .maxByOption, .minByOption
    • These methods safely handle the empty case. (#​6574)
  • Deprecated symbolic methods with multiple arguments
    • Such methods may be disallowed entirely in a future Scala. (#​6719)
  • Adding custom collections and operations works very differently
    • See documentation links below.

To learn more about the new APIs and how to adapt your code, consult:


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Mend Renovate. View repository job log here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants