You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initial steps to generate TASTy for the 2.13 library (#17526)
The aim is to have a project that compiles the 2.13 library using Scala
3 to generate the TASTy. This will require a special compilation mode to
align with Scala 2 semantics. Then in a later step, we can package the
TASTy files in a JAR that can be loaded with the class file JAR of the
Scala 2 standard library.
### `stdlib-bootstrapped` project
This PR changes the purpose of `stdlib-bootstrapped`. Now the project
compiles the Scala 2.13 library (only) sources using `-Yscala2-stdlib`.
With this flag, the compiler will generate code that aligns with the
Scala 2 version of the library. The main purpose is to have TASTy that
contains signatures that align with the Scala 2 library bytecode.
Under `-Yscala2-stdlib` we currently
* change the signature of the case class `unapply` methods,
* do not emit mirrors,
* and inline definitions case class `_N`.
We add MiMa tests to this project to have a better view of the
differences between the Scala 2 generated bytecode and the one generated
in this PR. The bytecode differences are a useful guide of differences
between the TASTy of the library and how applications will link to it.
[skip community_build]
valYfromTastyIgnoreList:Setting[List[String]] =MultiStringSetting("-Yfrom-tasty-ignore-list", "file", "List of `tasty` files in jar files that will not be loaded when using -from-tasty")
368
368
valYnoExperimental:Setting[Boolean] =BooleanSetting("-Yno-experimental", "Disable experimental language features")
369
369
valYlegacyLazyVals:Setting[Boolean] =BooleanSetting("-Ylegacy-lazy-vals", "Use legacy (pre 3.3.0) implementation of lazy vals")
370
+
valYscala2Stdlib:Setting[Boolean] =BooleanSetting("-Yscala2-stdlib", "Used when compiling the Scala 2 standard library")
valYprofileDestination:Setting[String] =StringSetting("-Yprofile-destination", "file", "Where to send profiling output - specify a file, default is to the console.", "")
0 commit comments