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
Emit all bridge methods non-final (perhaps affecting serialization compat) #9976
Conversation
Travis-CI build is actually green; not sure why the status didn't update, here. |
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.
No strong feelings. A fix is a fix. Happy to land this?
I see I marked this as "release notes", but I'm not sure what I was thinking at the time. So I'm removing the label again, but @lrytz let me know if you think it's actually note-able. |
The risk is changes to synthetic serialVersionUIDs |
I'm curious — a little, anyway — why the final or non-final status of a bridge method would affect serialization? Sounds like the PR description is going to need some user-facing wording on that? |
The computed SerialVersionUID is highly sensitive to changes that are actually safe in terms of serialization compatibility, such as changing the flags of a method.
Make
Deserialization works when the SVUID matches:
|
@lrytz can you either improve the PR description, or just hit "merge" if you feel that's unnecessary? |
Done 👍 |
Scala 3 does this too.
This change was at some point in Scala 2 as well, but then reverted (#7980, reverted in #8037).
The revert was for two PRs
It seems both changes remained in Scala 3, mixin forwarders are marked
synthetic bridge
, and bridges are always non-final. @smarter suggested (#8037 (review)) that we could keep all bridges non-final and just revert the first change, which is done here.This change can affect serialization compatibility between 2.13.8 and 2.13.9 (#9976 (comment)).
Fixes scala/bug#12532