-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: Add @nowarn annotation to LazyVals. #22270
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
Unsafe is planed to be removed in future Java version.
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.
Non-core contributors may be more likely to keep their JDKs fresh.
Not sure if dotty has the "nowarn suppresses no warnings" lint, but it would be nice to ensure clean compilation across JDK versions. Also not sure whether dotty exploits newer API or if releases are built under the |
Keep JEP 498: Warn upon Use of Memory-Access Methods in sun.misc.Unsafe |
This remains a hassle. Maybe there is a big picture problem here, but I just want to switch back from JDK 17 after working on a dotty ticket. However, a glitch is that I can't |
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
As per https://www.scala-lang.org/news/next-scala-lts.html, we'll be migrating from the unsafe API soon. I think this is okay as a band-aid before Scala 3.8.
thank you @He-Pin ! |
Unsafe is planned to be removed in future Java versions. Motivication: Makes it compile on JDK 23 refs: https://openjdk.org/jeps/471 Modification: Add `@nowarn("cat=deprecation")` Result: Compiles successfully on JDK 23 [Cherry-picked 4952e0a]
Unsafe is planned to be removed in future Java versions.
Motivication:
Makes it compile on JDK 23
refs: https://openjdk.org/jeps/471
Modification:
Add
@nowarn("cat=deprecation")
Result:
Compiles successfully on JDK 23