Skip to content

Commit f85ee4e

Browse files
committed
Change -Yemit-tasty to -Yemit-tasty-in-class and invert semantics
1 parent 0451816 commit f85ee4e

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

compiler/src/dotty/tools/backend/jvm/GenBCode.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter
220220
for (binary <- ctx.compilationUnit.pickled.get(claszSymbol.asClass)) {
221221
val store = if (mirrorC ne null) mirrorC else plainC
222222
val tasty =
223-
if (ctx.settings.YemitTasty.value) {
223+
if (!ctx.settings.YemitTastyInClass.value) {
224224
val outTastyFile = getFileForClassfile(outF, store.name, ".tasty")
225225
val outstream = new DataOutputStream(outTastyFile.bufferedOutput)
226226
try outstream.write(binary)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class ScalaSettings extends Settings.SettingGroup {
9090
val YdebugOwners = BooleanSetting("-Ydebug-owners", "Print all owners of definitions (requires -Yprint-syms)")
9191
val YtermConflict = ChoiceSetting("-Yresolve-term-conflict", "strategy", "Resolve term conflicts", List("package", "object", "error"), "error")
9292
val Ylog = PhasesSetting("-Ylog", "Log operations during")
93-
val YemitTasty = BooleanSetting("-Yemit-tasty", "Generate tasty in separate *.tasty file.", true)
93+
val YemitTastyInClass = BooleanSetting("-Yemit-tasty-in-class", "Generate tasty in the .class file and add an empty *.hasTasty file.")
9494
val YlogClasspath = BooleanSetting("-Ylog-classpath", "Output information about what classpath is being applied.")
9595
val YdisableFlatCpCaching = BooleanSetting("-YdisableFlatCpCaching", "Do not cache flat classpath representation of classpath elements from jars across compiler instances.")
9696

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class CompilationTests extends ParallelTesting {
102102
compileFilesInDir("tests/pos-no-optimise", defaultOptions) +
103103
compileFilesInDir("tests/pos-deep-subtype", allowDeepSubtypes) +
104104
compileFilesInDir("tests/pos-kind-polymorphism", defaultOptions and "-Ykind-polymorphism") +
105-
compileDir("tests/pos/i1137-1", defaultOptions and "-Yemit-tasty") +
105+
compileDir("tests/pos/i1137-1", defaultOptions) +
106106
compileFile(
107107
// succeeds despite -Xfatal-warnings because of -nowarn
108108
"tests/neg-custom-args/fatal-warnings/xfatalWarnings.scala",

compiler/test/dotty/tools/dotc/IdempotencyTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class IdempotencyTests extends ParallelTesting {
2828
@Category(Array(classOf[SlowTests]))
2929
@Test def idempotency: Unit = {
3030
implicit val testGroup: TestGroup = TestGroup("idempotency")
31-
val opt = defaultOptions.and("-Yemit-tasty")
31+
val opt = defaultOptions
3232

3333
def sourcesFrom(dir: Path) = CompilationTests.sources(Files.walk(dir))
3434

project/scripts/cmdTests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ grep -qe "$EXPECTED_OUTPUT" "$tmp"
4747

4848
echo "testing loading tasty from .tasty file in jar"
4949
clear_out "$OUT"
50-
"$SBT" ";dotc -d $OUT/out.jar -Yemit-tasty $SOURCE; dotc -decompile -classpath $OUT/out.jar -color:never $MAIN" > "$tmp"
50+
"$SBT" ";dotc -d $OUT/out.jar $SOURCE; dotc -decompile -classpath $OUT/out.jar -color:never $MAIN" > "$tmp"
5151
grep -qe "def main(args: Array\[String\]): Unit =" "$tmp"
5252

5353
echo "testing scala.quoted.Expr.run from sbt dotr"

0 commit comments

Comments
 (0)