-
Notifications
You must be signed in to change notification settings - Fork 2
Fix Scala3 lazy val serialization #25
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
Conversation
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.
lgtm - thanks for bringing up this issue.
A concern is, that Users might not be aware of the initialization being done again after deserialization. This solution is reasonable if we want to support lazy val serialization, but maybe we should add a hint in the README how lazy vals are serialized in Scala 3 and that it might be re-evaluated on the deserialized object.
(Another option would be to not support lazy val serialization on Scala 3)
|
Note that the proposed approach here is consistent with how Scala 3 handled it for Java serialization (since there was the same problem): scala/scala3#21243 I think updating the README sounds good 👍 |
|
Thank you for the feedback! I'll update the PR and add a note about this behavior to the README. |
|
@ghostdogpr Thanks for the reference, handling it the same way as Java serialization indeed makes sense. |
|
If the updated description looks good, Please merge the PR. 🙏 |
danischroeter
left a comment
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.
nice! thx a lot
Closes #24 issue.