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)
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.
$> 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.
we assessed the JLine 3 situation this past week and are optimistic that PR can land for 2.13.2. there are a bunch of details to chase down, so there are now separate tickets at https://github.com/scala/scala-dev/labels/t%3Ajline3 (which are marked as “blocker” or “prio:low” according to whether they block the PR from landing or not)
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.
The replacement of Vector is a big change, so that’s one that we hope the community will give some additional testing (of both correctness and performance) before release.