diff --git a/compiler/src/dotty/tools/dotc/Driver.scala b/compiler/src/dotty/tools/dotc/Driver.scala index 349147dc81a9..7349c4615938 100644 --- a/compiler/src/dotty/tools/dotc/Driver.scala +++ b/compiler/src/dotty/tools/dotc/Driver.scala @@ -17,7 +17,7 @@ import fromtasty.TASTYCompiler class Driver extends DotClass { protected def newCompiler(implicit ctx: Context): Compiler = - if (ctx.settings.tasty.value) new TASTYCompiler + if (ctx.settings.fromTasty.value) new TASTYCompiler else new Compiler protected def emptyReporter: Reporter = new StoreReporter(null) diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index 092918832a5d..c34f6759d148 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -42,7 +42,7 @@ class ScalaSettings extends Settings.SettingGroup { val language = MultiStringSetting("-language", "feature", "Enable one or more language features.") val rewrite = OptionSetting[Rewrites]("-rewrite", "When used in conjunction with -language:Scala2 rewrites sources to migrate to new syntax") val silentWarnings = BooleanSetting("-nowarn", "Silence all warnings.") - val tasty = BooleanSetting("-tasty", "Compile classes from tasty in classpath. The arguments are used as class names.") + val fromTasty = BooleanSetting("-from-tasty", "Compile classes from tasty in classpath. The arguments are used as class names.") /** -X "Advanced" settings */ diff --git a/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala b/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala index abe7ff5a2ae7..89b9c03aa55d 100644 --- a/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala +++ b/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala @@ -337,7 +337,7 @@ class ClassfileLoader(val classfile: AbstractFile) extends SymbolLoader { } private def mayLoadTreesFromTasty(implicit ctx: Context): Boolean = - ctx.settings.YretainTrees.value || ctx.settings.XlinkOptimise.value || ctx.settings.tasty.value + ctx.settings.YretainTrees.value || ctx.settings.XlinkOptimise.value || ctx.settings.fromTasty.value } class SourcefileLoader(val srcfile: AbstractFile) extends SymbolLoader { diff --git a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala index ec9fd31ce5d8..d9b2fc284638 100644 --- a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala +++ b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala @@ -395,7 +395,7 @@ trait ParallelTesting extends RunnerOrchestration { self => protected def compileFromTasty(flags0: TestFlags, suppressErrors: Boolean, targetDir: JFile): TestReporter = { val tastyOutput = new JFile(targetDir.getPath + "_from-tasty") tastyOutput.mkdir() - val flags = flags0 and ("-d", tastyOutput.getAbsolutePath) and "-tasty" + val flags = flags0 and ("-d", tastyOutput.getAbsolutePath) and "-from-tasty" def hasTastyFileToClassName(f: JFile): String = targetDir.toPath.relativize(f.toPath).toString.dropRight(".hasTasty".length).replace('/', '.') @@ -1099,7 +1099,7 @@ trait ParallelTesting extends RunnerOrchestration { self => val target = JointCompilationSource( testGroup.name, Array(sourceFile), - flags.withClasspath(tastySource.getPath) and "-tasty", + flags.withClasspath(tastySource.getPath) and "-from-tasty", tastySource, fromTasty = true ) diff --git a/project/scripts/sbtBootstrappedTests b/project/scripts/sbtBootstrappedTests index 587b43cd54c2..9704a0bd1a83 100755 --- a/project/scripts/sbtBootstrappedTests +++ b/project/scripts/sbtBootstrappedTests @@ -21,11 +21,11 @@ mkdir out/scriptedtest0 # check that `dotc` compiles and `dotr` runs it -echo "testing sbt dotc -tasty and dotr -classpath" +echo "testing sbt dotc -from-tasty and dotr -classpath" mkdir out/scriptedtest1 mkdir out/scriptedtest2 ./bin/dotc tests/pos/sbtDotrTest.scala -d out/scriptedtest1/ -./bin/dotc -tasty -classpath out/scriptedtest1/ -d out/scriptedtest2/ dotrtest.Test +./bin/dotc -from-tasty -classpath out/scriptedtest1/ -d out/scriptedtest2/ dotrtest.Test # FIXME #3477 #./bin/dotr -classpath out/scriptedtest2/ dotrtest.Test" > sbtdotr2.out #if grep -e "dotr test ok" sbtdotr2.out; then diff --git a/project/scripts/sbtTests b/project/scripts/sbtTests index b151129dbe77..61d4c4dd84ee 100755 --- a/project/scripts/sbtTests +++ b/project/scripts/sbtTests @@ -15,10 +15,10 @@ else fi # check that `sbt dotc` compiles and `sbt dotr` runs it -echo "testing sbt dotc -tasty and dotr -classpath" +echo "testing sbt dotc -from-tasty and dotr -classpath" mkdir out/scriptedtest1 mkdir out/scriptedtest2 -./project/scripts/sbt ";dotc tests/pos/sbtDotrTest.scala -d out/scriptedtest1/; dotc -tasty -classpath out/scriptedtest1/ -d out/scriptedtest2/ dotrtest.Test; dotr -classpath out/scriptedtest2/ dotrtest.Test" > sbtdotr2.out +./project/scripts/sbt ";dotc tests/pos/sbtDotrTest.scala -d out/scriptedtest1/; dotc -from-tasty -classpath out/scriptedtest1/ -d out/scriptedtest2/ dotrtest.Test; dotr -classpath out/scriptedtest2/ dotrtest.Test" > sbtdotr2.out cat sbtdotr2.out if grep -e "dotr test ok" sbtdotr2.out; then echo "output ok"