Skip to content

Commit 331245e

Browse files
Merge pull request #3512 from dotty-staging/from-tasty
Rename -tasty to -from-tasty
2 parents 51bc54a + 5e71ba8 commit 331245e

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

compiler/src/dotty/tools/dotc/Driver.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import fromtasty.TASTYCompiler
1717
class Driver extends DotClass {
1818

1919
protected def newCompiler(implicit ctx: Context): Compiler =
20-
if (ctx.settings.tasty.value) new TASTYCompiler
20+
if (ctx.settings.fromTasty.value) new TASTYCompiler
2121
else new Compiler
2222

2323
protected def emptyReporter: Reporter = new StoreReporter(null)

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ScalaSettings extends Settings.SettingGroup {
4242
val language = MultiStringSetting("-language", "feature", "Enable one or more language features.")
4343
val rewrite = OptionSetting[Rewrites]("-rewrite", "When used in conjunction with -language:Scala2 rewrites sources to migrate to new syntax")
4444
val silentWarnings = BooleanSetting("-nowarn", "Silence all warnings.")
45-
val tasty = BooleanSetting("-tasty", "Compile classes from tasty in classpath. The arguments are used as class names.")
45+
val fromTasty = BooleanSetting("-from-tasty", "Compile classes from tasty in classpath. The arguments are used as class names.")
4646

4747
/** -X "Advanced" settings
4848
*/

compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class ClassfileLoader(val classfile: AbstractFile) extends SymbolLoader {
337337
}
338338

339339
private def mayLoadTreesFromTasty(implicit ctx: Context): Boolean =
340-
ctx.settings.YretainTrees.value || ctx.settings.XlinkOptimise.value || ctx.settings.tasty.value
340+
ctx.settings.YretainTrees.value || ctx.settings.XlinkOptimise.value || ctx.settings.fromTasty.value
341341
}
342342

343343
class SourcefileLoader(val srcfile: AbstractFile) extends SymbolLoader {

compiler/test/dotty/tools/vulpix/ParallelTesting.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
395395
protected def compileFromTasty(flags0: TestFlags, suppressErrors: Boolean, targetDir: JFile): TestReporter = {
396396
val tastyOutput = new JFile(targetDir.getPath + "_from-tasty")
397397
tastyOutput.mkdir()
398-
val flags = flags0 and ("-d", tastyOutput.getAbsolutePath) and "-tasty"
398+
val flags = flags0 and ("-d", tastyOutput.getAbsolutePath) and "-from-tasty"
399399

400400
def hasTastyFileToClassName(f: JFile): String =
401401
targetDir.toPath.relativize(f.toPath).toString.dropRight(".hasTasty".length).replace('/', '.')
@@ -1099,7 +1099,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10991099
val target = JointCompilationSource(
11001100
testGroup.name,
11011101
Array(sourceFile),
1102-
flags.withClasspath(tastySource.getPath) and "-tasty",
1102+
flags.withClasspath(tastySource.getPath) and "-from-tasty",
11031103
tastySource,
11041104
fromTasty = true
11051105
)

project/scripts/sbtBootstrappedTests

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ mkdir out/scriptedtest0
2121

2222

2323
# check that `dotc` compiles and `dotr` runs it
24-
echo "testing sbt dotc -tasty and dotr -classpath"
24+
echo "testing sbt dotc -from-tasty and dotr -classpath"
2525
mkdir out/scriptedtest1
2626
mkdir out/scriptedtest2
2727
./bin/dotc tests/pos/sbtDotrTest.scala -d out/scriptedtest1/
28-
./bin/dotc -tasty -classpath out/scriptedtest1/ -d out/scriptedtest2/ dotrtest.Test
28+
./bin/dotc -from-tasty -classpath out/scriptedtest1/ -d out/scriptedtest2/ dotrtest.Test
2929
# FIXME #3477
3030
#./bin/dotr -classpath out/scriptedtest2/ dotrtest.Test" > sbtdotr2.out
3131
#if grep -e "dotr test ok" sbtdotr2.out; then

project/scripts/sbtTests

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ else
1515
fi
1616

1717
# check that `sbt dotc` compiles and `sbt dotr` runs it
18-
echo "testing sbt dotc -tasty and dotr -classpath"
18+
echo "testing sbt dotc -from-tasty and dotr -classpath"
1919
mkdir out/scriptedtest1
2020
mkdir out/scriptedtest2
21-
./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
21+
./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
2222
cat sbtdotr2.out
2323
if grep -e "dotr test ok" sbtdotr2.out; then
2424
echo "output ok"

0 commit comments

Comments
 (0)