Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt hand-written to RC2 #188

Merged
merged 4 commits into from
Oct 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 31 additions & 47 deletions hand-written.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,38 @@
We are happy to announce the availability of Scala 2.12.0-RC1!
We are happy to announce the availability of Scala 2.12.0-RC2!

Note, however, that Scala 2.12.0-RC2 will follow, due to known
regressions detailed below.
This RC fixes all reported regressions since 2.11.
It will become the final by October 28th, unless we hear of any issues that block your upgrade to 2.12 before then!

The most notable changes since M5 are:

- [#5135](https://github.com/scala/scala/pull/5135): Either is now
right-biased
- [SI-4826](https://issues.scala-lang.org/browse/SI-4826): Scaladoc now
supports doc comments in Java sources
- [SI-7187](https://issues.scala-lang.org/browse/SI-7187): Eta-expansion of
zero-argument method values is now deprecated
- [#5307](https://github.com/scala/scala/pull/5307): Reduced interference
from SAMs when inferring function types in the presence of overload
- [#5141](https://github.com/scala/scala/pull/5141) /
[#5294](https://github.com/scala/scala/pull/5294): Refactoring
of `def`, `val`, and `lazy val` handling, fixing assorted corner
cases and inconsistencies
- [#5311](https://github.com/scala/scala/pull/5311): Scala is now built with
sbt instead of Ant (affects only contributors, not users)
Here are the [most noteworthy fixes](https://github.com/scala/scala/pulls?q=is%3Apr+is%3Amerged+milestone%3A2.12.0-RC2+label%3Arelease-notes) since RC1:

In total, we merged [82 pull requests](https://github.com/scala/scala/pulls?q=is%3Apr+is%3Amerged+milestone%3A2.12.0-RC1), of which [6 are by new contributors](https://github.com/scala/scala/pulls?utf8=%E2%9C%93&q=is%3Apr%20is%3Amerged%20milestone%3A2.12.0-RC1%20label%3Awelcome) -- welcome!
This milestone resolves [25 JIRA tickets](https://issues.scala-lang.org/issues/?jql=project%20%3D%20SI%20AND%20status%20%3D%20CLOSED%20AND%20resolution%20%3D%20Fixed%20AND%20fixVersion%20%3D%20%22Scala%202.12.0-RC1%22%20ORDER%20BY%20component%20ASC%2C%20priority%20DESC).
- [#5429](https://github.com/scala/scala/pull/5429) Default `-Xmixin-force-forwarders` to `true` (regression in performance of generated code);
- [#5398](https://github.com/scala/scala/pull/5398) [SD-225](https://github.com/scala/scala-dev/issues/225) Use a `lzycompute` method for module initialization. Address a performance regression;
- [#5417](https://github.com/scala/scala/pull/5417) [SD-233](https://github.com/scala/scala-dev/issues/233) `synchronized` blocks are JIT-friendly again;
- [#5433](https://github.com/scala/scala/pull/5433) Don't deprecate `Either.left` and `Either.right` yet;
- [#5392](https://github.com/scala/scala/pull/5392) [SI-9918](https://issues.scala-lang.org/browse/SI-9918) Don't crash on `object` in `trait` mixed into package object;
- [#5397](https://github.com/scala/scala/pull/5397) [SI-9920](https://issues.scala-lang.org/browse/SI-9920) Avoid linkage errors with captured local objects + self types;
- [#5430](https://github.com/scala/scala/pull/5430) Emit `object` in method like `lazy val`;
- [#5442](https://github.com/scala/scala/pull/5442) [SI-9943](https://issues.scala-lang.org/browse/SI-9943) `sealed` class does not yield SAM type;

As usual for Scala pre-releases, 2.12.0-RC1 is not binary compatible with any other Scala version, including any 2.12 milestones.
The [RC1 release notes](http://scala-lang.org/news/2.12.0-RC1) have a list of important changes since M5.


In total, we merged [29 pull requests](https://github.com/scala/scala/pulls?q=is%3Apr+is%3Amerged+milestone%3A2.12.0-RC2).
This milestone resolves [6 JIRA tickets](https://issues.scala-lang.org/issues/?jql=project%20%3D%20SI%20AND%20status%20%3D%20CLOSED%20AND%20resolution%20%3D%20Fixed%20AND%20fixVersion%20%3D%20%22Scala%202.12.0-RC2%22%20ORDER%20BY%20component%20ASC%2C%20priority%20DESC) and [9 scala-dev issues](https://github.com/scala/scala-dev/milestone/9?closed=1).

As usual for Scala pre-releases, 2.12.0-RC2 is not guaranteed to be binary compatible with any other Scala version, including any 2.12 milestones and release candidates.

### Known issues

As with previous 2.12 builds, the new trait encoding may make some
trait-based code run slower. As a result, compile times may also be
longer in 2.12 than 2.11. We welcome feedback from the Scala
community helping to isolate unusual slowdowns.

The following known regressions will be fixed in 2.12.0-RC2:

* [SD-225](https://github.com/scala/scala-dev/issues/225)
may cause drastically longer compile times for certain
kinds of code.
* [SI-9918](https://issues.scala-lang.org/browse/SI-9918) may
cause `scala.reflect.internal.Types$TypeError`s in code
involving package objects.
* [SI-9920](https://issues.scala-lang.org/browse/SI-9920) may
cause `java.lang.NoSuchMethodError`s at runtime.
* A regression may cause `java.util.NoSuchElementException`s in
`scala.tools.nsc.backend.jvm.BCodeSkelBuilder`; see
[#5395](https://github.com/scala/scala/pull/5395).

Because of the last-mentioned regression,
[Shapeless](https://github.com/milessabin/shapeless) will not be
published for 2.12.0-RC1.
trait-based code run slower. We've investigated this issue in depth,
and have implemented important improvements in RC2.
Compile times may still be longer in 2.12 than 2.11. Please let us know
if you notice any performance regressions. We will continue to tweak
the bytecode we emit during the 2.12.x cycle to get the best performance out of the JVM.

We welcome feedback from the Scala community helping to isolate unusual slowdowns.

We hope to address the following in a future 2.12.x release:

Expand Down Expand Up @@ -77,7 +61,7 @@ With Java 8 allowing concrete methods in interfaces, Scala 2.12 is able to compi

#### Java 8-style lambdas

Scala 2.12 emits closures in the same style as Java 8, whether they target a FunctionN class from the standard library or a user-defined Single Abstract Method type. The type checker accepts a function literal as a valid expression for either kind of "function-like" type (built-in or SAM). This improves the experience of using libraries written for Java 8 in Scala.
Scala 2.12 emits closures in the same style as Java 8, whether they target a `FunctionN` class from the standard library or a user-defined Single Abstract Method (SAM) type. The type checker accepts a function literal as a valid expression for either kind of "function-like" type (built-in or SAM). This improves the experience of using libraries written for Java 8 in Scala.

For each lambda the compiler generates a method containing the lambda body, and emits an `invokedynamic` that will spin up a lightweight class for this closure using the JDK's `LambdaMetaFactory`.

Expand Down Expand Up @@ -106,7 +90,7 @@ The following optimizations are available:
`Either` now supports operations like `map`, `flatMap`, `contains`,
`toOption`, and so forth, which operate on the right-hand side.

`.left` and `.right` are deprecated in favor of `.swap`.
(`.left` and `.right` may be deprecated in favor of `.swap` in a later release.)

The changes are source-compatible with old code (except in the
presence of conflicting extension methods).
Expand Down Expand Up @@ -179,14 +163,14 @@ The [Scala 2.11.1 release notes](http://scala-lang.org/news/2.11.1) explain in m

A big thank you to everyone who's helped improve Scala by reporting bugs, improving our documentation, spreading kindness in mailing lists and other public fora, and submitting and reviewing pull requests! You are all magnificent.

According to `git shortlog -sn --no-merges v2.12.0-M5..v2.12.0-RC1`, the following contributors helped to realize this milestone: Adriaan Moors, Jason Zaugg, Lukas Rytz, Stefan Zeiger, A. P. Marki, Simon Ochsenreither, Seth Tisue, Jakob Odersky, Dale Wijnand, Dima Tkach, Janek Bogucki, Michał Pociecha, Christopher Davenport, Martin Olsson, tomjridge, Miles Sabin, Oscar Boykin, Raul Bache, Rex Kerr, Dmitriy Pogretskiy, Daniel Barclay, Antoine Gourlay, Steven Mitchell, Carsten Varming. Thank you!
According to `git shortlog -sn --no-merges v2.12.0-RC1..v2.12.0-RC2`, the following contributors helped to realize this release candidate: Adriaan Moors, Jason Zaugg, Lukas Rytz, Seth Tisue, Stefan Zeiger, Antoine Gourlay, Raphael Jolly. Thank you!

## Release notes

Improvements to these release notes [are welcome!](https://github.com/scala/make-release-notes/blob/2.12.x/hand-written.md)

## Obtaining Scala

* Download a distribution from [scala-lang.org](http://scala-lang.org/download/2.12.0-RC1.html)
* Download a distribution from [scala-lang.org](http://scala-lang.org/download/2.12.0-RC2.html)
* Bump the `scalaVersion` setting in your sbt-based project
* Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.12.0-M5%22)
* Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.12.0-RC2%22)