Skip to content

Tasty UUID test is too sticky #8839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
odersky opened this issue Apr 30, 2020 · 0 comments
Closed

Tasty UUID test is too sticky #8839

odersky opened this issue Apr 30, 2020 · 0 comments

Comments

@odersky
Copy link
Contributor

odersky commented Apr 30, 2020

If I abort in the middle of a build I often get errors like this:

Tasty UUID (00c95233-db90-de00-00bb-2b5192afb400) file did not correspond the tasty UUID (007e6fd1-1df0-ff00-0051-207d11d1f200) declared in the classfile /Users/odersky/workspace/dotty/community-build/community-projects/scalatest/scalatest.dotty/target/scala-0.25/classes/org/scalatest/tools/StringReporter.class.

These errors are sticky. Rebuilding will come back with the same ones. I have to do a clean to make them go away.

Expectation

I think these errors should be handled better. If it's the wrong Tasty UUID, pretend it is not there and assume the class file is missing also, returning a stub symbol.

At the very minimum, add a note to the error that this requires a clean. But the note should really not be necessary, it's better to handle the problem at the root.

nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jun 8, 2020
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.
nicolasstucki added a commit that referenced this issue Jun 8, 2020
Fix #8839: Only warn if TASTy is not in sync with classfile
jjudd added a commit to jjudd/scala that referenced this issue Sep 11, 2021
This matches the behavior in Scala, which was changed in this pull request:
scala/scala3#9125

It was changed as a result of this issue:
scala/scala3#8839

The commit message from the Scala 3 fix is as follows:
"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."
jjudd added a commit to jjudd/scala that referenced this issue Sep 11, 2021
This matches the behavior in Scala, which was changed in this pull request:
scala/scala3#9125

It was changed as a result of this issue:
scala/scala3#8839

The commit message from the Scala 3 fix is as follows:
> 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."
jjudd added a commit to jjudd/scala that referenced this issue Sep 11, 2021
This updates Scala 2.13 to match the current behavior in Scala 3 when
TASTy is not in sync with classfile, which is to print a warning and
suggest cleaning instead of erroring. The same change for Scala 3 happened
in the following pull request:
scala/scala3#9125

The Scala 3 change was made as a result of the following issue:
scala/scala3#8839

The commit message from the Scala 3 fix is as follows:
> 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."
lrytz pushed a commit to jjudd/scala that referenced this issue Sep 14, 2021
This updates Scala 2.13 to match the current behavior in Scala 3 when
TASTy is not in sync with classfile, which is to print a warning and
suggest cleaning instead of erroring. The same change for Scala 3 happened
in the following pull request:
scala/scala3#9125

The Scala 3 change was made as a result of the following issue:
scala/scala3#8839

The commit message from the Scala 3 fix is as follows:
> 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."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants