Hello! We are excited to announce 0.27.0-RC1 of Dotty. In this version, we bring ScalaJS support to Dotty. As we are getting closer to the Scala 3 release, we continue shifting our focus to stability and performance, which are the central theme of this release.
You can try out this version right now, from the comfort of your SBT, by visiting the home page and scrolling down to the "Create a Dotty Project" section.
Alternatively, you can try this version of Scala online via Scastie. Once you're there, click "Build Settings" and set "Target" to "Dotty".
Enjoy the ride🚀!
This release brings enough support for Scala.js that it should be actually usable in a number of projects. To use it, make sure of the following:
- Use sbt-scalajs v1.1.1 or later
- Use sbt-dotty v0.4.2 or later
scalaVersion := "0.27.0-RC1"or later for Dotty
When the above are combined, sbt-scalajs ans sbt-dotty will coordinate to transparently configure your project with Dotty with its Scala.js support.
In this release, the following features are supported:
- Dependencies with
%%%, including with
- The entire portable subset of the language, i.e., code that compiles both on the JVM and on JS,
The following features are not supported yet:
- Define non-native JS classes (i.e., classes extending
@js.native): they will report compile errors
- Exports of all kinds (i.e.,
@JSExportXYZ): they will be silently ignored
To the best of our knowledge, cross-compiling libraries should be able to use Scala.js with Dotty in plain capacity. If you experience a bug with anything except the unsupported features mentioned above, please file a bug report.
As we're getting closer to the release of Scala 3, we are continuing to focus on the stability and performance of the language. In this release, we have fixed support of objects under JDK9+ (PR #9181). The issue was, due to the changes in JDK9+ compared to JDK8, our initialization scheme for objects did not work under JDK9+. The aforementioned fixed that issue, thereby unblocking JDK9+ support for Dotty.
We are also continuing to work on stabilising enums. PR #9532 corrects the deserialization and serialization of singleton enum values with
ObjectOutputStream. PR #9549 enables overriding the
toString method on enums – previously this was not possible because of the way enums were desugared.
We are also focusing these days on making the compiler faster and memory-efficient. For the past month, we were looking in the compiler's memory footprint. We were trying to determine what was allocated in unreasonable amounts during compilation and trying to resolve these allocation issues. The following PRs attempt to increase the performance of the compiler:
We are keeping the work on the metaprogramming API improvements. For this release, the following PRs bring better API to metaprogrammers:
Thank you to all the contributors who made this release possible 🎉
git shortlog -sn --no-merges 0.26.0-RC1..0.27.0-RC1 these are:
118 Martin Odersky
75 Liu Fengyun
65 Nicolas Stucki
27 Sébastien Doeraene
23 Guillaume Martres
16 Jamie Thompson
10 Guillaume Raffin
7 Anatolii Kmetiuk
4 Robert Stoll
3 Pavel Shirshov
1 Niklas Vest
1 Dean Wampler
1 Fengyun Liu
1 John Sullivan
1 Lan, Jian
1 Aleksander Boruch-Gruszecki
1 Ruslan Shevchenko
1 Stefan Zeiger
1 William Narmontas
If you want to get your hands dirty and contribute to Dotty, now is a good time to get involved! Head to our Getting Started page for new contributors, and have a look at some of the good first issues. They make perfect entry points into hacking on the compiler.
We are looking forward to having you join the team of contributors.