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
Always run the compiler with a bootstrapped dotty-library
The non-bootstrapped dotty-library may not be binary compatible with the
compiler, this hasn't affected us so far because the non-bootstrapped
dotty-library has always been compiled with Scala 2, but in the future
it will be compiled by an old version of Dotty itself.
To enforce this, I added a new flag -Yscala2-unpickler and set it so
that scala-library is the only jar from which we're allowed to unpickle
Scala 2 symbols in both the build and the tests.
Copy file name to clipboardExpand all lines: compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,8 @@ class ScalaSettings extends Settings.SettingGroup {
94
94
valYlogClasspath=BooleanSetting("-Ylog-classpath", "Output information about what classpath is being applied.")
95
95
valYdisableFlatCpCaching=BooleanSetting("-YdisableFlatCpCaching", "Do not cache flat classpath representation of classpath elements from jars across compiler instances.")
96
96
97
+
valYscala2Unpickler=StringSetting("-Yscala2-unpickler", "", "Control where we may get Scala 2 symbols from. This is either \"always\", \"never\", or a classpath.", "always")
98
+
97
99
valYnoImports=BooleanSetting("-Yno-imports", "Compile without importing scala.*, java.lang.*, or Predef.")
0 commit comments