From fe215d98a1d402a014bc88a546a6fd62fe97c6a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pa=C5=82ka?= Date: Mon, 7 Mar 2022 15:57:22 +0100 Subject: [PATCH] Enable forward compatibility tests for 3.1.x --- tasty/src/dotty/tools/tasty/TastyFormat.scala | 15 +++++++++++++-- .../disabled/pos-macros/forwardCompat-3.1/why.md | 1 - .../forwardCompat-3.1/Macro_1_r3.1.scala | 0 .../forwardCompat-3.1/Test_2_c3.1.0.scala | 0 4 files changed, 13 insertions(+), 3 deletions(-) delete mode 100644 tests/disabled/pos-macros/forwardCompat-3.1/why.md rename tests/{disabled => }/pos-macros/forwardCompat-3.1/Macro_1_r3.1.scala (100%) rename tests/{disabled => }/pos-macros/forwardCompat-3.1/Test_2_c3.1.0.scala (100%) diff --git a/tasty/src/dotty/tools/tasty/TastyFormat.scala b/tasty/src/dotty/tools/tasty/TastyFormat.scala index f4f72a6e7e19..ee9774e937df 100644 --- a/tasty/src/dotty/tools/tasty/TastyFormat.scala +++ b/tasty/src/dotty/tools/tasty/TastyFormat.scala @@ -290,7 +290,7 @@ object TastyFormat { * compatibility, but remains backwards compatible, with all * preceeding `MinorVersion`. */ - final val MinorVersion: Int = 2 + final val MinorVersion: Int = 1 /** Natural Number. The `ExperimentalVersion` allows for * experimentation with changes to TASTy without committing @@ -305,8 +305,19 @@ object TastyFormat { * However, tooling with an experimental TASTy version * is able to read final TASTy documents if the file's * `MinorVersion` is strictly less than the current value. + * + * When the format gets fixed for a minor version of the language, + * e.g. at the point of the release of Scala 3.2.0-RC1, + * the experimental version number should be changed to 0 and after that + * the same non-experimental verion of TASTy should be used + * until the snapshot version of the next minor language release + * (3.3.0-RC1-SNAPSHOT in this case) when TASTy minor version gets bumped + * and the experimental version number gets set to a 1. + * The period between Scala 3.3.0-RC1-SNAPSHOT and 3.3.0-RC1 + * is the only time when experimental TASTy version number can be incremented. + * When 3.3.0-RC1 gets released the experimental version number should be set to 0 again. */ - final val ExperimentalVersion: Int = 1 + final val ExperimentalVersion: Int = 0 /**This method implements a binary relation (`<:<`) between two TASTy versions. * diff --git a/tests/disabled/pos-macros/forwardCompat-3.1/why.md b/tests/disabled/pos-macros/forwardCompat-3.1/why.md deleted file mode 100644 index f281f9c08662..000000000000 --- a/tests/disabled/pos-macros/forwardCompat-3.1/why.md +++ /dev/null @@ -1 +0,0 @@ -Disabled until https://github.com/lampepfl/dotty/issues/14306 is fixed diff --git a/tests/disabled/pos-macros/forwardCompat-3.1/Macro_1_r3.1.scala b/tests/pos-macros/forwardCompat-3.1/Macro_1_r3.1.scala similarity index 100% rename from tests/disabled/pos-macros/forwardCompat-3.1/Macro_1_r3.1.scala rename to tests/pos-macros/forwardCompat-3.1/Macro_1_r3.1.scala diff --git a/tests/disabled/pos-macros/forwardCompat-3.1/Test_2_c3.1.0.scala b/tests/pos-macros/forwardCompat-3.1/Test_2_c3.1.0.scala similarity index 100% rename from tests/disabled/pos-macros/forwardCompat-3.1/Test_2_c3.1.0.scala rename to tests/pos-macros/forwardCompat-3.1/Test_2_c3.1.0.scala