Coming soon: Scala 2.12.11, Scala 2.13.2

We (the Scala team at Lightbend) are now winding down the scala/scala PR queue in preparation for two releases:

  • 2.12.11: target date February 18 (not a hard deadline)
  • 2.13.2: target date February 25 (not a hard deadline)

2.12.10 came out in September; 51 PRs have been merged since then, mostly bugfixes or improvements to compiler performance or collections performance.

2.13.1 was also September; 90 2.13 PRs have been merged since then, and the 2.12.10 changes will of course be included too.

Both releases will improve compatibility with recent JDK versions such as 14. More details on that and the other included changes will be the draft release notes that we’ll post here soon-ish.

In general, the goal here is to ship already-merged changes, since some months have passed. But there are also some things we and contributors are still finishing up. If there’s a PR or a blocking issue you’re concerned won’t make the cut, feel free to comment on it to bring it to our attention.

For those wanting all the gory details, follow these tickets:

For less detail, just watch this thread, we’ll update it from time to time with how things are going.

19 Likes

As of today, many bugs and pull requests have been re-milestoned from 2.13.2 to 2.13.3 (or, in some cases, Backlog).

This doesn’t mean they can’t perhaps still make 2.13.2, just that they won’t affect 2.13.2 release planning or timing.

If you want to test a prerelease (please do!), a good prerelease to test is whatever the community build is currently on, as seen here:

As always, to use a Scala nightly build, you need to add a resolver:

resolvers += "scala-integration" at
  "https://scala-ci.typesafe.com/artifactory/scala-integration/"
3 Likes

Most notable remaining 2.13.2 work items:

Or if you can’t handle all that tension and just want to relax and review what’s already in, here’s the merged PRs with the “release-notes” label:

7 Likes

updates:

  • both target dates have been pushed back a bit, as PRs are still in process
    • very tentatively: 2.12.11 Feb 26, 2.13.2 March 6? we’ll see
  • the floating-point-Ordering thing has been resolved by https://github.com/scala/scala/pull/8721
  • configurable warnings are nearly ready for merge
  • Dale is doing some additional REPL work that he’ll update us on before long

Things are moving along.

3 Likes

Does that mean the warning on Seq.fill(4)(math.random()).sorted will go away? That would be great!

Yes:

Welcome to Scala 2.13.2-20200221-161119-b6850a0 (OpenJDK 64-Bit Server VM, Java 1.8.0_242).
Type in expressions for evaluation. Or try :help.

scala> Seq.fill(4)(math.random()).sorted
val res0: Seq[Double] = List(0.5648754081376393, 0.5713598328482244, 0.7388626006594553, 0.8350097176800951)

scala> :replay -Xmigration
replay> Seq.fill(4)(math.random()).sorted
                                   ^
        warning: object DeprecatedDoubleOrdering in object Ordering has changed semantics in version 2.13.0:
          The default implicit ordering for doubles now maintains consistency
          between its `compare` method and its `lt`, `min`, `equiv`, etc., methods,
          which means nonconforming to IEEE 754's behavior for -0.0 and NaN.
          The sort order of doubles remains the same, however, with NaN at the end.
          Import Ordering.Double.IeeeOrdering to recover the previous behavior.
          See also https://www.scala-lang.org/api/current/scala/math/Ordering$$Double$.html.
val res0: Seq[Double] = List(0.023228215388040097, 0.061945732108565355, 0.41556056320286316, 0.8010680874673899)
1 Like

In Scala 2.13.2 that plan is for the REPL to switch to “class-based wrappers” which resolves a source of deadlocks in the REPL (aka scala/bug#9076).

In Scala 2.12.11 this will only be true if you opt-in to -Yrepl-class-based.

For more details see my and @retronym’s PR description: https://github.com/scala/scala/pull/8712.

1 Like

The PR queue and bug list for Scala 2.12.11 are down to zero, which means that the current build, 2.12.11-bin-f139b61 (update: 2.12.11-bin-cd8410d), is our release candidate.

To test the candidate in your project, add a resolver for scala-integration and update the scala version, in sbt:

resolvers += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/"
scalaVersion := "2.12.11-bin-cd8410d"

2.12.11 will ship with improvements to -Yrepl-class-based, a flag that changes the encoding in the REPL, and -Yrepl-use-magic-imports, a lightweight encoding for import priorities. Bot of these flags will be enabled by default in the upcoming 2.13.2 release, therefore testing the REPL is especially appreciated.

An easy way to run the REPL is by using courser:

$> java -cp $(cs fetch -p -r https://scala-ci.typesafe.com/artifactory/scala-integration org.scala-lang:scala-compiler:2.12.11-bin-cd8410d) scala.tools.nsc.MainGenericRunner -usejavacp -Yrepl-class-based -Yrepl-use-magic-imports
Welcome to Scala 2.12.11-bin-cd8410d (Java HotSpot(TM) 64-Bit GraalVM EE 19.2.1, Java 1.8.0_231).
Type in expressions for evaluation. Or try :help.

scala> for (i <- (1 to 10).par) yield i // no deadlock, https://github.com/scala/bug/issues/9076
res0: scala.collection.parallel.immutable.ParSeq[Int] = ParVector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

scala> class Meter(val x: Int) extends AnyVal { override def toString = s"${x}m" }
defined class Meter

scala> new Meter(42)
res1: Meter = 42m

Other than the REPL changes, 2.12.11 ships bug fixes and performance improvements in the compiler and the collections library.

1 Like

(Added some improvements to my scala-runners wrappers so now you can run that with just

scala --scala-version 2.12.11-bin-cd8410d -Yrepl-class-based -Yrepl-use-magic-imports

brew install --HEAD dwijnand/formulas/scala-runners! :smile:)

2 Likes

Could you please update https://raw.githubusercontent.com/scala/community-builds/2.12.x/nightly.properties so that it points to that release candidate, then?

This will allow https://github.com/scala-js/scala-js-test-scala-nightly to automatically test Scala.js, as well as derivatives of that script (e.g., Shapeless uses that too: https://github.com/milessabin/shapeless-test-scala-nightly).

I didn’t realize other projects are using this reference :slight_smile:

It’s lagging because the community build for f139b61 is shaking out a few more issues

So there will be another “RC”, hopefully soon.

The two collections regressions (https://github.com/scala/scala-dev/issues/672, https://github.com/scala/scala-dev/issues/673) are now fixed.

The community build is again green, so https://raw.githubusercontent.com/scala/community-builds/2.12.x/nightly.properties now points to the new “RC”, which is 2.12.11-bin-d1e9ac0.

2 Likes

Scala.js is green: https://travis-ci.org/scala-js/scala-js-test-scala-nightly/builds/657071108

3 Likes

Latest 2.12.11 milestone is 2.12.11-bin-e1e2bfe. It includes one more collection fix (quite minor, only affecting serialization compatibility).

At present the only open 2.12.11 ticket is https://github.com/scala/scala-dev/issues/675 , but it looks like we’ll just close that one and release-note it.

3 Likes

some 2.13.2 updates:

3 Likes

No further 2.12.11 problems have turned up, but we’re waiting a bit longer while some users test it for possible performance regressions. Rough first-draft release notes: https://gist.github.com/SethTisue/5754a63fa0e3561349367ba6f0224f40

2 Likes

In the end, no performance problems turned up.

We merged one final PR with a tiny, safe change that avoids some annoying warnings in the REPL.

https://raw.githubusercontent.com/scala/community-builds/2.12.x/nightly.properties now points to 2.12.11-bin-cd8410d .

We’ll go ahead and re-release that version as 2.12.11 soon — we’re a bit busy with the SIP retreat in Lausanne, so maybe this week, maybe first thing next week.

2 Likes

Scala 2.12.11 is now on maven central. The official announcement will follow soon, but the release notes are already on https://github.com/scala/scala/releases/tag/v2.12.11 (feedback welcome).

5 Likes

Support for 2.12.11 for Scala.js 0.6.32, 1.0.0 and 1.0.1 is on its way to Maven Central.

2 Likes