Skip to content

Commit 9d5d7b5

Browse files
committed
Don't use empty files to indicate presence of tasty in class path.
Use hasTasty files instead.
1 parent b28b769 commit 9d5d7b5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter
214214
} else if (!outTastyFile.isVirtual) {
215215
// Create an empty file to signal that a tasty section exist in the corresponding .class
216216
// This is much cheaper and simpler to check than doing classfile parsing
217-
outTastyFile.create()
217+
val hasTasty = getFileForClassfile(outF, store.name, ".hasTasty")
218+
hasTasty.create()
218219
}
219220
}
220221

compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ class InteractiveDriver(settings: List[String]) extends Driver {
8686
else
8787
null
8888
prefix != null && {
89-
val tastyFile = prefix + ".tasty"
89+
val hasTastyFile = prefix + ".hasTasty"
9090
binFile match {
9191
case pf: PlainFile =>
92-
val tastyPath = pf.givenPath.parent / tastyFile
92+
val tastyPath = pf.givenPath.parent / hasTastyFile
9393
tastyPath.exists
9494
case _ =>
9595
sys.error(s"Unhandled file type: $binFile [getClass = ${binFile.getClass}]")

0 commit comments

Comments
 (0)