(The Scala Center team is dedicated to providing regular and transparent community updates about project plans & progress. In this forum we created a new topic category to allow quicker orientation going forward: “Scala Center Updates”. Even though all feedback is welcome, we keep the right to make executive decisions about projects we lead. Overview of all our activities can always be found at https://scala.epfl.ch/records.html )
The Scala Center has initiated a migration guide whose purpose is to gather all the information about cross-compiling and upgrading to Scala 3.
Dotty is the new compiler and improved language that will become Scala 3. Compared to Scala 2, the compiler has been completely redesigned with a new type checker and type inferencer, and a rework of the implicit resolution rules. The language itself has been improved by simplification, restriction and addition of features. The metaprogramming capabilities are being totally rebuilt from the ground.
Those undeniable improvements come at the cost of incompatibilities with Scala 2, which means that a large number of Scala libraries do not compile to Scala 3 and vice versa.
The purpose of the migration guide is to provide all information one needs to know before starting cross-compiling its library or upgrading its application. It will eventually contain a tour of the migration tools, a documentation of the automated Dotty rewrite rules, a step by step tutorial for cross-building a library, a step by step tutorial for upgrading an application, and a reference document for migrating macros.
As a complementary effort from the Scala Center, the TASTy Reader project will enable bidirectional dependencies between Scala 2 and 3, allowing separate modules to migrate gradually to the new compiler, rather than all at once. Check out the TASTy Reader roadmap.
The migration guide is a collaborative work. The Dotty team has already joined the effort. Each and every member of the community is encouraged to participate in any of this way:
- Give your feedback about migrating to Scala 3 in this thread.
- Help us make the guide more user friendly by opening an issue or, even better, submitting a pull request.
- Share your knowledge, about the Dotty language and the migration tools.
If you wish to participate but you don’t know where to begin, we encourage you to investigate one of the existing issues.
Scala Center proposed roadmap
May - June 2020
- Gather feedback about the Dotty community build projects and how they have been migrated.
- Document the Dotty rewrite rules.
- Document some incompatibilities that do not have an automated rewrite rule.
July - August 2020
- Build a step by step guide for cross-compiling a library.
- Focus on porting the macro-based libraries. Document how one can leverage the new features to avoid macros usage. Document how to cross publish a macro API.
From September 2020
- Completing and polishing the migration guide.
- Possibly, porting the migration guide to a website of the Scala ecosystem.
- Build a step by step guide for upgrading an application to Scala 3.