Skip to content

Commit 169d021

Browse files
committed
Fix #8839: Only warn if TASTy is not in sync with classfile
If they are not in sync, we warn and suggest to clean. We assume that the TASTy is up to date (arbitrary choise) and load it regardless. This way we are resiliant to the failiure if the loaded class API did not change or did not have an impact on the code we are compiling.
1 parent 345c8bc commit 169d021

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ class ClassfileParser(
825825
val expectedUUID = new UUID(reader.readUncompressedLong(), reader.readUncompressedLong())
826826
val tastyUUID = new TastyHeaderUnpickler(tastyBytes).readHeader()
827827
if (expectedUUID != tastyUUID)
828-
ctx.error(s"Tasty UUID ($tastyUUID) file did not correspond the tasty UUID ($expectedUUID) declared in the classfile $classfile.")
828+
ctx.warning(s"$classfile is out of sync with its TASTy file. Loaded TASTy file. Try cleaning the project to fix this issue", NoSourcePosition)
829829
return unpickleTASTY(tastyBytes)
830830
}
831831
}

0 commit comments

Comments
 (0)