2.12.0-M5 is staged (not yet tagged or released)

277 views
Skip to first unread message

Lukas Rytz

unread,
Jun 29, 2016, 9:17:32 AM6/29/16
to scala-i...@googlegroups.com
Hi All

Scala 2.12.0-M5 is staged on Sonatype. This is the last milestone, the next release
will be RC1.

We are still working on the release notes, but here's a quick overview. M5 introduces
some changes to the compilation of concrete trait methods:
 -  A static method (in the interface classfile) contains the actual implementation, a
   default method forwards to the static one. See #5177 for details.
 - Classes extending traits no longer get mixin forwarders (in most cases), the JVM
   picks the right default method, see #5085. [1]

Other notable changes (full list here):
  - Partial unification of type constructors, behind `-Ypartial-unification`, fixes SI-2712.
    Thanks @milessabin!
  - The new optimizer now listends to `-opt` (instead of `-Yopt`)
  - Local methods that don't capture `this` are now emitted as static, which prevents
    capturing the outer instance in lambdas (SI-9390).


To try out the new milestone, add the following to your sbt build:
resolvers ++= Seq(
  "Scala 2.12.0-M5 Core" at "https://oss.sonatype.org/content/repositories/orgscala-lang-1322/",
  "Scala 2.12.0-M5 Modules" at "https://oss.sonatype.org/content/repositories/orgscala-lang-1323/")

scalaVersion := "2.12.0-M5"
You may also download the distro (zip, tgz, msi).


Huge thanks to all contributers!
Cheers: Lukas


[1] Note that this causes a performance regression: for example it slows down the
Scala compiler by 20%. So the change will most likely be reverted. Details on why
and how it impacts binary compatibility will follow.

Sébastien Doeraene

unread,
Jun 29, 2016, 10:33:50 AM6/29/16
to scala-internals
Hello,

And here is a resolver for Scala.js 0.6.10 to go with Scala 2.12.0-M5:

resolvers += "Scala.js for Scala 2.12.0-M5" at "https://oss.sonatype.org/content/repositories/orgscala-js-1045"

Older versions of Scala.js will not work with 2.12.0-M5, so you'll need to upgrade to 0.6.10.

Cheers,
Sébastien

--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adriaan Moors

unread,
Jun 29, 2016, 1:36:33 PM6/29/16
to scala-internals
That must be a new speed record in releasing Scala.js for a Scala milestone, Sébastien!

I'm very excited about everything coming together nicely for 2.12! I really appreciate all the work everyone is putting into this release!

As Lukas said, some important polish remains for RC1, so we will be focussing on that for the next 4-6 weeks. Anything that can be fixed in 2.12.1 will have to wait until then. The RC cycle is reserved for crucial fixes that break binary compatibility (either directly or by changing byte code generation) or that resolve issues that would otherwise significantly hamper adoption of 2.12.0 (e.g., performance regressions). After RC1, we'll go to a two-week cycle until the final release.

Thank you for your patience with us as we focus on getting the best possible RC out, even if that means we can devote a bit less attention than we would like to 2.11.9 and 2.12.1. To keep the PR queue traffic flowing, we'll develop 2.12.0 on a separate branch from 2.12.x.

cheers
adriaan

PS: sonatype aggregates all staging repos here: https://oss.sonatype.org/content/repositories/staging, so you can just add this one resolver (if you're not worried about accidentally picking up artifacts from other staging repos, which seems unlikely)

Adriaan Moors

unread,
Jun 29, 2016, 7:39:03 PM6/29/16
to scala-internals
M5 is now tagged and on maven!

Eugene Burmako

unread,
Jun 30, 2016, 3:56:52 AM6/30/16
to scala-internals, Bill Venners
Congrats! I'll need a build of ScalaTest for M5, and then I can release paradise.

Bill Venners

unread,
Jun 30, 2016, 11:46:07 AM6/30/16
to Eugene Burmako, scala-internals, Rickard Nilsson
Hi Eugene,

We'll need a ScalaCheck for 2.12.0-M5 before we can build ScalaTest.
I've CC'd Rickard.

Is a 3.0.0-RC3 release fine? So far we've gotten no issues with RC3,
so with luck it will become 3.0.0 final very soon. Upgrading should be
quite straightforward if you haven't upgraded yet.

Bill
--
Bill Venners
Artima, Inc.
http://www.artima.com

Bill Venners

unread,
Jun 30, 2016, 11:54:19 AM6/30/16
to Eugene Burmako, scala-internals, Rickard Nilsson
Hi Eugene,

Great, thanks. We'll make a 3.0.0-RC3 release for 2.12.0-M5 first (as
soon as we have a ScalaCheck release) and see how that goes.

Bill

On Thu, Jun 30, 2016 at 11:52 AM, Eugene Burmako <eugene....@epfl.ch> wrote:
> Hi Bill,
>
> I've just tried to upgrade the 2.12.0-M4 of paradise from ScalaTest 2.2.6 to
> ScalaTest 3.0.0-RC3 and didn't encounter any problems. I think that
> 3.0.0-RC3 will be fine.
>
> Thank you,
> Eugene

Adriaan Moors

unread,
Jun 30, 2016, 12:24:00 PM6/30/16
to scala-i...@googlegroups.com, Eugene Burmako, Rickard Nilsson
In order to publish akka, we'll also need a Scalatest 2.2.x for 2.12.0-M5. Thanks!

Rickard Nilsson

unread,
Jun 30, 2016, 1:28:27 PM6/30/16
to Bill Venners, Eugene Burmako, scala-internals
Hi all,

I have published Scala 2.12.0-M5 builds for ScalaCheck 1.11.6, 1.12.5
and 1.13.1.


Regards,
Rickard

Adriaan Moors

unread,
Jun 30, 2016, 1:31:19 PM6/30/16
to scala-i...@googlegroups.com, Bill Venners, Eugene Burmako
Thanks, Rickard!

Bill Venners

unread,
Jun 30, 2016, 1:31:54 PM6/30/16
to Rickard Nilsson, Eugene Burmako, scala-internals
Hi Ricakrd,

Thanks for the quick turn-around. We'll get ScalaTest out as soon as we can.

Bill

Miles Sabin

unread,
Jul 1, 2016, 9:00:58 AM7/1/16
to scala-internals, Rickard Nilsson, Eugene Burmako
I can publish macro-compat and shapeless as soon as macro-paradise is available.

Cheers,


Miles
Miles Sabin
tel: +44 7813 944 528
skype: milessabin
gtalk: mi...@milessabin.com
http://milessabin.com/blog
http://twitter.com/milessabin

Viktor Klang

unread,
Jul 1, 2016, 9:03:44 AM7/1/16
to scala-i...@googlegroups.com, Rickard Nilsson, Eugene Burmako

🎵Keep spendin most our lives livin in a macro-paradise...🎵

--
Cheers,

Bill Venners

unread,
Jul 1, 2016, 11:35:34 AM7/1/16
to scala-internals, rickard...@telia.com, eugene....@epfl.ch
Hi All,

Sorry we have tests failing under 2.12.0-M5 because ListSet reversed its insertion order preservation. I am unable to locate Scaladoc for 2.12.0-M5, which I wanted to check to see if this behavior is now specified. It used to do this:

// in 2.11.8
scala> import scala.collection.immutable.ListSet
import scala.collection.immutable.ListSet

scala> val xs = ListSet(2, 1, 3)
xs: scala.collection.immutable.ListSet[Int] = ListSet(3, 1, 2)

Now it does this:

// in 2.12.0-M5
scala> import scala.collection.immutable.ListSet
import scala.collection.immutable.ListSet

scala> val xs = ListSet(2, 1, 3)
xs: scala.collection.immutable.ListSet[Int] = ListSet(2, 1, 3)

I think the new behavior is more intuitive, but I want to make sure this is actually guaranteed by the semantics. My understanding of ListSet (and ListMap) was that the point of them was to preserve insertion order. However, inspecting the Scaladoc I see no such promise. Can someone validate my beliefs?

We'll need to release a 3.0.0-RC4 for 2.12.0-M5 because this will require a change to the code. We've been using ListSet to enforce the default order of test execution as the order of appearance in the test class.

Thanks.

Bill


On Thursday, June 30, 2016 at 1:31:54 PM UTC-4, Bill Venners wrote:
Hi Ricakrd,

Thanks for the quick turn-around. We'll get ScalaTest out as soon as we can.

Bill

>>>>>>> wrote:
>
>>>>>>>>
>
>>>>>>>> Hello,
>
>>>>>>>>
>
>>>>>>>> And here is a resolver for Scala.js 0.6.10 to go with Scala
>
>>>>>>>> 2.12.0-M5:
>
>>>>>>>>
>
>>>>>>>> resolvers += "Scala.js for Scala 2.12.0-M5" at
>
>>>>>>>> "https://oss.sonatype.org/content/repositories/orgscala-js-1045"
>
>>>>>>>>
>
>>>>>>>> Older versions of Scala.js will not work with 2.12.0-M5, so you'll
>
>>>>>>>> need
>
>>>>>>>> to upgrade to 0.6.10.
>
>>>>>>>>
>
>>>>>>>> Cheers,
>
>>>>>>>> Sébastien
>
>>>>>>>>
>
>>>>>>>> On Wed, Jun 29, 2016 at 3:17 PM, Lukas Rytz
>

Stefan Zeiger

unread,
Jul 1, 2016, 12:49:12 PM7/1/16
to scala-i...@googlegroups.com
On 2016-07-01 17:35, Bill Venners wrote:
Sorry we have tests failing under 2.12.0-M5 because ListSet reversed its insertion order preservation. I am unable to locate Scaladoc for 2.12.0-M5, which I wanted to check to see if this behavior is now specified. It used to do this:

// in 2.11.8
scala> import scala.collection.immutable.ListSet
import scala.collection.immutable.ListSet

scala> val xs = ListSet(2, 1, 3)
xs: scala.collection.immutable.ListSet[Int] = ListSet(3, 1, 2)

Now it does this:

// in 2.12.0-M5
scala> import scala.collection.immutable.ListSet
import scala.collection.immutable.ListSet

scala> val xs = ListSet(2, 1, 3)
xs: scala.collection.immutable.ListSet[Int] = ListSet(2, 1, 3)

I think the new behavior is more intuitive, but I want to make sure this is actually guaranteed by the semantics. My understanding of ListSet (and ListMap) was that the point of them was to preserve insertion order. However, inspecting the Scaladoc I see no such promise. Can someone validate my beliefs?

The behavior changed in https://github.com/scala/scala/pull/5103. Scaladoc is here: http://www.scala-lang.org/api/2.12.0-M5/scala/collection/immutable/ListSet.html. Preservation of insertion order is now documented.

Bill Venners

unread,
Jul 1, 2016, 2:22:17 PM7/1/16
to scala-internals
Hi Stefan,

Very nice improvement to the Scaladoc. I realized it doesn't matter because Chee Seng reminded me we'll need to make our own Set implementation that preserves insertion order consistently across 2.10, 2.11, and 2.12. I'll aim to get that finished tonight and get a build out the door for 2.12.0-M5 as soon as possible.

Bill

Bill Venners

unread,
Jul 3, 2016, 1:27:44 PM7/3/16
to scala-internals
Hi All,

We finally have a ScalaTest/Scalactic release out for Scala 2.12.0-M5, version 3.0.0-RC4. Here:

https://oss.sonatype.org/content/groups/public/org/scalatest/scalatest_2.12.0-M5/3.0.0-RC4/

and here for Scala.js 0.6.10:

https://oss.sonatype.org/content/groups/public/org/scalatest/scalatest_sjs0.6_2.12.0-M5/3.0.0-RC4/

Sorry it took a while because the change to ListSet in 2.12.0-M5 broke ScalaTest significantly enough that we needed to do an entirely new 3.0 RC release. Also for some reason we were unable to run tests on Node (seemed to hang at 100% CPU), and it takes a while to run all the JS tests on Rhino. That's actually still a problem to look into, but this release should work well enough so that downstream libraries can be built.

Enjoy!

Bill

Eugene Burmako

unread,
Jul 3, 2016, 1:48:22 PM7/3/16
to <scala-internals@googlegroups.com>
Hi everyone,

Thanks Bill!


--

Miles Sabin

unread,
Jul 4, 2016, 6:15:32 AM7/4/16
to scala-internals
I've just published macro-compat-1.1.1 for 2.12.0-M5 JVM/JS.

I'm trying to get a shapeless build for 2.12.0-M5 out but I'm having
problems with 2.12.0-M5/JUnit/scala-2.12-junit-mixin-plugin. When
compiling the tests for JS I'm seeing,

> test
[info] Compiling 1 Scala source to
/home/miles/projects/shapeless/core/js/target/scala-2.12.0-M5/classes...
[info] Fast optimizing
/home/miles/projects/shapeless/core/js/target/scala-2.12.0-M5/shapeless-test-fastopt.js
[error] Referring to non-existent method
org.junit.Assert$.assertEquals(scala.Long,scala.Long)scala.Unit
[error] called from shapeless.PolyTests.testPolyVal()scala.Unit

... and many, many more "called from ..." lines.

Any ideas?

The JUnit tests are fine on JVM with the plugin.

Cheers,


Miles

Sébastien Doeraene

unread,
Jul 4, 2016, 7:04:54 AM7/4/16
to scala-internals
Hello Miles,

It seems you're depending on the JVM artifact of *JUnit* instead of the _sjs artifact, for some reason. Could you check that you're using the ScalaJSJUnitPlugin on the JS part of the project, and that you don't have an additional dependency on the JVM JUnit artifacts? (if you have both, the JVM artifact could take precedence on the classpath and cause issues).

Otherwise, could you point me to a branch with your efforts?

Cheers,
Sébastien

Miles Sabin

unread,
Jul 4, 2016, 11:59:57 AM7/4/16
to scala-internals
I've just published shapeless-2.3.1 for 2.12.0-M5 JVM/JS.

Sébastien's suggestion here,

https://github.com/scala-js/scala-2.12-junit-mixin-plugin/issues/12#issuecomment-230266837

fixed the problem I was having earlier. The JUnit configuration in the
shapeless build now looks like this,

https://github.com/milessabin/shapeless/blob/shapeless-2.3.1-scala-2.12.0-M5/build.sbt#L60-L92

Cheers,


Miles

Michael Pilquist

unread,
Jul 5, 2016, 5:06:35 PM7/5/16
to scala-i...@googlegroups.com
FYI, I’ve published the following for 2.12.0-M5:

scodec-bits 1.1.0 (JVM/JS)
scodec-core 1.10.2 (JVM/JS)

scalaz-stream 0.8.3 (JVM, built against scodec-bits 1.1.0 & scalaz 7.1.8)
scalaz-stream 0.8.3a (JVM, built against scodec-bits 1.1.0 & scalaz 7.2.4)

fs2-core / fs2-io 0.9.0-M5 (JVM)

Cheers,
Michael

Adriaan Moors

unread,
Jul 5, 2016, 5:10:49 PM7/5/16
to scala-i...@googlegroups.com
Excellent! Thanks Michael!

Seth Tisue

unread,
Aug 12, 2016, 8:24:49 PM8/12/16
to scala-internals
I've added a 2.12.0-M5 section to the 2.12 libraries page here:

Please let me know (or better yet, submit a PR) if anything is missing, needs updating, etc.

The usual suspects (except kind-projector) all seem to have been published. FS2 joins the page for the first time.

Seth Tisue / Scala team / Lightbend, Inc.
Reply all
Reply to author
Forward
0 new messages