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
Fix#8571: A new source version and migration scheme
Unlike originally proposed in #8571, we now just use -source, the separate
-migration setting is gone. We replace it by having source versions for migrations.
So, right now, we have
3.0, 3.1, 3.0-migration and 3.1-migration.
A X-migration source level means that migration warnings and changes in preparation
for the X source level are enabled.
So, the scenarios in #8571 would map as follows:
- I want to cross compile between Scala 2 and Scala 3: not yet implemented, but it would be -source 2x3
- I want help with migration to Scala 3: -source 3.0-migration
- I want help with migration to the cross-compilable subset: not yet implemented, but it would be -source 2x3-migration
- I want to make sure my code is future-proof for 3.1: -source 3.1
- I want help making my code future-proof for 3.1: -source 3.1-migration
- My compiler's version is3.1, but I want to stick to the more lenient 3.0 version for the moment: -source 3.0.
- My compiler's version is 3.1, but I want to stick to the cross-compilable subset: not yet implemented, but it would be -source 2x3
Copy file name to clipboardExpand all lines: compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ class ScalaSettings extends Settings.SettingGroup {
34
34
valfeature:Setting[Boolean] =BooleanSetting("-feature", "Emit warning and location for usages of features that should be imported explicitly.") withAbbreviation "--feature"
35
35
valhelp:Setting[Boolean] =BooleanSetting("-help", "Print a synopsis of standard options.") withAbbreviation "--help"
valscalajs:Setting[Boolean] =BooleanSetting("-scalajs", "Compile in Scala.js mode (requires scalajs-library.jar on the classpath).") withAbbreviation "--scalajs"
@@ -45,7 +46,7 @@ class ScalaSettings extends Settings.SettingGroup {
valstrict:Setting[Boolean] =BooleanSetting("-strict", "Use strict type rules, which means some formerly legal code does not typecheck anymore.") withAbbreviation "--strict"
47
48
vallanguage:Setting[List[String]] =MultiStringSetting("-language", "feature", "Enable one or more language features.") withAbbreviation "--language"
48
-
valrewrite:Setting[Option[Rewrites]] =OptionSetting[Rewrites]("-rewrite", "When used in conjunction with -language:Scala2Compat rewrites sources to migrate to new syntax.") withAbbreviation "--rewrite"
49
+
valrewrite:Setting[Option[Rewrites]] =OptionSetting[Rewrites]("-rewrite", "When used in conjunction with a `...-migration` source version, rewrites sources to migrate to new version.") withAbbreviation "--rewrite"
49
50
valsilentWarnings:Setting[Boolean] =BooleanSetting("-nowarn", "Silence all warnings.") withAbbreviation "--no-warnings"
50
51
valfromTasty:Setting[Boolean] =BooleanSetting("-from-tasty", "Compile classes from tasty in classpath. The arguments are used as class names.") withAbbreviation "--from-tasty"
0 commit comments