From 86bc96de2f6ff47a3d6df7991e401e6c74d26d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Marks?= Date: Wed, 17 Aug 2022 15:17:04 +0200 Subject: [PATCH] Add info about percentage of libraries affected by source incompatibilities in 3.2 --- blog/_posts/2022-04-12-scala-3.1.2-released.md | 2 +- ...ty-plans.md => 2022-08-17-long-term-compatibility-plans.md} | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) rename blog/_posts/{2022-08-05-long-term-compatibility-plans.md => 2022-08-17-long-term-compatibility-plans.md} (98%) diff --git a/blog/_posts/2022-04-12-scala-3.1.2-released.md b/blog/_posts/2022-04-12-scala-3.1.2-released.md index 62d60eef8..0953e8a67 100644 --- a/blog/_posts/2022-04-12-scala-3.1.2-released.md +++ b/blog/_posts/2022-04-12-scala-3.1.2-released.md @@ -9,7 +9,7 @@ We are happy to announce the release of Scala 3.1.2. This new release brings a f ## Configurable Scala output version -**August 2022 Update:** configurable Scala output version turned out to be really hard to maintain and is not solving some of problems it was intended to solve. We have decided to drop it in 3.2 and propose long term support versions instead. You can read more in [the dedicated post]({{ site.baseurl }}/blog/2022/08/05/long-term-compatibility-plans.html). +**August 2022 Update:** configurable Scala output version turned out to be really hard to maintain and is not solving some of problems it was intended to solve. We have decided to drop it in 3.2 and propose long term support versions instead. You can read more in [the dedicated post]({{ site.baseurl }}/blog/2022/08/17/long-term-compatibility-plans.html). First and foremost, after months of brainstorming and testing, we are bringing an experimental possibility to configure the Scala output version. This means that the compiler can now generate TASTy files and classfiles in a format used by an older minor version of Scala (which can currently be only 3.0.x) effectively specifying the minimum version of the compiler that is able to read your compiled code. diff --git a/blog/_posts/2022-08-05-long-term-compatibility-plans.md b/blog/_posts/2022-08-17-long-term-compatibility-plans.md similarity index 98% rename from blog/_posts/2022-08-05-long-term-compatibility-plans.md rename to blog/_posts/2022-08-17-long-term-compatibility-plans.md index 05a7f4791..2a8bb0dec 100644 --- a/blog/_posts/2022-08-05-long-term-compatibility-plans.md +++ b/blog/_posts/2022-08-17-long-term-compatibility-plans.md @@ -36,8 +36,7 @@ We believe that you should treat the compiler as one of your dependencies. If yo If you are a library author following the semantic versioning, we advise you to introduce new minor versions of the compiler only in minor releases of your library. New patch versions of the compiler can be introduced anytime, as they are forward and backward compatible. -That may be surprising if you have experience developing libraries for Scala 2. For example, migrating any codebase from 2.11 to 2.12 was a huge undertaking. Since they were not output-compatible, most libraries needed to resort to cross-compilation to support both versions. Thanks to the guarantees of Scala 3, there is no longer a need for cross-compilation. For example, the migration from Scala 3.1 to Scala 3.2 for the large majority of the projects would only require changing the version in the build definition. -// TODO: PUT HERE THE EXACT PERCENTAGE OF PROJECTS THAT WILL BE AFFECTED BY THE SOURCE INCOMPATIBILITIES BETWEEN 3.1 AND 3.2 +That may be surprising if you have experience developing libraries for Scala 2. For example, migrating any codebase from 2.11 to 2.12 was a huge undertaking. Since they were not output-compatible, most libraries needed to resort to cross-compilation to support both versions. Thanks to the guarantees of Scala 3, there is no longer a need for cross-compilation. For example, the migration from Scala 3.1 to Scala 3.2 for the large majority of the projects would only require changing the version in the build definition. We have tested 900 Scala libraries that were passing compilation using 3.1.3. Out of them, only 13 failed to compile with 3.2.0. That means that for 98.6% of the libraries bumping the compiler version to 3.2.0 does not require a single change in the source code. ## The problem