scala/scala
### [`v2.13.3`](https://togithub.com/scala/scala/releases/v2.13.3)
[Compare Source](https://togithub.com/scala/scala/compare/v2.13.2...v2.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 now `Symbol(foo)` instead of the deprecated single-quote form `'foo` ([#8933](https://togithub.com/scala/scala/pull/8933))
##### Bugfixes
- Fix 2.13-only bug in Java collection converters that caused some operations to perform an extra pass ([#9058](https://togithub.com/scala/scala/pull/9058))
- Fix 2.13.2 performance regression in `Vector`: restore special cases for small operands in `appendedAll` and `prependedAll` ([#9036](https://togithub.com/scala/scala/pull/9036))
- Increase laziness of `#::` for `LazyList` ([#8985](https://togithub.com/scala/scala/pull/8985))
- Allow trailing backslash in string interpolators ([#8942](https://togithub.com/scala/scala/pull/8942))
- Respect `@uncheckedVariance` in higher-kinded types (fixing 2.13.2 regression) ([#8938](https://togithub.com/scala/scala/pull/8938))
##### Warnings and linting
- Deprecate auto-application of (non-Java-defined) methods with a single empty parameter list ([#8833](https://togithub.com/scala/scala/pull/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](https://togithub.com/scala/scala/pull/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](https://togithub.com/scala/scala/pull/8951))
- Fix `@nowarn` to use correct semantics for `&` ([#9032](https://togithub.com/scala/scala/pull/9032))
- Make `-Wunused:imports` work again even when `-Ymacro-annotations` is enabled ([#8962](https://togithub.com/scala/scala/pull/8962))
- Replace `-Wself-implicit` with `-Xlint:implicit-recursion` ([#9019](https://togithub.com/scala/scala/pull/9019))
- Under `-Xsource:3`, disallow auto-eta-expansion of SAMs ([#9049](https://togithub.com/scala/scala/pull/9049))
##### Experimental `-Xasync`
This successor to [scala-async](https://togithub.com/scala/scala-async) allows usage with other effect systems besides `scala.concurrrent.Future`.
- Compiler support for scala-async; enable with `-Xasync` ([#8816](https://togithub.com/scala/scala/pull/8816))
We will publish a blog post with more detail on this work by [@retronym](https://togithub.com/retronym), building on his earlier collaboration with [@phaller](https://togithub.com/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](https://togithub.com/scala/scala/pulls?q=is%3Amerged%20milestone%3A2.13.3) and [all closed bugs](https://togithub.com/scala/bug/issues?utf8=%E2%9C%93&q=is%3Aclosed+milestone%3A2.13.3).
Some changes that will ship in 2.12.12 are also included in this release, most notably:
- Annotation parsing & `@Deprecated` ([#8781](https://togithub.com/scala/scala/pull/8781))
- Fix Scaladoc tool on JDK 11 with `-release 8`: exclude sig files in `Symbol#sourceFile` ([#8849](https://togithub.com/scala/scala/pull/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](https://www.lightbend.com/scala) for their continued sponsorship of the Scala core team’s efforts. Lightbend offers [commercial support](https://www.lightbend.com/lightbend-platform-subscription) for Scala.
#### Scala 2.13 notes
The [release notes for Scala 2.13.0](https://togithub.com/scala/scala/releases/v2.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](http://scala-lang.org/download/2.13.3.html)
- Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.13.3%22)
### [`v2.13.2`](https://togithub.com/scala/scala/releases/v2.13.2)
[Compare Source](https://togithub.com/scala/scala/compare/v2.13.1...v2.13.2)
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](https://togithub.com/scala/scala/pull/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](https://togithub.com/szeiger) for this work.
##### Configurable warnings
- Add `-Wconf` flag for configurable warnings, `@nowarn` annotation for local suppression ([#8373](https://togithub.com/scala/scala/pull/8373))
Note that [scala-collection-compat 2.1.6](https://togithub.com/scala/scala-collection-compat/releases/tag/v2.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](https://togithub.com/ghik)), whose [silencer](https://togithub.com/ghik/silencer) plugin was the basis for this work.
##### REPL improvements
- REPL: upgrade to JLine 3 (benefits include multi-line editing) ([#8036](https://togithub.com/scala/scala/pull/8036))
- Default true `-Yrepl-class-based` and `-Yuse-magic-imports` ([#8748](https://togithub.com/scala/scala/pull/8748))
- `-Yrepl-class-based` avoids deadlocks
- `-Yuse-magic-imports` improves performance for long sessions
- Improve REPL display of method types ([#8319](https://togithub.com/scala/scala/pull/8319))
Special thanks to [@som-snytt](https://togithub.com/som-snytt) for spearheading the JLine 3 upgrade.
We are tracking JLine-related improvements and regressions [here](https://togithub.com/scala/scala-dev/issues?q=is%3Aissue+is%3Aopen+label%3At%3Ajline3). 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](https://togithub.com/scala/scala/pull/8282))
##### Compiler fixes
- Plug many variance holes (in higher-kinded types, refined types, and private inner classes) ([#8545](https://togithub.com/scala/scala/pull/8545))
- Fix variance handling for parameterized type aliases ([#8651](https://togithub.com/scala/scala/pull/8651))
- Exclude universal members (`getClass`, `toString`, etc) from root module import ([#8541](https://togithub.com/scala/scala/pull/8541))
- Matching strings makes switches in bytecode ([#8451](https://togithub.com/scala/scala/pull/8451))
##### Deprecations
- Deprecate eta-expansion, via trailing underscore, of methods with no argument lists ([#8836](https://togithub.com/scala/scala/pull/8836))
- Deprecate nested class shadowing in "override" position ([#8705](https://togithub.com/scala/scala/pull/8705))
- Deprecate numeric conversions that lose precision (e.g., `Long` to `Double`) ([#8679](https://togithub.com/scala/scala/pull/8679))
- Deprecate numeric widening of numeric literals which are not representable with `Float`/`Double` ([#8757](https://togithub.com/scala/scala/pull/8757))
- Deprecate old-style constructor syntax ([#8591](https://togithub.com/scala/scala/pull/8591))
##### Improvements from the future
- There is no more `-Xsource:2.14`, only `-Xsource:3` ([#8812](https://togithub.com/scala/scala/pull/8812))
- Allow infix operators at start of line (under `-Xsource:3`) ([#8419](https://togithub.com/scala/scala/pull/8419))
- Case class copy and apply inherit access modifiers from constructor (under `-Xsource:3`) ([#7702](https://togithub.com/scala/scala/pull/7702))
##### Other fixes and improvements
- Un-deprecate default floating point `Ordering`s; issue migration warning instead under `-Xmigration` ([#8721](https://togithub.com/scala/scala/pull/8721))
- Support macro annotation expansions in `-Wmacros:MODE` ([#8799](https://togithub.com/scala/scala/pull/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](https://togithub.com/scala/scala/pull/8663))
- `sys.env` now throws on null environment variable ([#8579](https://togithub.com/scala/scala/pull/8579))
- Make the hashcode method `##` have no parameter list (instead of a single empty one) ([#8814](https://togithub.com/scala/scala/pull/8814))
This is not a complete list of changes. For that, see [all merged PRs](https://togithub.com/scala/scala/pulls?q=is%3Amerged%20milestone%3A2.13.2) and [all closed bugs](https://togithub.com/scala/bug/issues?utf8=%E2%9C%93&q=is%3Aclosed+milestone%3A2.13.2).
2.13.2 also includes the changes in [Scala 2.12.11](https://togithub.com/scala/scala/releases/tag/v2.12.11), most notably:
- Make optimizer work on JDK 13+ ([#8676](https://togithub.com/scala/scala/pull/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](https://www.lightbend.com/scala) for their continued sponsorship of the Scala core team’s efforts. Lightbend offers [commercial support](https://www.lightbend.com/lightbend-platform-subscription) for Scala.
#### Scala 2.13 notes
The [release notes for Scala 2.13.0](https://togithub.com/scala/scala/releases/v2.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](http://scala-lang.org/download/2.13.2.html)
- Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.13.2%22)
### [`v2.13.1`](https://togithub.com/scala/scala/releases/v2.13.1)
[Compare Source](https://togithub.com/scala/scala/compare/v2.13.0...v2.13.1)
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](https://togithub.com/scala/scala/pull/8354))
- Don't rebuild `scala.Seq` to drop elems in `unapplySeq` ([#8340](https://togithub.com/scala/scala/pull/8340))
- Blacken subtrees where necessary in `RedBlackTree.take` ([#8287](https://togithub.com/scala/scala/pull/8287))
- `Iterator#flatMap#hasNext` calls `outer#hasNext` 1 time, not 2-3 times ([#8220](https://togithub.com/scala/scala/pull/8220))
- `s.c.Map#values` returns a strict `Iterable` rather than a `View` ([#8195](https://togithub.com/scala/scala/pull/8195))
- `Vector.from(ArraySeq)` copies elems rather than reusing `unsafeArray` ([#8194](https://togithub.com/scala/scala/pull/8194))
- Fix `mutable.HashSet.addAll`: remove redundant call to super method ([#8192](https://togithub.com/scala/scala/pull/8192))
- Fix `mutable.ArraySeq.ofChar#addString` ([#8176](https://togithub.com/scala/scala/pull/8176))
- Fix `HashMap#mapValuesInPlace` ([#8421](https://togithub.com/scala/scala/pull/8421))
##### Other regressions
- Avoid spurious "illegal cyclic reference" errors ([#8382](https://togithub.com/scala/scala/pull/8382))
- Stabilize args of `apply` ([#8202](https://togithub.com/scala/scala/pull/8202))
- Reject incomplete implicit dictionaries ([#8201](https://togithub.com/scala/scala/pull/8201))
- Process exit code on script errors ([#8169](https://togithub.com/scala/scala/pull/8169))
- Fix type inference involving wildcards ([#8129](https://togithub.com/scala/scala/pull/8129))
##### Other bug fixes and improvements
- Extend the Gradle / sbt 0.13 leniency to Windows ([#8408](https://togithub.com/scala/scala/pull/8408))
- Avoid unnecessary `toSeq` conversions in `Seq` methods ([#8374](https://togithub.com/scala/scala/pull/8374))
- Avoid memory leaks in `Stream` methods ([#8367](https://togithub.com/scala/scala/pull/8367))
- Precompile -i files for script runner ([#8349](https://togithub.com/scala/scala/pull/8349))
- Stop warning on higher-kinded usage without -language:higherKinds ([#8348](https://togithub.com/scala/scala/pull/8348))
- Simplify reporters ([#8338](https://togithub.com/scala/scala/pull/8338))
- More efficient `ArraySeq` iteration ([#8300](https://togithub.com/scala/scala/pull/8300))
- Enable hyperlinking to Java docs ([#8284](https://togithub.com/scala/scala/pull/8284))
- Parent `implicitNotFound` message is supplemental ([#8280](https://togithub.com/scala/scala/pull/8280))
- Add protected and private visibility filters to scaladoc ([#8183](https://togithub.com/scala/scala/pull/8183))
- Fix vulnerability in jQuery used in ScalaDoc ([#8179](https://togithub.com/scala/scala/pull/8179))
- Synthesize a PartialFunction from function literal ([#8172](https://togithub.com/scala/scala/pull/8172))
- Fix parsing of `try` ([#8071](https://togithub.com/scala/scala/pull/8071))
- Support emitting Java 9 bytecode by adding "-target:9" ([#8060](https://togithub.com/scala/scala/pull/8060))
- Deprecate `mutable.MultiMap` ([#8005](https://togithub.com/scala/scala/pull/8005))
- Add syntactic sugar for `if(_)` ([#7707](https://togithub.com/scala/scala/pull/7707))
- A foreign definition induces ambiguity ([#7609](https://togithub.com/scala/scala/pull/7609))
This is not a complete list of changes. For that, see [all merged PRs](https://togithub.com/scala/scala/pulls?q=is%3Amerged%20milestone%3A2.13.1) and [all closed bugs](https://togithub.com/scala/bug/issues?utf8=%E2%9C%93&q=is%3Aclosed+milestone%3A2.13.1).
##### 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](https://www.lightbend.com/scala) for their continued sponsorship of the Scala core team’s efforts. Lightbend offers [commercial support](https://www.lightbend.com/lightbend-platform-subscription) for Scala.
#### Scala 2.13 notes
The [release notes for Scala 2.13.0](https://togithub.com/scala/scala/releases/v2.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](http://scala-lang.org/download/2.13.1.html)
- Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.13.1%22)
### [`v2.13.0`](https://togithub.com/scala/scala/releases/v2.13.0)
[Compare Source](https://togithub.com/scala/scala/compare/v2.12.12...v2.13.0)
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](https://togithub.com/scala/scala-parallel-collections).
- 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](https://togithub.com/scala/scala/pull/6970))
- **Simplified views that work**
- [`collection.View`](https://www.scala-lang.org/api/2.13.0/scala/collection/View.html)s 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](https://togithub.com/scala/scala/commit/d5ae93e1b35fac4002cfbffff9ec741356549e08)) and mutable ([#7348](https://togithub.com/scala/scala/pull/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**
- [`immutable.LazyList`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/LazyList.html) replaces `immutable.Stream`. `Stream` had different laziness behavior and is now deprecated. ([#7558](https://togithub.com/scala/scala/pull/7558), [#7000](https://togithub.com/scala/scala/pull/7000))
- [`immutable.ArraySeq`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/ArraySeq.html) is an immutable wrapper for an array; there is also a [mutable version](https://www.scala-lang.org/api/2.13.0/scala/collection/mutable/ArraySeq.html)
- [`mutable.CollisionProofHashMap`](https://www.scala-lang.org/api/2.13.0/scala/collection/mutable/CollisionProofHashMap.html) guards against denial-of-service attacks ([#7633](https://togithub.com/scala/scala/pull/7633))
- [`mutable.ArrayDeque`](https://www.scala-lang.org/api/2.13.0/scala/collection/mutable/ArrayDeque.html) is a double-ended queue that internally uses a resizable circular buffer ([scala/collection-strawman#490](https://togithub.com/scala/collection-strawman/pull/490))
- **[`mutable.Stack`](https://www.scala-lang.org/api/2.13.0/scala/collection/mutable/Stack.html) was reimplemented (and undeprecated)**
- In 2.12, both immutable and mutable `Stack`s were`List`-based and deprecated.
- 2.13 adds a brand-new `mutable.Stack` backed by an `ArrayDeque`.
- `immutable.Stack` was removed.
- **New abstract collection type [`SeqMap`](https://www.scala-lang.org/api/2.13.0/scala/collection/SeqMap.html)**
- [`immutable.SeqMap`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/SeqMap.html) provides immutable maps that maintain insertion order. ([#7954](https://togithub.com/scala/scala/pull/7954))
- Implementations: [`VectorMap`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/VectorMap.html) ([#6854](https://togithub.com/scala/scala/pull/6854)) and [`TreeSeqMap`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/TreeSeqMap.html) ([#7146](https://togithub.com/scala/scala/pull/7146)) (in addition to the already existing [`ListMap`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/ListMap.html)).
Additional collections changes:
- **New [`to(Collection)`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/Iterable.html#to[C1](factory:scala.collection.Factory[A,C1]):C1) 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](https://togithub.com/scala/scala/pull/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`](https://www.scala-lang.org/api/2.13.0/scala/jdk/index.html)
- Explicit converters for Java are in [`scala.jdk.javaapi`](https://www.scala-lang.org/api/2.13.0/scala/jdk/javaapi/index.html)
- The reorganization centralizes all to-and-from-Java converters, including both collection and non-collection types, in a single package.
- Added [`Stepper`](https://www.scala-lang.org/api/2.13.0/scala/collection/Stepper.html), which is like `Iterator` but supports efficient unboxed iteration, Java interop. ([#7458](https://togithub.com/scala/scala/pull/7458))
- **Collection serialization has changed**
- Collections now use the serialization proxy pattern uniformly whenever possible. ([#6676](https://togithub.com/scala/scala/pull/6676), [#7624](https://togithub.com/scala/scala/pull/7624), [scala-dev#562](https://togithub.com/scala/scala-dev/issues/562#issuecomment-427545324), [sbt/sbt#89](https://togithub.com/sbt/sbt/issues/89))
- In some classloading environments, notably sbt's non-forked test execution, code changes may be needed.
- **Added [`.unfold`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/IterableFactory.html#unfold[A,S](init:S)(f:S=>Option[(A,S)]):CC[A])**
- 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](https://togithub.com/scala/scala/pull/6851))
- **Added [`.lengthIs`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/Seq.html#lengthIs:scala.collection.IterableOps.SizeCompareOps)/[`.sizeIs`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/Iterable.html#sizeIs:scala.collection.IterableOps.SizeCompareOps) and [`.sizeCompare`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/Iterable.html#sizeCompare(otherSize:Int):Int)**
- These allow fluent size comparisons without traversing the whole collection ([#6950](https://togithub.com/scala/scala/pull/6950), [#6758](https://togithub.com/scala/scala/pull/6758))
- Examples: `xs.sizeIs < 10`, `xs.sizeIs == 2`
- **Error-prone `Map` methods deprecated**
- Deprecated `.filterKeys` and `.mapValues` ([#7014](https://togithub.com/scala/scala/pull/7014))
- Instead, use the new methods of the same names on [`MapView`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/MapView.html) (e.g. `.view.filterKeys`)
- **Added [`.lazyZip`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/Iterable.html#lazyZip[B](that:Iterable[B]):scala.collection.LazyZip2[A,B,Iterable.this.type])**
- Together with `.zip` on views, this replaces `.zipped` (now deprecated). ([scala/collection-strawman#223](https://togithub.com/scala/collection-strawman/pull/223))
- **Added `.tapEach` method**
- This allows inserting side-effects in a chain of method calls on a collection or view. ([#7124](https://togithub.com/scala/scala/pull/7124))
- **Added [`.updatedWith`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/Map.html#updatedWith[V1>:V](key:K)(remappingFunction:Option[V]=>Option[V1]):CC[K,V1]) and [`updateWith`](https://www.scala-lang.org/api/2.13.0/scala/collection/mutable/Map.html#updateWith(key:K)(remappingFunction:Option[V]=>Option[V]):Option[V]) methods to `Map`s**
- `updatedWith` is on `immutable.Map`, `updateWith` is on `mutable.Map`. ([#7320](https://togithub.com/scala/scala/pull/7320), [#7517](https://togithub.com/scala/scala/pull/7517))
- These methods allow modifying a map entry based on its current value.
- **Added [`.maxOption`](https://www.scala-lang.org/api/2.13.0/scala/collection/IterableOnceOps.html#maxOption[B>:A](implicitord:scala.math.Ordering[B]):Option[A]), [`.minOption`](https://www.scala-lang.org/api/2.13.0/scala/collection/IterableOnceOps.html#minOption[B>:A](implicitord:scala.math.Ordering[B]):Option[A]), [`.maxByOption`](https://www.scala-lang.org/api/2.13.0/scala/collection/IterableOnceOps.html#maxByOption[B](f:A=>B)(implicitcmp:scala.math.Ordering[B]):Option[A]), [`.minByOption`](https://www.scala-lang.org/api/2.13.0/scala/collection/IterableOnceOps.html#minByOption[B](f:A=>B)(implicitcmp:scala.math.Ordering[B]):Option[A])**
- These methods safely handle the empty case. ([#6574](https://togithub.com/scala/scala/pull/6574))
- **Deprecated symbolic methods with multiple arguments**
- Such methods may be disallowed entirely in a future Scala. ([#6719](https://togithub.com/scala/scala/pull/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:
- [Scala 2.13's Collections](https://docs.scala-lang.org/overviews/collections-2.13/introduction.html)
- Intro for newcomers. Skip if the collections from Scala 2.12 and earlier are already familiar to you.
- [The Architecture of Scala 2.13 Collections](https://docs.scala-lang.org/overviews/core/architecture-of-scala-213-collections.html)
- [Implementing Custom Collections (Scala 2.13)](https://docs.scala-lang.org/overviews/core/custom-collections.html)
- [Adding Custom Collection Operations (Scala 2.13)](https://docs.scala-lang.org/overviews/core/custom-collection-operations.html)
- [Migrating a Project to 2.13's Collections](https://docs.scala-lang.org/overviews/core/collections-migration-213.html).
- This document describes the main changes for collection users that migrate to Scala 2.13 and shows how to cross-build on Scala 2.11/12/13.
- [scala-collection-compat](https://togithub.com/scala/scala-collection-compat)
- This new module provides shims for cross-building on Scala 2.11/12/13.
- It also provides two sets of Scalafix rewrites: one for cross-building, one for moving to 2.13 only.
We welcome assistance in continuing to expand and improve these documents.
#### Concurrency
Futures were internally redesigned, with these goals:
- provide expected behavior under a broader set of failure conditions
- provide a foundation for increased performance
- support more robust applications
Details:
- Updated and revised our [`Future`](https://www.scala-lang.org/api/2.13.0/scala/concurrent/Future.html) and [`Promise`](https://www.scala-lang.org/api/2.13.0/scala/concurrent/Promise.html) implementation. ([#6610](https://togithub.com/scala/scala/pull/6610), [#7663](https://togithub.com/scala/scala/pull/7663))
- Among other changes, handling of `InterruptedException` and `RejectedExecutionException` is improved.
- Made the global `ExecutionContext` “batched”. ([#7470](https://togithub.com/scala/scala/pull/7470))
- Added synchronous ("parasitic") `ExecutionContext`. ([#7784](https://togithub.com/scala/scala/pull/7784))
#### Standard library: additions
- **Integrated Java interop** ([#7987](https://togithub.com/scala/scala/pull/7987))
- The old `scala-java8-compat` module is now part of the standard library. ([#7458](https://togithub.com/scala/scala/pull/7458))
- This provides converters for options, function types and Java streams.
- (As mentioned above, collection converters such as `JavaConverters` were moved to fit into the new scheme.)
- **new: [`scala.util.Using`](https://scala-lang.org/files/archive/api/2.13.0/scala/util/Using$.html)**
- This uses the loan pattern to provide a simple form of automatic resource management. ([#6907](https://togithub.com/scala/scala/pull/6907), [#7468](https://togithub.com/scala/scala/pull/7468))
- **new: use `s` interpolator in pattern matches**
- Provides a simple string matcher as the dual of the simple string interpolator. ([#7387](https://togithub.com/scala/scala/pull/7387))
- Example: `val s"$day-$month-$year" = "11-June-2019"`
- **new: [`pipe`](https://scala-lang.org/files/archive/api/2.13.0/scala/util/ChainingOps.html#pipe[B](f:A=>B):B) and [`tap`](https://scala-lang.org/files/archive/api/2.13.0/scala/util/ChainingOps.html#tap[U](f:A=>U):A)**
- These chaining operations are available via `import scala.util.chaining._`. ([#7007](https://togithub.com/scala/scala/pull/7007))
- Example: `3.pipe(_ * 5)` evaluates to 15
- Example: `9.tap(println)` first prints 9, then returns it
- **new: `.toIntOption`, et al**
- These new extension methods on `String` are provided by [StringOps](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/StringOps.html).
- They parse literals and efficiently reject invalid input without throwing exceptions. ([#6538](https://togithub.com/scala/scala/pull/6538))
- Examples: `"12".toIntOption` => `Some(12)`, `"12.3".toIntOption` => `None`, `"12.3".toDoubleOption` => `Some(12.3)`
- **new: named `Product` elements**
- Case classes and other `Product`s now have [`productElementNames`](https://scala-lang.org/files/archive/api/2.13.0/scala/Product.html#productElementNames:Iterator[String]) and [`productElementName`](https://scala-lang.org/files/archive/api/2.13.0/scala/Product.html#productElementName(n:Int):String) methods. ([#6972](https://togithub.com/scala/scala/pull/6972))
- **new: [`.withRight`](https://scala-lang.org/files/archive/api/2.13.0/scala/util/Left.html#withRight[B1>:B]:scala.util.Either[A,B1]), [`.withLeft`](https://scala-lang.org/files/archive/api/2.13.0/scala/util/Right.html#withLeft[A1>:A]:scala.util.Either[A1,B])**
- These methods on `Left` and `Right` allow upcasting the other type parameter ([#7011](https://togithub.com/scala/scala/pull/7011), [#7080](https://togithub.com/scala/scala/pull/7080))
- Example: `Left(3).withRight[String]` has type `Either[Int, String]` without having to write `Int`
- **new: [`Ordering.Double.TotalOrdering`](https://scala-lang.org/files/archive/api/2.13.0/scala/math/Ordering$Double$TotalOrdering.html), [`Ordering.Float.TotalOrdering`](https://scala-lang.org/files/archive/api/2.13.0/scala/math/Ordering$Float$TotalOrdering.html)**
- The old orderings remain available at: [`Ordering.Double.IeeeOrdering`](https://scala-lang.org/files/archive/api/2.13.0/scala/math/Ordering$Double$IeeeOrdering.html), [`Ordering.Float.IeeeOrdering`](https://scala-lang.org/files/archive/api/2.13.0/scala/math/Ordering$Float$IeeeOrdering.html)
- Example: `List(2.0, 1.0).sorted` now warns unless you import or pass an ordering. ([#6410](https://togithub.com/scala/scala/pull/6410))
- **new: converters between functions and extractors**
- New methods provide conversions among optional `Function`s, `PartialFunction`s and extractor objects. ([#7111](https://togithub.com/scala/scala/pull/7111))
- **new: `@unused` annotation**
- This annotation is useful for suppressing warnings under `-Xlint`. ([#7623](https://togithub.com/scala/scala/pull/7623))
#### Standard library: changes
- **Library fits in [compact1 profile](http://openjdk.java.net/jeps/161)**
- This reduces deployment footprint for Scala applications. ([#6164](https://togithub.com/scala/scala/pull/6164), [scala/bug#10559](https://togithub.com/scala/bug/issues/10559))
- **[`Option`](https://scala-lang.org/files/archive/api/2.13.0/scala/Option.html) extends [`IterableOnce`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/IterableOnce.html)**
- This improves type inference when calling an overloaded `flatMap`. ([#8038](https://togithub.com/scala/scala/pull/8038))
- Undeprecate `linesIterator` to avoid conflict with JDK 11's `String.lines` ([#7269](https://togithub.com/scala/scala/pull/7269))
- `PartialFunction` now overloads `andThen`. ([#7263](https://togithub.com/scala/scala/pull/7263))
- Replaced `Cloneable`/`Serializable` traits with type aliases ([#6729](https://togithub.com/scala/scala/pull/6729))
- `ControlThrowable` never suppresses ([#7413](https://togithub.com/scala/scala/pull/7413))
#### Standard library: deprecations and removals
Not a complete list, only the deprecations users are likeliest to encounter.
- String-building using `+` with a non-`String` type on the left (aka `any2stringadd`) is deprecated. ([#6315](https://togithub.com/scala/scala/pull/6315), [#6755](https://togithub.com/scala/scala/pull/6755))
- [`PartialFunction.fromFunction`](https://scala-lang.org/files/archive/api/2.13.0/scala/PartialFunction$.html#fromFunction[A,B](f:A=>B):PartialFunction[A,B]) replaces `PartialFunction.apply` ([#6703](https://togithub.com/scala/scala/pull/6703))
- Right projections on `Either` are deprecated. ([#6682](https://togithub.com/scala/scala/pull/6682), [#8012](https://togithub.com/scala/scala/pull/8012))
- Deprecated `@usecase` Scaladoc tag. ([#7462](https://togithub.com/scala/scala/pull/7462))
- Deprecated universal `Equiv`. ([#7414](https://togithub.com/scala/scala/pull/7414))
- The following modules are no longer included in the distribution: [scala-xml](https://togithub.com/scala/scala-xml), [scala-parser-combinators](https://togithub.com/scala/scala-parser-combinators), [scala-swing](https://togithub.com/scala/scala-swing).
- They are community-maintained and published to Maven Central.
- Assorted deprecated methods and classes throughout the standard library have been removed entirely.
#### Language changes
2.13 is primarily a library release, not a language/compiler release. Regardless, some language changes are included:
Features:
- **Literal types**
- Literals (for strings, integers, and so on) now have associated literal types. ([#5310](https://togithub.com/scala/scala/pull/5310))
- See the original proposal, [SIP-23](https://docs.scala-lang.org/sips/42.type.html), for motivation and details.
- The compiler will provide instances of a new typeclass `scala.ValueOf[T]` for all singleton types `T`.
- A `Singleton` upper bound prevents widening (e.g. `T <: Int with Singleton`).
- The value of a singleton type can be accessed by calling method `valueOf[T]`. Example: `val one: 1 = valueOf[1]`
- **Partial unification on by default**
- Improves type constructor inference, fixes [SI-2712](https://togithub.com/scala/bug/issues/2712).
- We recommend this [great explanation of this feature](https://gist.github.com/djspiewak/7a81a395c461fd3a09a6941d4cd040f2).
- This feature is no longer considered experimental ([#5102](https://togithub.com/scala/scala/pull/5102))
- The compiler no longer accepts `-Ypartial-unification`.
- **By-name implicits with recursive dictionaries**
- This extends by-name method arguments to support implicit (not just explicit) parameters.
- This enables implicit search to construct recursive values.
- The flagship use-case is typeclass derivation.
- Details: see the [by-name implicits SIP](https://docs.scala-lang.org/sips/byname-implicits.html), [#6050](https://togithub.com/scala/scala/pull/6050), [#7368](https://togithub.com/scala/scala/pull/7368)
- **Underscores in numeric literals**
- Underscores can now be used as a spacer. ([#6989](https://togithub.com/scala/scala/pull/6989))
- Example: `1_000_000`
Experimental features:
- **Macro annotations**
- There is no more ["macro paradise" compiler plugin](https://togithub.com/scalamacros/paradise) for 2.13.
- Instead, [macro annotations](https://docs.scala-lang.org/overviews/macros/annotations.html) are handled directly by the compiler.
- Macro annotations are enabled with the `-Ymacro-annotations` flag. [#6606](https://togithub.com/scala/scala/pull/6606)
- Macro annotations remain experimental.
Deprecations:
- **Procedure syntax deprecated**
- Deprecated: `def m() { ... }`) [#6325](https://togithub.com/scala/scala/pull/6325)
- Use instead: `def m(): Unit = { ... }`
- **View bounds deprecated**
- Deprecated: `A <% B` ([#6500](https://togithub.com/scala/scala/pull/6500))
- Use instead: `(implicit ev: A => B)`
- **Symbol literals deprecated**
- Symbols themselves remain supported, only the single-quote syntax is deprecated. ([#7395](https://togithub.com/scala/scala/pull/7395))
- Library designers may wish to change their APIs to use `String` instead.
- Deprecated: `'foo`
- Use instead: `Symbol("foo")`
- **Unicode arrows deprecated**
- In particular, the single arrow operators had the wrong precedence. ([#7540](https://togithub.com/scala/scala/pull/7540))
- Deprecated: `⇒`, `→`, `←`
- Use instead: `=>`, `->`, `<-`
- **`postfixOps` syntax disabled by default**
- The syntax, already deprecated in 2.12, causes an error in 2.13 unless the feature is explicitly enabled. ([#6831](https://togithub.com/scala/scala/pull/6831))
- Error: `xs size`
- Use instead: `xs.size`
Adjustments:
- Imports, including wildcard imports, now shadow locally defined identifiers. ([#6589](https://togithub.com/scala/scala/pull/6589))
- Underscore is no longer a legal identifier unless backquoted ([bug#10384](https://togithub.com/scala/bug/issues/10384))
- `val _ =` is now a pattern match
- `implicit val _ =` is also now a pattern match which does not introduce an identifier and therefore does not add anything to implicit scope
- Don't assume unsound type for ident/literal patterns. ([#6502](https://togithub.com/scala/scala/pull/6502))
- Matches of the form `case x@N` involve calling `equals`, so it was unsound to type `x` as `N.type`.
- Consider rewriting as `case x:N.type`.
- Make extractor patterns null safe. ([#6485](https://togithub.com/scala/scala/pull/6485))
- `null` is treated as no match.
- Better typing for overloaded higher-order methods ([#6871](https://togithub.com/scala/scala/pull/6871), [#7631](https://togithub.com/scala/scala/pull/7631))
- This change was a key enabler for the new collections design.
- Rework unification of `Object` and `Any` in Java/Scala interop ([#7966](https://togithub.com/scala/scala/pull/7966))
- Name-based pattern matching has changed to enable immutable `Seq` matches ([#7068](https://togithub.com/scala/scala/pull/7068))
- Automatic eta-expansion of zero-argument methods is no longer deprecated ([#7660](https://togithub.com/scala/scala/pull/7660))
- Improve binary stability of extension methods ([#7896](https://togithub.com/scala/scala/pull/7896))
- Macros must now have explicit return types ([#6942](https://togithub.com/scala/scala/pull/6942))
- Mixin fields with trait setters are no longer JVM final ([#7028](https://togithub.com/scala/scala/pull/7028))
- In addition, `object` fields are now static ([#7270](https://togithub.com/scala/scala/pull/7270))
- Support `implicitNotFound` on parameters ([#6340](https://togithub.com/scala/scala/pull/6340))
- Disallow repeated parameters except in method signatures ([#7399](https://togithub.com/scala/scala/pull/7399))
- Value-discard warnings can be suppressed via type ascription to `Unit`. ([#7563](https://togithub.com/scala/scala/pull/7563))
- `x op ()` now parses as `x.op(())` not `x.op()` ([#7684](https://togithub.com/scala/scala/pull/7684))
#### Compiler
- **Deterministic, reproducible compilation**
- The compiler generates identical output for identical input in more cases, for reproducible builds. ([scala-dev#405](https://togithub.com/scala/scala-dev/issues/405))
- **Optimizer improvements**
- Operations on collections and arrays are now optimized more, including improved inlining. ([#7133](https://togithub.com/scala/scala/pull/7133))
And:
- Scaladoc supports setting canonical URLs ([#7834](https://togithub.com/scala/scala/pull/7834))
- This helps search engines identify the most relevant/recent version of a page when several versions are available.
- Compiler suggests possible corrections for unrecognized identifiers ([#6711](https://togithub.com/scala/scala/pull/6711))
- Example: `List(1).sizzle` => `value sizzle is not a member of List[Int], did you mean size?`
- Added `-Yimports` for custom preamble imports. ([#6764](https://togithub.com/scala/scala/pull/6764))
- Example: `-Yimports:x,y,z` means x, y, and z are root imports of the form: `import x._ { import y._ { import z._ { ... } } }`
- The scala-compiler JAR no longer depends on scala-xml ([#6436](https://togithub.com/scala/scala/pull/6436))
Plus, changes to compiler options:
- Partition options by function: `-V` for verbose, `-W` for warnings
- In general, the old flags still exist as aliases. ([#7908](https://togithub.com/scala/scala/pull/7908))
- Exceptions (breaking changes) include:
- Replaced `-warn-option` with `-Woption`.
- Replaced `-Xprint:all` with `-Vprint:_`
- `-Werror` is now recommended over `-Xfatal-warnings`.
- Promoted `-deprecation` to `-Xlint:deprecation` ([#7714](https://togithub.com/scala/scala/pull/7714))
- Deprecated `-Xfuture` ([#7328](https://togithub.com/scala/scala/pull/7328))
- Instead, use e.g. `-Xsource:2.14`
- Removed `-Yno-adapted-args`
- The removal remains under discussion at [scala/bug#11110](https://togithub.com/scala/bug/issues/11110).
- Removed `-Xmax-classfile-length`
- It's hard-coded to 240 now ([#7497](https://togithub.com/scala/scala/pull/7497))
#### Scripting, environment, and integrations
- The script runner (`scala Script.scala`) no longer uses the `fsc` compilation daemon by default. ([#6747](https://togithub.com/scala/scala/pull/6747))
- The daemon was not reliable and will likely be removed entirely from a future release.
- [JEP 293](https://openjdk.java.net/jeps/293) style long command-line options are now supported ([#6499](https://togithub.com/scala/scala/pull/6499))
- The REPL has undergone an internal refactoring to enable future improvements. ([#7384](https://togithub.com/scala/scala/pull/7384))
- Ant support is no longer bundled. ([#6255](https://togithub.com/scala/scala/pull/6255))
#### Compiler performance
We invested heavily in compiler speedups during the 2.13 cycle, but most of that work actually already landed in the 2.12.x series, with more to come in 2.12.9.
In addition, compiler performance in 2.13 is 5-10% better compared to 2.12, thanks mainly to the new collections. See [performance graph](https://scala-ci.typesafe.com/grafana/dashboard/db/scala-benchmark?orgId=1&from=1522695946912&to=1526380271494&var-branch=2.12.x&var-branch=2.13.x&var-source=All&var-bench=HotScalacBenchmark.compile&var-host=scalabench@scalabench@).
Also, certain kinds of code now compile much faster because the compiler aggressively prunes polymorphic implicits during search ([#6580](https://togithub.com/scala/scala/pull/6580)).
#### Migration
Upgrading from 2.12? Enable `-Xmigration` while upgrading to request migration advice from the compiler.
#### Compatibility
Like Scala 2.12, the 2.13 series targets Java 8, minimum. Both 2.12 and 2.13 also work on later JDKs such as JDK 11; see our [JDK Compatibility Guide](https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html).
Although Scala 2.11, 2.12, and 2.13 are mostly source compatible to facilitate cross-building, they are not _binary_ compatible. This allows us to keep improving the Scala compiler and standard library.
All 2.13.x releases will be fully binary compatible with 2.13.0, in according with [the policy](http://docs.scala-lang.org/overviews/core/binary-compatibility-of-scala-releases.html) we have followed since 2.10.
Projects built with [sbt](http://www.scala-sbt.org/download.html) must use at least sbt 1.2.8 (or 0.13.18) to use Scala 2.13. To move to 2.13, bump the `scalaVersion` setting in your existing project.
Scala also works with [Maven](http://docs.scala-lang.org/tutorials/scala-with-maven.html), [Gradle](https://docs.gradle.org/current/userguide/scala_plugin.html), and other build tools.
#### 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](http://scala-lang.org/download/2.13.0.html)
- Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.13.0%22)
- Certain package managers (such as homebrew and SDKMAN) offer Scala.
#### Reporting bugs
Please file any bugs you encounter on [our issue tracker](https://togithub.com/scala/bug/issues). If you aren't yet sure something is a bug, ask on [users.scala-lang.org](https://users.scala-lang.org).
#### Contributors
A big thank you to everyone who's helped improve Scala by reporting bugs, improving our documentation, kindly helping others on forums and at meetups, and submitting and reviewing pull requests! You are all magnificent.
Scala 2.13.0 is the result of merging over 1500 pull requests.
The pull request queue is managed by the Scala team at Lightbend: [Adriaan Moors](https://togithub.com/adriaanm), [Lukas Rytz](https://togithub.com/lrytz), [Jason Zaugg](https://togithub.com/retronym), [Seth Tisue](https://togithub.com/SethTisue), [Stefan Zeiger](https://togithub.com/szeiger), [Eugene Yokota](https://togithub.com/eed3si9n).
Thanks to [Lightbend](https://www.lightbend.com/scala) for their continued sponsorship of the Scala core team’s efforts. Lightbend offers [commercial support](https://www.lightbend.com/lightbend-platform-subscription) for Scala.
The new collections API was developed in fruitful collaboration with the Scala Center, with major contributions from the community.
This release was brought to you by 162 contributors, according to `git shortlog -sn --no-merges 2.13.x ^2.12.x ^e2a211c`. Thank you Julien Richard-Foy, Lukas Rytz, Jason Zaugg, A. P. Marki, Stefan Zeiger, Kenji Yoshida, Adriaan Moors, Josh Lemer, NthPortal, Miles Sabin, Diego E. Alonso-Blas, Seth Tisue, Guillaume Martres, Marcelo Cenerino, Dale Wijnand, Odd Möller, Martin Odersky, Allan Renucci, Georgi Krastev, Eugene Yokota, Harrison Houghton, Martijn Hoekstra, Viktor Klang, Aaron S. Hawley, Ólafur Páll Geirsson, Rex Kerr, hepin1989, Philippus Baalman, Matthew de Detrich, Isaac Levy, exoego, Greg Methvin, Jasper Moeys, Sébastien Doeraene, wholock, Aggelos Biboudis, yui-knk, Matthias Sperl, Xavier Fernández Salas, Ethan Pronovost, Janek Bogucki, awibisono, BuildTools, Mike Skells, Jimin Hsieh, Jonathan Frawley, Xavier GUIHOT, Chris Phelps, chanyong.moon, Cong Zhao, Enno Runne, LPTK, Pathikrit Bhowmick, Yuval Dagan, Li Haoyi, Guillaume Massé, Christopher Hunt, Kamil Kloch, Marco Zühlke, Danila Matveev, Juliusz Sompolski,杨博 (Yang Bo), Masaru Nomura, Benjamin Kurczyk, Vince, taku0, Arnout Engelen, Tim Ruhland, Nicolas Stucki, Nicolas Rinaudo, Stephen Nancekivell, ashwin, Kobenko Mikhail, Song Kun, Anthony Tjuatja, k.bigwheel, ke-to, kelebra, mcintdan, mmocentre, psilospore, roman, svatsan, texasbruce, tim-zh, valydia, veera venky,虎鸣, Adianto Wibisono, Alden Torres, Alejandro Sellero, Alessandro Buggin, Alex Glukhovtsev, Alex Levenson, Alexey-NM, Anatolii, Andrei Baidarov, Andriy Plokhotnyuk, Bakhytzhan Karabalin, Benni, Callum Turnbull, Chris Birchall, Chujie Zeng, Cody Allen, Daniel Dietrich, Daniel Moss, Daniel Slapman, David Barri, David Hoepelman, Denis Buzdalov, Denys Shabalin, Dhanesh, Dhanesh Arole, Edin Dudojević, Eugene Platonov, Faiz Halde, Gabriel Claramunt, Heikki Vesalainen, Iaroslav Zeigerman, Jack Koenig, Jean Michel Rouly, Jeff Brower, Jeff Shaw, Josh, Kazuhiro Sera, Kentaro Tokutomi, Lionel Parreaux, Magnolia.K, Martin Duhem, Michael Steindorfer, Nafer Sanabria, Narek Asadorian, Oleksii Tkachuk, Oscar Boykin, PJ Fanning, Paolo Giarrusso, Pap Lőrinc, Pavel Petlinsky, Peter Fraenkel, Philip, Piotr Kukielka, Qiang Sima, Rob Norris, Robin Stephenson, Rui Gonçalves, Ruud Welling, Ryan McDougall, ShankarShastri, Simão Martins, Sperl Matthias, Sujeet Kausallya Gholap, Uttej Guduru, Vincent de Haan, Vladimir Parfinenko, Vlastimil Dort, Yang Bo, Zizheng Tai, ccjoywang, esarbe, howtonotwin, jvican.
#### Conclusion
We again thank our contributors and the entire Scala community.
May you find Scala 2.13 a joy to code in!
### [`v2.12.12`](https://togithub.com/scala/scala/releases/v2.12.12)
[Compare Source](https://togithub.com/scala/scala/compare/v2.12.11...v2.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 in `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](https://togithub.com/scala/scala/pull/8816))
- `immutable.{TreeSet, TreeMap}` are now based on a backport of the 2.13.x implementation. ([#8749](https://togithub.com/scala/scala/pull/8749))
- The builders for `immutable.{HashMap, HashSet}` are more efficient -- they now use mutation during building to reduce memory churn. ([#8726](https://togithub.com/scala/scala/pull/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](https://togithub.com/scala/scala/pulls?q=is%3Amerged%20milestone%3A2.12.12) and [all closed bugs](https://togithub.com/scala/bug/issues?utf8=%E2%9C%93&q=is%3Aclosed+milestone%3A2.12.12).
##### 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](https://www.lightbend.com/scala) for their continued sponsorship of the Scala core team’s efforts. Lightbend offers [commercial support](https://www.lightbend.com/lightbend-platform-subscription) for Scala.
#### Scala 2.12 notes
The [release notes for Scala 2.12.0](https://togithub.com/scala/scala/releases/v2.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](http://scala-lang.org/download/2.12.12.html)
- Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.12.12%22)
### [`v2.12.11`](https://togithub.com/scala/scala/releases/v2.12.11)
[Compare Source](https://togithub.com/scala/scala/compare/v2.12.10...v2.12.11)
The Scala 2.12.11 release mainly brings bug fixes and performance improvements.
##### Highlights
- Performance improvements in the collections library: algorithmic improvements and changes to avoid unnecessary allocations ([list of PRs](https://togithub.com/scala/scala/pulls?q=is%3Apr+milestone%3A2.12.11+is%3Aclosed+sort%3Acreated-desc+label%3Alibrary%3Acollections+label%3Aperformance))
- Performance improvements in the compiler ([list of PRs](https://togithub.com/scala/scala/pulls?q=is%3Apr+milestone%3A2.12.11+is%3Aclosed+sort%3Acreated-desc+-label%3Alibrary%3Acollections+label%3Aperformance+), minor [effects in our benchmarks](https://scala-ci.typesafe.com/grafana/dashboard/db/scala-benchmark?orgId=1&from=1567985515850&to=1584355915694&var-branch=2.12.x&var-source=All&var-bench=HotScalacBenchmark.compile&var-host=scalabench@scalabench@))
- Improvements to `-Yrepl-class-based`, an alternative internal REPL encoding that avoids deadlocks (details on [#8712](https://togithub.com/scala/scala/pull/8712))
- A new `-Yrepl-use-magic-imports` flag that avoids deep class nesting in the REPL, which can lead to deteriorating performance in long sessions ([#8576](https://togithub.com/scala/scala/pull/8576))
- Fix some `toX` methods that could expose the underlying mutability of a `ListBuffer`-generated collection ([#8674](https://togithub.com/scala/scala/pull/867
Renovate configuration
:date: Schedule: At any time (no schedule defined).
:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.
:recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
:no_bell: Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
2.11.8
->2.13.3
Release Notes
scala/scala
### [`v2.13.3`](https://togithub.com/scala/scala/releases/v2.13.3) [Compare Source](https://togithub.com/scala/scala/compare/v2.13.2...v2.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 now `Symbol(foo)` instead of the deprecated single-quote form `'foo` ([#8933](https://togithub.com/scala/scala/pull/8933)) ##### Bugfixes - Fix 2.13-only bug in Java collection converters that caused some operations to perform an extra pass ([#9058](https://togithub.com/scala/scala/pull/9058)) - Fix 2.13.2 performance regression in `Vector`: restore special cases for small operands in `appendedAll` and `prependedAll` ([#9036](https://togithub.com/scala/scala/pull/9036)) - Increase laziness of `#::` for `LazyList` ([#8985](https://togithub.com/scala/scala/pull/8985)) - Allow trailing backslash in string interpolators ([#8942](https://togithub.com/scala/scala/pull/8942)) - Respect `@uncheckedVariance` in higher-kinded types (fixing 2.13.2 regression) ([#8938](https://togithub.com/scala/scala/pull/8938)) ##### Warnings and linting - Deprecate auto-application of (non-Java-defined) methods with a single empty parameter list ([#8833](https://togithub.com/scala/scala/pull/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](https://togithub.com/scala/scala/pull/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](https://togithub.com/scala/scala/pull/8951)) - Fix `@nowarn` to use correct semantics for `&` ([#9032](https://togithub.com/scala/scala/pull/9032)) - Make `-Wunused:imports` work again even when `-Ymacro-annotations` is enabled ([#8962](https://togithub.com/scala/scala/pull/8962)) - Replace `-Wself-implicit` with `-Xlint:implicit-recursion` ([#9019](https://togithub.com/scala/scala/pull/9019)) - Under `-Xsource:3`, disallow auto-eta-expansion of SAMs ([#9049](https://togithub.com/scala/scala/pull/9049)) ##### Experimental `-Xasync` This successor to [scala-async](https://togithub.com/scala/scala-async) allows usage with other effect systems besides `scala.concurrrent.Future`. - Compiler support for scala-async; enable with `-Xasync` ([#8816](https://togithub.com/scala/scala/pull/8816)) We will publish a blog post with more detail on this work by [@retronym](https://togithub.com/retronym), building on his earlier collaboration with [@phaller](https://togithub.com/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](https://togithub.com/scala/scala/pulls?q=is%3Amerged%20milestone%3A2.13.3) and [all closed bugs](https://togithub.com/scala/bug/issues?utf8=%E2%9C%93&q=is%3Aclosed+milestone%3A2.13.3). Some changes that will ship in 2.12.12 are also included in this release, most notably: - Annotation parsing & `@Deprecated` ([#8781](https://togithub.com/scala/scala/pull/8781)) - Fix Scaladoc tool on JDK 11 with `-release 8`: exclude sig files in `Symbol#sourceFile` ([#8849](https://togithub.com/scala/scala/pull/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](https://www.lightbend.com/scala) for their continued sponsorship of the Scala core team’s efforts. Lightbend offers [commercial support](https://www.lightbend.com/lightbend-platform-subscription) for Scala. #### Scala 2.13 notes The [release notes for Scala 2.13.0](https://togithub.com/scala/scala/releases/v2.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](http://scala-lang.org/download/2.13.3.html) - Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.13.3%22) ### [`v2.13.2`](https://togithub.com/scala/scala/releases/v2.13.2) [Compare Source](https://togithub.com/scala/scala/compare/v2.13.1...v2.13.2) 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](https://togithub.com/scala/scala/pull/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](https://togithub.com/szeiger) for this work. ##### Configurable warnings - Add `-Wconf` flag for configurable warnings, `@nowarn` annotation for local suppression ([#8373](https://togithub.com/scala/scala/pull/8373)) Note that [scala-collection-compat 2.1.6](https://togithub.com/scala/scala-collection-compat/releases/tag/v2.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](https://togithub.com/ghik)), whose [silencer](https://togithub.com/ghik/silencer) plugin was the basis for this work. ##### REPL improvements - REPL: upgrade to JLine 3 (benefits include multi-line editing) ([#8036](https://togithub.com/scala/scala/pull/8036)) - Default true `-Yrepl-class-based` and `-Yuse-magic-imports` ([#8748](https://togithub.com/scala/scala/pull/8748)) - `-Yrepl-class-based` avoids deadlocks - `-Yuse-magic-imports` improves performance for long sessions - Improve REPL display of method types ([#8319](https://togithub.com/scala/scala/pull/8319)) Special thanks to [@som-snytt](https://togithub.com/som-snytt) for spearheading the JLine 3 upgrade. We are tracking JLine-related improvements and regressions [here](https://togithub.com/scala/scala-dev/issues?q=is%3Aissue+is%3Aopen+label%3At%3Ajline3). 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](https://togithub.com/scala/scala/pull/8282)) ##### Compiler fixes - Plug many variance holes (in higher-kinded types, refined types, and private inner classes) ([#8545](https://togithub.com/scala/scala/pull/8545)) - Fix variance handling for parameterized type aliases ([#8651](https://togithub.com/scala/scala/pull/8651)) - Exclude universal members (`getClass`, `toString`, etc) from root module import ([#8541](https://togithub.com/scala/scala/pull/8541)) - Matching strings makes switches in bytecode ([#8451](https://togithub.com/scala/scala/pull/8451)) ##### Deprecations - Deprecate eta-expansion, via trailing underscore, of methods with no argument lists ([#8836](https://togithub.com/scala/scala/pull/8836)) - Deprecate nested class shadowing in "override" position ([#8705](https://togithub.com/scala/scala/pull/8705)) - Deprecate numeric conversions that lose precision (e.g., `Long` to `Double`) ([#8679](https://togithub.com/scala/scala/pull/8679)) - Deprecate numeric widening of numeric literals which are not representable with `Float`/`Double` ([#8757](https://togithub.com/scala/scala/pull/8757)) - Deprecate old-style constructor syntax ([#8591](https://togithub.com/scala/scala/pull/8591)) ##### Improvements from the future - There is no more `-Xsource:2.14`, only `-Xsource:3` ([#8812](https://togithub.com/scala/scala/pull/8812)) - Allow infix operators at start of line (under `-Xsource:3`) ([#8419](https://togithub.com/scala/scala/pull/8419)) - Case class copy and apply inherit access modifiers from constructor (under `-Xsource:3`) ([#7702](https://togithub.com/scala/scala/pull/7702)) ##### Other fixes and improvements - Un-deprecate default floating point `Ordering`s; issue migration warning instead under `-Xmigration` ([#8721](https://togithub.com/scala/scala/pull/8721)) - Support macro annotation expansions in `-Wmacros:MODE` ([#8799](https://togithub.com/scala/scala/pull/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](https://togithub.com/scala/scala/pull/8663)) - `sys.env` now throws on null environment variable ([#8579](https://togithub.com/scala/scala/pull/8579)) - Make the hashcode method `##` have no parameter list (instead of a single empty one) ([#8814](https://togithub.com/scala/scala/pull/8814)) This is not a complete list of changes. For that, see [all merged PRs](https://togithub.com/scala/scala/pulls?q=is%3Amerged%20milestone%3A2.13.2) and [all closed bugs](https://togithub.com/scala/bug/issues?utf8=%E2%9C%93&q=is%3Aclosed+milestone%3A2.13.2). 2.13.2 also includes the changes in [Scala 2.12.11](https://togithub.com/scala/scala/releases/tag/v2.12.11), most notably: - Make optimizer work on JDK 13+ ([#8676](https://togithub.com/scala/scala/pull/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](https://www.lightbend.com/scala) for their continued sponsorship of the Scala core team’s efforts. Lightbend offers [commercial support](https://www.lightbend.com/lightbend-platform-subscription) for Scala. #### Scala 2.13 notes The [release notes for Scala 2.13.0](https://togithub.com/scala/scala/releases/v2.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](http://scala-lang.org/download/2.13.2.html) - Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.13.2%22) ### [`v2.13.1`](https://togithub.com/scala/scala/releases/v2.13.1) [Compare Source](https://togithub.com/scala/scala/compare/v2.13.0...v2.13.1) 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](https://togithub.com/scala/scala/pull/8354)) - Don't rebuild `scala.Seq` to drop elems in `unapplySeq` ([#8340](https://togithub.com/scala/scala/pull/8340)) - Blacken subtrees where necessary in `RedBlackTree.take` ([#8287](https://togithub.com/scala/scala/pull/8287)) - `Iterator#flatMap#hasNext` calls `outer#hasNext` 1 time, not 2-3 times ([#8220](https://togithub.com/scala/scala/pull/8220)) - `s.c.Map#values` returns a strict `Iterable` rather than a `View` ([#8195](https://togithub.com/scala/scala/pull/8195)) - `Vector.from(ArraySeq)` copies elems rather than reusing `unsafeArray` ([#8194](https://togithub.com/scala/scala/pull/8194)) - Fix `mutable.HashSet.addAll`: remove redundant call to super method ([#8192](https://togithub.com/scala/scala/pull/8192)) - Fix `mutable.ArraySeq.ofChar#addString` ([#8176](https://togithub.com/scala/scala/pull/8176)) - Fix `HashMap#mapValuesInPlace` ([#8421](https://togithub.com/scala/scala/pull/8421)) ##### Other regressions - Avoid spurious "illegal cyclic reference" errors ([#8382](https://togithub.com/scala/scala/pull/8382)) - Stabilize args of `apply` ([#8202](https://togithub.com/scala/scala/pull/8202)) - Reject incomplete implicit dictionaries ([#8201](https://togithub.com/scala/scala/pull/8201)) - Process exit code on script errors ([#8169](https://togithub.com/scala/scala/pull/8169)) - Fix type inference involving wildcards ([#8129](https://togithub.com/scala/scala/pull/8129)) ##### Other bug fixes and improvements - Extend the Gradle / sbt 0.13 leniency to Windows ([#8408](https://togithub.com/scala/scala/pull/8408)) - Avoid unnecessary `toSeq` conversions in `Seq` methods ([#8374](https://togithub.com/scala/scala/pull/8374)) - Avoid memory leaks in `Stream` methods ([#8367](https://togithub.com/scala/scala/pull/8367)) - Precompile -i files for script runner ([#8349](https://togithub.com/scala/scala/pull/8349)) - Stop warning on higher-kinded usage without -language:higherKinds ([#8348](https://togithub.com/scala/scala/pull/8348)) - Simplify reporters ([#8338](https://togithub.com/scala/scala/pull/8338)) - More efficient `ArraySeq` iteration ([#8300](https://togithub.com/scala/scala/pull/8300)) - Enable hyperlinking to Java docs ([#8284](https://togithub.com/scala/scala/pull/8284)) - Parent `implicitNotFound` message is supplemental ([#8280](https://togithub.com/scala/scala/pull/8280)) - Add protected and private visibility filters to scaladoc ([#8183](https://togithub.com/scala/scala/pull/8183)) - Fix vulnerability in jQuery used in ScalaDoc ([#8179](https://togithub.com/scala/scala/pull/8179)) - Synthesize a PartialFunction from function literal ([#8172](https://togithub.com/scala/scala/pull/8172)) - Fix parsing of `try` ([#8071](https://togithub.com/scala/scala/pull/8071)) - Support emitting Java 9 bytecode by adding "-target:9" ([#8060](https://togithub.com/scala/scala/pull/8060)) - Deprecate `mutable.MultiMap` ([#8005](https://togithub.com/scala/scala/pull/8005)) - Add syntactic sugar for `if(_)` ([#7707](https://togithub.com/scala/scala/pull/7707)) - A foreign definition induces ambiguity ([#7609](https://togithub.com/scala/scala/pull/7609)) This is not a complete list of changes. For that, see [all merged PRs](https://togithub.com/scala/scala/pulls?q=is%3Amerged%20milestone%3A2.13.1) and [all closed bugs](https://togithub.com/scala/bug/issues?utf8=%E2%9C%93&q=is%3Aclosed+milestone%3A2.13.1). ##### 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](https://www.lightbend.com/scala) for their continued sponsorship of the Scala core team’s efforts. Lightbend offers [commercial support](https://www.lightbend.com/lightbend-platform-subscription) for Scala. #### Scala 2.13 notes The [release notes for Scala 2.13.0](https://togithub.com/scala/scala/releases/v2.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](http://scala-lang.org/download/2.13.1.html) - Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.13.1%22) ### [`v2.13.0`](https://togithub.com/scala/scala/releases/v2.13.0) [Compare Source](https://togithub.com/scala/scala/compare/v2.12.12...v2.13.0) 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](https://togithub.com/scala/scala-parallel-collections). - 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](https://togithub.com/scala/scala/pull/6970)) - **Simplified views that work** - [`collection.View`](https://www.scala-lang.org/api/2.13.0/scala/collection/View.html)s 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](https://togithub.com/scala/scala/commit/d5ae93e1b35fac4002cfbffff9ec741356549e08)) and mutable ([#7348](https://togithub.com/scala/scala/pull/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** - [`immutable.LazyList`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/LazyList.html) replaces `immutable.Stream`. `Stream` had different laziness behavior and is now deprecated. ([#7558](https://togithub.com/scala/scala/pull/7558), [#7000](https://togithub.com/scala/scala/pull/7000)) - [`immutable.ArraySeq`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/ArraySeq.html) is an immutable wrapper for an array; there is also a [mutable version](https://www.scala-lang.org/api/2.13.0/scala/collection/mutable/ArraySeq.html) - [`mutable.CollisionProofHashMap`](https://www.scala-lang.org/api/2.13.0/scala/collection/mutable/CollisionProofHashMap.html) guards against denial-of-service attacks ([#7633](https://togithub.com/scala/scala/pull/7633)) - [`mutable.ArrayDeque`](https://www.scala-lang.org/api/2.13.0/scala/collection/mutable/ArrayDeque.html) is a double-ended queue that internally uses a resizable circular buffer ([scala/collection-strawman#490](https://togithub.com/scala/collection-strawman/pull/490)) - **[`mutable.Stack`](https://www.scala-lang.org/api/2.13.0/scala/collection/mutable/Stack.html) was reimplemented (and undeprecated)** - In 2.12, both immutable and mutable `Stack`s were`List`-based and deprecated. - 2.13 adds a brand-new `mutable.Stack` backed by an `ArrayDeque`. - `immutable.Stack` was removed. - **New abstract collection type [`SeqMap`](https://www.scala-lang.org/api/2.13.0/scala/collection/SeqMap.html)** - [`immutable.SeqMap`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/SeqMap.html) provides immutable maps that maintain insertion order. ([#7954](https://togithub.com/scala/scala/pull/7954)) - Implementations: [`VectorMap`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/VectorMap.html) ([#6854](https://togithub.com/scala/scala/pull/6854)) and [`TreeSeqMap`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/TreeSeqMap.html) ([#7146](https://togithub.com/scala/scala/pull/7146)) (in addition to the already existing [`ListMap`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/ListMap.html)). Additional collections changes: - **New [`to(Collection)`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/Iterable.html#to[C1](factory:scala.collection.Factory[A,C1]):C1) 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](https://togithub.com/scala/scala/pull/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`](https://www.scala-lang.org/api/2.13.0/scala/jdk/index.html) - Explicit converters for Java are in [`scala.jdk.javaapi`](https://www.scala-lang.org/api/2.13.0/scala/jdk/javaapi/index.html) - The reorganization centralizes all to-and-from-Java converters, including both collection and non-collection types, in a single package. - Added [`Stepper`](https://www.scala-lang.org/api/2.13.0/scala/collection/Stepper.html), which is like `Iterator` but supports efficient unboxed iteration, Java interop. ([#7458](https://togithub.com/scala/scala/pull/7458)) - **Collection serialization has changed** - Collections now use the serialization proxy pattern uniformly whenever possible. ([#6676](https://togithub.com/scala/scala/pull/6676), [#7624](https://togithub.com/scala/scala/pull/7624), [scala-dev#562](https://togithub.com/scala/scala-dev/issues/562#issuecomment-427545324), [sbt/sbt#89](https://togithub.com/sbt/sbt/issues/89)) - In some classloading environments, notably sbt's non-forked test execution, code changes may be needed. - **Added [`.unfold`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/IterableFactory.html#unfold[A,S](init:S)(f:S=>Option[(A,S)]):CC[A])** - 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](https://togithub.com/scala/scala/pull/6851)) - **Added [`.lengthIs`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/Seq.html#lengthIs:scala.collection.IterableOps.SizeCompareOps)/[`.sizeIs`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/Iterable.html#sizeIs:scala.collection.IterableOps.SizeCompareOps) and [`.sizeCompare`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/Iterable.html#sizeCompare(otherSize:Int):Int)** - These allow fluent size comparisons without traversing the whole collection ([#6950](https://togithub.com/scala/scala/pull/6950), [#6758](https://togithub.com/scala/scala/pull/6758)) - Examples: `xs.sizeIs < 10`, `xs.sizeIs == 2` - **Error-prone `Map` methods deprecated** - Deprecated `.filterKeys` and `.mapValues` ([#7014](https://togithub.com/scala/scala/pull/7014)) - Instead, use the new methods of the same names on [`MapView`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/MapView.html) (e.g. `.view.filterKeys`) - **Added [`.lazyZip`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/Iterable.html#lazyZip[B](that:Iterable[B]):scala.collection.LazyZip2[A,B,Iterable.this.type])** - Together with `.zip` on views, this replaces `.zipped` (now deprecated). ([scala/collection-strawman#223](https://togithub.com/scala/collection-strawman/pull/223)) - **Added `.tapEach` method** - This allows inserting side-effects in a chain of method calls on a collection or view. ([#7124](https://togithub.com/scala/scala/pull/7124)) - **Added [`.updatedWith`](https://www.scala-lang.org/api/2.13.0/scala/collection/immutable/Map.html#updatedWith[V1>:V](key:K)(remappingFunction:Option[V]=>Option[V1]):CC[K,V1]) and [`updateWith`](https://www.scala-lang.org/api/2.13.0/scala/collection/mutable/Map.html#updateWith(key:K)(remappingFunction:Option[V]=>Option[V]):Option[V]) methods to `Map`s** - `updatedWith` is on `immutable.Map`, `updateWith` is on `mutable.Map`. ([#7320](https://togithub.com/scala/scala/pull/7320), [#7517](https://togithub.com/scala/scala/pull/7517)) - These methods allow modifying a map entry based on its current value. - **Added [`.maxOption`](https://www.scala-lang.org/api/2.13.0/scala/collection/IterableOnceOps.html#maxOption[B>:A](implicitord:scala.math.Ordering[B]):Option[A]), [`.minOption`](https://www.scala-lang.org/api/2.13.0/scala/collection/IterableOnceOps.html#minOption[B>:A](implicitord:scala.math.Ordering[B]):Option[A]), [`.maxByOption`](https://www.scala-lang.org/api/2.13.0/scala/collection/IterableOnceOps.html#maxByOption[B](f:A=>B)(implicitcmp:scala.math.Ordering[B]):Option[A]), [`.minByOption`](https://www.scala-lang.org/api/2.13.0/scala/collection/IterableOnceOps.html#minByOption[B](f:A=>B)(implicitcmp:scala.math.Ordering[B]):Option[A])** - These methods safely handle the empty case. ([#6574](https://togithub.com/scala/scala/pull/6574)) - **Deprecated symbolic methods with multiple arguments** - Such methods may be disallowed entirely in a future Scala. ([#6719](https://togithub.com/scala/scala/pull/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: - [Scala 2.13's Collections](https://docs.scala-lang.org/overviews/collections-2.13/introduction.html) - Intro for newcomers. Skip if the collections from Scala 2.12 and earlier are already familiar to you. - [The Architecture of Scala 2.13 Collections](https://docs.scala-lang.org/overviews/core/architecture-of-scala-213-collections.html) - [Implementing Custom Collections (Scala 2.13)](https://docs.scala-lang.org/overviews/core/custom-collections.html) - [Adding Custom Collection Operations (Scala 2.13)](https://docs.scala-lang.org/overviews/core/custom-collection-operations.html) - [Migrating a Project to 2.13's Collections](https://docs.scala-lang.org/overviews/core/collections-migration-213.html). - This document describes the main changes for collection users that migrate to Scala 2.13 and shows how to cross-build on Scala 2.11/12/13. - [scala-collection-compat](https://togithub.com/scala/scala-collection-compat) - This new module provides shims for cross-building on Scala 2.11/12/13. - It also provides two sets of Scalafix rewrites: one for cross-building, one for moving to 2.13 only. We welcome assistance in continuing to expand and improve these documents. #### Concurrency Futures were internally redesigned, with these goals: - provide expected behavior under a broader set of failure conditions - provide a foundation for increased performance - support more robust applications Details: - Updated and revised our [`Future`](https://www.scala-lang.org/api/2.13.0/scala/concurrent/Future.html) and [`Promise`](https://www.scala-lang.org/api/2.13.0/scala/concurrent/Promise.html) implementation. ([#6610](https://togithub.com/scala/scala/pull/6610), [#7663](https://togithub.com/scala/scala/pull/7663)) - Among other changes, handling of `InterruptedException` and `RejectedExecutionException` is improved. - Made the global `ExecutionContext` “batched”. ([#7470](https://togithub.com/scala/scala/pull/7470)) - Added synchronous ("parasitic") `ExecutionContext`. ([#7784](https://togithub.com/scala/scala/pull/7784)) #### Standard library: additions - **Integrated Java interop** ([#7987](https://togithub.com/scala/scala/pull/7987)) - The old `scala-java8-compat` module is now part of the standard library. ([#7458](https://togithub.com/scala/scala/pull/7458)) - This provides converters for options, function types and Java streams. - (As mentioned above, collection converters such as `JavaConverters` were moved to fit into the new scheme.) - **new: [`scala.util.Using`](https://scala-lang.org/files/archive/api/2.13.0/scala/util/Using$.html)** - This uses the loan pattern to provide a simple form of automatic resource management. ([#6907](https://togithub.com/scala/scala/pull/6907), [#7468](https://togithub.com/scala/scala/pull/7468)) - **new: use `s` interpolator in pattern matches** - Provides a simple string matcher as the dual of the simple string interpolator. ([#7387](https://togithub.com/scala/scala/pull/7387)) - Example: `val s"$day-$month-$year" = "11-June-2019"` - **new: [`pipe`](https://scala-lang.org/files/archive/api/2.13.0/scala/util/ChainingOps.html#pipe[B](f:A=>B):B) and [`tap`](https://scala-lang.org/files/archive/api/2.13.0/scala/util/ChainingOps.html#tap[U](f:A=>U):A)** - These chaining operations are available via `import scala.util.chaining._`. ([#7007](https://togithub.com/scala/scala/pull/7007)) - Example: `3.pipe(_ * 5)` evaluates to 15 - Example: `9.tap(println)` first prints 9, then returns it - **new: `.toIntOption`, et al** - These new extension methods on `String` are provided by [StringOps](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/StringOps.html). - They parse literals and efficiently reject invalid input without throwing exceptions. ([#6538](https://togithub.com/scala/scala/pull/6538)) - Examples: `"12".toIntOption` => `Some(12)`, `"12.3".toIntOption` => `None`, `"12.3".toDoubleOption` => `Some(12.3)` - **new: named `Product` elements** - Case classes and other `Product`s now have [`productElementNames`](https://scala-lang.org/files/archive/api/2.13.0/scala/Product.html#productElementNames:Iterator[String]) and [`productElementName`](https://scala-lang.org/files/archive/api/2.13.0/scala/Product.html#productElementName(n:Int):String) methods. ([#6972](https://togithub.com/scala/scala/pull/6972)) - **new: [`.withRight`](https://scala-lang.org/files/archive/api/2.13.0/scala/util/Left.html#withRight[B1>:B]:scala.util.Either[A,B1]), [`.withLeft`](https://scala-lang.org/files/archive/api/2.13.0/scala/util/Right.html#withLeft[A1>:A]:scala.util.Either[A1,B])** - These methods on `Left` and `Right` allow upcasting the other type parameter ([#7011](https://togithub.com/scala/scala/pull/7011), [#7080](https://togithub.com/scala/scala/pull/7080)) - Example: `Left(3).withRight[String]` has type `Either[Int, String]` without having to write `Int` - **new: [`Ordering.Double.TotalOrdering`](https://scala-lang.org/files/archive/api/2.13.0/scala/math/Ordering$Double$TotalOrdering.html), [`Ordering.Float.TotalOrdering`](https://scala-lang.org/files/archive/api/2.13.0/scala/math/Ordering$Float$TotalOrdering.html)** - The old orderings remain available at: [`Ordering.Double.IeeeOrdering`](https://scala-lang.org/files/archive/api/2.13.0/scala/math/Ordering$Double$IeeeOrdering.html), [`Ordering.Float.IeeeOrdering`](https://scala-lang.org/files/archive/api/2.13.0/scala/math/Ordering$Float$IeeeOrdering.html) - Example: `List(2.0, 1.0).sorted` now warns unless you import or pass an ordering. ([#6410](https://togithub.com/scala/scala/pull/6410)) - **new: converters between functions and extractors** - New methods provide conversions among optional `Function`s, `PartialFunction`s and extractor objects. ([#7111](https://togithub.com/scala/scala/pull/7111)) - **new: `@unused` annotation** - This annotation is useful for suppressing warnings under `-Xlint`. ([#7623](https://togithub.com/scala/scala/pull/7623)) #### Standard library: changes - **Library fits in [compact1 profile](http://openjdk.java.net/jeps/161)** - This reduces deployment footprint for Scala applications. ([#6164](https://togithub.com/scala/scala/pull/6164), [scala/bug#10559](https://togithub.com/scala/bug/issues/10559)) - **[`Option`](https://scala-lang.org/files/archive/api/2.13.0/scala/Option.html) extends [`IterableOnce`](https://scala-lang.org/files/archive/api/2.13.0/scala/collection/IterableOnce.html)** - This improves type inference when calling an overloaded `flatMap`. ([#8038](https://togithub.com/scala/scala/pull/8038)) - Undeprecate `linesIterator` to avoid conflict with JDK 11's `String.lines` ([#7269](https://togithub.com/scala/scala/pull/7269)) - `PartialFunction` now overloads `andThen`. ([#7263](https://togithub.com/scala/scala/pull/7263)) - Replaced `Cloneable`/`Serializable` traits with type aliases ([#6729](https://togithub.com/scala/scala/pull/6729)) - `ControlThrowable` never suppresses ([#7413](https://togithub.com/scala/scala/pull/7413)) #### Standard library: deprecations and removals Not a complete list, only the deprecations users are likeliest to encounter. - String-building using `+` with a non-`String` type on the left (aka `any2stringadd`) is deprecated. ([#6315](https://togithub.com/scala/scala/pull/6315), [#6755](https://togithub.com/scala/scala/pull/6755)) - [`PartialFunction.fromFunction`](https://scala-lang.org/files/archive/api/2.13.0/scala/PartialFunction$.html#fromFunction[A,B](f:A=>B):PartialFunction[A,B]) replaces `PartialFunction.apply` ([#6703](https://togithub.com/scala/scala/pull/6703)) - Right projections on `Either` are deprecated. ([#6682](https://togithub.com/scala/scala/pull/6682), [#8012](https://togithub.com/scala/scala/pull/8012)) - Deprecated `@usecase` Scaladoc tag. ([#7462](https://togithub.com/scala/scala/pull/7462)) - Deprecated universal `Equiv`. ([#7414](https://togithub.com/scala/scala/pull/7414)) - The following modules are no longer included in the distribution: [scala-xml](https://togithub.com/scala/scala-xml), [scala-parser-combinators](https://togithub.com/scala/scala-parser-combinators), [scala-swing](https://togithub.com/scala/scala-swing). - They are community-maintained and published to Maven Central. - Assorted deprecated methods and classes throughout the standard library have been removed entirely. #### Language changes 2.13 is primarily a library release, not a language/compiler release. Regardless, some language changes are included: Features: - **Literal types** - Literals (for strings, integers, and so on) now have associated literal types. ([#5310](https://togithub.com/scala/scala/pull/5310)) - See the original proposal, [SIP-23](https://docs.scala-lang.org/sips/42.type.html), for motivation and details. - The compiler will provide instances of a new typeclass `scala.ValueOf[T]` for all singleton types `T`. - A `Singleton` upper bound prevents widening (e.g. `T <: Int with Singleton`). - The value of a singleton type can be accessed by calling method `valueOf[T]`. Example: `val one: 1 = valueOf[1]` - **Partial unification on by default** - Improves type constructor inference, fixes [SI-2712](https://togithub.com/scala/bug/issues/2712). - We recommend this [great explanation of this feature](https://gist.github.com/djspiewak/7a81a395c461fd3a09a6941d4cd040f2). - This feature is no longer considered experimental ([#5102](https://togithub.com/scala/scala/pull/5102)) - The compiler no longer accepts `-Ypartial-unification`. - **By-name implicits with recursive dictionaries** - This extends by-name method arguments to support implicit (not just explicit) parameters. - This enables implicit search to construct recursive values. - The flagship use-case is typeclass derivation. - Details: see the [by-name implicits SIP](https://docs.scala-lang.org/sips/byname-implicits.html), [#6050](https://togithub.com/scala/scala/pull/6050), [#7368](https://togithub.com/scala/scala/pull/7368) - **Underscores in numeric literals** - Underscores can now be used as a spacer. ([#6989](https://togithub.com/scala/scala/pull/6989)) - Example: `1_000_000` Experimental features: - **Macro annotations** - There is no more ["macro paradise" compiler plugin](https://togithub.com/scalamacros/paradise) for 2.13. - Instead, [macro annotations](https://docs.scala-lang.org/overviews/macros/annotations.html) are handled directly by the compiler. - Macro annotations are enabled with the `-Ymacro-annotations` flag. [#6606](https://togithub.com/scala/scala/pull/6606) - Macro annotations remain experimental. Deprecations: - **Procedure syntax deprecated** - Deprecated: `def m() { ... }`) [#6325](https://togithub.com/scala/scala/pull/6325) - Use instead: `def m(): Unit = { ... }` - **View bounds deprecated** - Deprecated: `A <% B` ([#6500](https://togithub.com/scala/scala/pull/6500)) - Use instead: `(implicit ev: A => B)` - **Symbol literals deprecated** - Symbols themselves remain supported, only the single-quote syntax is deprecated. ([#7395](https://togithub.com/scala/scala/pull/7395)) - Library designers may wish to change their APIs to use `String` instead. - Deprecated: `'foo` - Use instead: `Symbol("foo")` - **Unicode arrows deprecated** - In particular, the single arrow operators had the wrong precedence. ([#7540](https://togithub.com/scala/scala/pull/7540)) - Deprecated: `⇒`, `→`, `←` - Use instead: `=>`, `->`, `<-` - **`postfixOps` syntax disabled by default** - The syntax, already deprecated in 2.12, causes an error in 2.13 unless the feature is explicitly enabled. ([#6831](https://togithub.com/scala/scala/pull/6831)) - Error: `xs size` - Use instead: `xs.size` Adjustments: - Imports, including wildcard imports, now shadow locally defined identifiers. ([#6589](https://togithub.com/scala/scala/pull/6589)) - Underscore is no longer a legal identifier unless backquoted ([bug#10384](https://togithub.com/scala/bug/issues/10384)) - `val _ =` is now a pattern match - `implicit val _ =` is also now a pattern match which does not introduce an identifier and therefore does not add anything to implicit scope - Don't assume unsound type for ident/literal patterns. ([#6502](https://togithub.com/scala/scala/pull/6502)) - Matches of the form `case x@N` involve calling `equals`, so it was unsound to type `x` as `N.type`. - Consider rewriting as `case x:N.type`. - Make extractor patterns null safe. ([#6485](https://togithub.com/scala/scala/pull/6485)) - `null` is treated as no match. - Better typing for overloaded higher-order methods ([#6871](https://togithub.com/scala/scala/pull/6871), [#7631](https://togithub.com/scala/scala/pull/7631)) - This change was a key enabler for the new collections design. - Rework unification of `Object` and `Any` in Java/Scala interop ([#7966](https://togithub.com/scala/scala/pull/7966)) - Name-based pattern matching has changed to enable immutable `Seq` matches ([#7068](https://togithub.com/scala/scala/pull/7068)) - Automatic eta-expansion of zero-argument methods is no longer deprecated ([#7660](https://togithub.com/scala/scala/pull/7660)) - Improve binary stability of extension methods ([#7896](https://togithub.com/scala/scala/pull/7896)) - Macros must now have explicit return types ([#6942](https://togithub.com/scala/scala/pull/6942)) - Mixin fields with trait setters are no longer JVM final ([#7028](https://togithub.com/scala/scala/pull/7028)) - In addition, `object` fields are now static ([#7270](https://togithub.com/scala/scala/pull/7270)) - Support `implicitNotFound` on parameters ([#6340](https://togithub.com/scala/scala/pull/6340)) - Disallow repeated parameters except in method signatures ([#7399](https://togithub.com/scala/scala/pull/7399)) - Value-discard warnings can be suppressed via type ascription to `Unit`. ([#7563](https://togithub.com/scala/scala/pull/7563)) - `x op ()` now parses as `x.op(())` not `x.op()` ([#7684](https://togithub.com/scala/scala/pull/7684)) #### Compiler - **Deterministic, reproducible compilation** - The compiler generates identical output for identical input in more cases, for reproducible builds. ([scala-dev#405](https://togithub.com/scala/scala-dev/issues/405)) - **Optimizer improvements** - Operations on collections and arrays are now optimized more, including improved inlining. ([#7133](https://togithub.com/scala/scala/pull/7133)) And: - Scaladoc supports setting canonical URLs ([#7834](https://togithub.com/scala/scala/pull/7834)) - This helps search engines identify the most relevant/recent version of a page when several versions are available. - Compiler suggests possible corrections for unrecognized identifiers ([#6711](https://togithub.com/scala/scala/pull/6711)) - Example: `List(1).sizzle` => `value sizzle is not a member of List[Int], did you mean size?` - Added `-Yimports` for custom preamble imports. ([#6764](https://togithub.com/scala/scala/pull/6764)) - Example: `-Yimports:x,y,z` means x, y, and z are root imports of the form: `import x._ { import y._ { import z._ { ... } } }` - The scala-compiler JAR no longer depends on scala-xml ([#6436](https://togithub.com/scala/scala/pull/6436)) Plus, changes to compiler options: - Partition options by function: `-V` for verbose, `-W` for warnings - In general, the old flags still exist as aliases. ([#7908](https://togithub.com/scala/scala/pull/7908)) - Exceptions (breaking changes) include: - Replaced `-warn-option` with `-Woption`. - Replaced `-Xprint:all` with `-Vprint:_` - `-Werror` is now recommended over `-Xfatal-warnings`. - Promoted `-deprecation` to `-Xlint:deprecation` ([#7714](https://togithub.com/scala/scala/pull/7714)) - Deprecated `-Xfuture` ([#7328](https://togithub.com/scala/scala/pull/7328)) - Instead, use e.g. `-Xsource:2.14` - Removed `-Yno-adapted-args` - The removal remains under discussion at [scala/bug#11110](https://togithub.com/scala/bug/issues/11110). - Removed `-Xmax-classfile-length` - It's hard-coded to 240 now ([#7497](https://togithub.com/scala/scala/pull/7497)) #### Scripting, environment, and integrations - The script runner (`scala Script.scala`) no longer uses the `fsc` compilation daemon by default. ([#6747](https://togithub.com/scala/scala/pull/6747)) - The daemon was not reliable and will likely be removed entirely from a future release. - [JEP 293](https://openjdk.java.net/jeps/293) style long command-line options are now supported ([#6499](https://togithub.com/scala/scala/pull/6499)) - The REPL has undergone an internal refactoring to enable future improvements. ([#7384](https://togithub.com/scala/scala/pull/7384)) - Ant support is no longer bundled. ([#6255](https://togithub.com/scala/scala/pull/6255)) #### Compiler performance We invested heavily in compiler speedups during the 2.13 cycle, but most of that work actually already landed in the 2.12.x series, with more to come in 2.12.9. In addition, compiler performance in 2.13 is 5-10% better compared to 2.12, thanks mainly to the new collections. See [performance graph](https://scala-ci.typesafe.com/grafana/dashboard/db/scala-benchmark?orgId=1&from=1522695946912&to=1526380271494&var-branch=2.12.x&var-branch=2.13.x&var-source=All&var-bench=HotScalacBenchmark.compile&var-host=scalabench@scalabench@). Also, certain kinds of code now compile much faster because the compiler aggressively prunes polymorphic implicits during search ([#6580](https://togithub.com/scala/scala/pull/6580)). #### Migration Upgrading from 2.12? Enable `-Xmigration` while upgrading to request migration advice from the compiler. #### Compatibility Like Scala 2.12, the 2.13 series targets Java 8, minimum. Both 2.12 and 2.13 also work on later JDKs such as JDK 11; see our [JDK Compatibility Guide](https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html). Although Scala 2.11, 2.12, and 2.13 are mostly source compatible to facilitate cross-building, they are not _binary_ compatible. This allows us to keep improving the Scala compiler and standard library. All 2.13.x releases will be fully binary compatible with 2.13.0, in according with [the policy](http://docs.scala-lang.org/overviews/core/binary-compatibility-of-scala-releases.html) we have followed since 2.10. Projects built with [sbt](http://www.scala-sbt.org/download.html) must use at least sbt 1.2.8 (or 0.13.18) to use Scala 2.13. To move to 2.13, bump the `scalaVersion` setting in your existing project. Scala also works with [Maven](http://docs.scala-lang.org/tutorials/scala-with-maven.html), [Gradle](https://docs.gradle.org/current/userguide/scala_plugin.html), and other build tools. #### 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](http://scala-lang.org/download/2.13.0.html) - Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.13.0%22) - Certain package managers (such as homebrew and SDKMAN) offer Scala. #### Reporting bugs Please file any bugs you encounter on [our issue tracker](https://togithub.com/scala/bug/issues). If you aren't yet sure something is a bug, ask on [users.scala-lang.org](https://users.scala-lang.org). #### Contributors A big thank you to everyone who's helped improve Scala by reporting bugs, improving our documentation, kindly helping others on forums and at meetups, and submitting and reviewing pull requests! You are all magnificent. Scala 2.13.0 is the result of merging over 1500 pull requests. The pull request queue is managed by the Scala team at Lightbend: [Adriaan Moors](https://togithub.com/adriaanm), [Lukas Rytz](https://togithub.com/lrytz), [Jason Zaugg](https://togithub.com/retronym), [Seth Tisue](https://togithub.com/SethTisue), [Stefan Zeiger](https://togithub.com/szeiger), [Eugene Yokota](https://togithub.com/eed3si9n). Thanks to [Lightbend](https://www.lightbend.com/scala) for their continued sponsorship of the Scala core team’s efforts. Lightbend offers [commercial support](https://www.lightbend.com/lightbend-platform-subscription) for Scala. The new collections API was developed in fruitful collaboration with the Scala Center, with major contributions from the community. This release was brought to you by 162 contributors, according to `git shortlog -sn --no-merges 2.13.x ^2.12.x ^e2a211c`. Thank you Julien Richard-Foy, Lukas Rytz, Jason Zaugg, A. P. Marki, Stefan Zeiger, Kenji Yoshida, Adriaan Moors, Josh Lemer, NthPortal, Miles Sabin, Diego E. Alonso-Blas, Seth Tisue, Guillaume Martres, Marcelo Cenerino, Dale Wijnand, Odd Möller, Martin Odersky, Allan Renucci, Georgi Krastev, Eugene Yokota, Harrison Houghton, Martijn Hoekstra, Viktor Klang, Aaron S. Hawley, Ólafur Páll Geirsson, Rex Kerr, hepin1989, Philippus Baalman, Matthew de Detrich, Isaac Levy, exoego, Greg Methvin, Jasper Moeys, Sébastien Doeraene, wholock, Aggelos Biboudis, yui-knk, Matthias Sperl, Xavier Fernández Salas, Ethan Pronovost, Janek Bogucki, awibisono, BuildTools, Mike Skells, Jimin Hsieh, Jonathan Frawley, Xavier GUIHOT, Chris Phelps, chanyong.moon, Cong Zhao, Enno Runne, LPTK, Pathikrit Bhowmick, Yuval Dagan, Li Haoyi, Guillaume Massé, Christopher Hunt, Kamil Kloch, Marco Zühlke, Danila Matveev, Juliusz Sompolski,杨博 (Yang Bo), Masaru Nomura, Benjamin Kurczyk, Vince, taku0, Arnout Engelen, Tim Ruhland, Nicolas Stucki, Nicolas Rinaudo, Stephen Nancekivell, ashwin, Kobenko Mikhail, Song Kun, Anthony Tjuatja, k.bigwheel, ke-to, kelebra, mcintdan, mmocentre, psilospore, roman, svatsan, texasbruce, tim-zh, valydia, veera venky,虎鸣, Adianto Wibisono, Alden Torres, Alejandro Sellero, Alessandro Buggin, Alex Glukhovtsev, Alex Levenson, Alexey-NM, Anatolii, Andrei Baidarov, Andriy Plokhotnyuk, Bakhytzhan Karabalin, Benni, Callum Turnbull, Chris Birchall, Chujie Zeng, Cody Allen, Daniel Dietrich, Daniel Moss, Daniel Slapman, David Barri, David Hoepelman, Denis Buzdalov, Denys Shabalin, Dhanesh, Dhanesh Arole, Edin Dudojević, Eugene Platonov, Faiz Halde, Gabriel Claramunt, Heikki Vesalainen, Iaroslav Zeigerman, Jack Koenig, Jean Michel Rouly, Jeff Brower, Jeff Shaw, Josh, Kazuhiro Sera, Kentaro Tokutomi, Lionel Parreaux, Magnolia.K, Martin Duhem, Michael Steindorfer, Nafer Sanabria, Narek Asadorian, Oleksii Tkachuk, Oscar Boykin, PJ Fanning, Paolo Giarrusso, Pap Lőrinc, Pavel Petlinsky, Peter Fraenkel, Philip, Piotr Kukielka, Qiang Sima, Rob Norris, Robin Stephenson, Rui Gonçalves, Ruud Welling, Ryan McDougall, ShankarShastri, Simão Martins, Sperl Matthias, Sujeet Kausallya Gholap, Uttej Guduru, Vincent de Haan, Vladimir Parfinenko, Vlastimil Dort, Yang Bo, Zizheng Tai, ccjoywang, esarbe, howtonotwin, jvican. #### Conclusion We again thank our contributors and the entire Scala community. May you find Scala 2.13 a joy to code in! ### [`v2.12.12`](https://togithub.com/scala/scala/releases/v2.12.12) [Compare Source](https://togithub.com/scala/scala/compare/v2.12.11...v2.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 in `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](https://togithub.com/scala/scala/pull/8816)) - `immutable.{TreeSet, TreeMap}` are now based on a backport of the 2.13.x implementation. ([#8749](https://togithub.com/scala/scala/pull/8749)) - The builders for `immutable.{HashMap, HashSet}` are more efficient -- they now use mutation during building to reduce memory churn. ([#8726](https://togithub.com/scala/scala/pull/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](https://togithub.com/scala/scala/pulls?q=is%3Amerged%20milestone%3A2.12.12) and [all closed bugs](https://togithub.com/scala/bug/issues?utf8=%E2%9C%93&q=is%3Aclosed+milestone%3A2.12.12). ##### 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](https://www.lightbend.com/scala) for their continued sponsorship of the Scala core team’s efforts. Lightbend offers [commercial support](https://www.lightbend.com/lightbend-platform-subscription) for Scala. #### Scala 2.12 notes The [release notes for Scala 2.12.0](https://togithub.com/scala/scala/releases/v2.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](http://scala-lang.org/download/2.12.12.html) - Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.12.12%22) ### [`v2.12.11`](https://togithub.com/scala/scala/releases/v2.12.11) [Compare Source](https://togithub.com/scala/scala/compare/v2.12.10...v2.12.11) The Scala 2.12.11 release mainly brings bug fixes and performance improvements. ##### Highlights - Performance improvements in the collections library: algorithmic improvements and changes to avoid unnecessary allocations ([list of PRs](https://togithub.com/scala/scala/pulls?q=is%3Apr+milestone%3A2.12.11+is%3Aclosed+sort%3Acreated-desc+label%3Alibrary%3Acollections+label%3Aperformance)) - Performance improvements in the compiler ([list of PRs](https://togithub.com/scala/scala/pulls?q=is%3Apr+milestone%3A2.12.11+is%3Aclosed+sort%3Acreated-desc+-label%3Alibrary%3Acollections+label%3Aperformance+), minor [effects in our benchmarks](https://scala-ci.typesafe.com/grafana/dashboard/db/scala-benchmark?orgId=1&from=1567985515850&to=1584355915694&var-branch=2.12.x&var-source=All&var-bench=HotScalacBenchmark.compile&var-host=scalabench@scalabench@)) - Improvements to `-Yrepl-class-based`, an alternative internal REPL encoding that avoids deadlocks (details on [#8712](https://togithub.com/scala/scala/pull/8712)) - A new `-Yrepl-use-magic-imports` flag that avoids deep class nesting in the REPL, which can lead to deteriorating performance in long sessions ([#8576](https://togithub.com/scala/scala/pull/8576)) - Fix some `toX` methods that could expose the underlying mutability of a `ListBuffer`-generated collection ([#8674](https://togithub.com/scala/scala/pull/867Renovate configuration
:date: Schedule: At any time (no schedule defined).
:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.
:recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
:no_bell: Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.