Skip to content

Commit 6c4c506

Browse files
committed
Do not unpickle Scala 3 tasty through the classfile
We should always read the tasty directly
1 parent d3f476e commit 6c4c506

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,15 +951,14 @@ class ClassfileParser(
951951
else
952952
val tastyLoader = new TastyLoader(tastyFile)
953953
val tastyBytes: Array[Byte] = tastyLoader.loadTastyBytes()
954-
val unpickler = tastyLoader.unpickleTASTY(tastyBytes, classRoot, moduleRoot)
955954
val expectedUUID =
956955
val reader = new TastyReader(bytes, 0, 16)
957956
new UUID(reader.readUncompressedLong(), reader.readUncompressedLong())
958957
val tastyUUID =
959958
new TastyHeaderUnpickler(tastyBytes).readHeader()
960959
if (expectedUUID != tastyUUID)
961960
report.warning(s"$classfile is out of sync with its TASTy file. Loaded TASTy file. Try cleaning the project to fix this issue", NoSourcePosition)
962-
return Some(unpickler)
961+
return None
963962
}
964963
else
965964
// Before 3.0.0 we had a mode where we could embed the TASTY bytes in the classfile. This has not been supported in any stable release.

0 commit comments

Comments
 (0)