-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #8839: Only warn if TASTy is not in sync with classfile #9125
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smarter
requested changes
Jun 8, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand when this can happen, if tasty changed the classfile should have been updated to, if it isn't there's a bug somewhere in the toolchain.
I think I was running standalone. |
odersky
approved these changes
Jun 8, 2020
I also hit it in stand alone. Also reproduced it this way. |
smarter
approved these changes
Jun 8, 2020
compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
Outdated
Show resolved
Hide resolved
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 pull request
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 pull request
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 pull request
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 pull request
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.