-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add javaOutputVersion to ScalacOptions for scala >= 3.1.2 #122
base: main
Are you sure you want to change the base?
Conversation
/** Compile for a specific version of the Java platform. Supported targets: 8, 9, ..., 17, 18. | ||
* | ||
* The release flag is supported only on JDK 9 and above, since it relies on the functionality | ||
* provided in [[http://openjdk.java.net/jeps/247 JEP-247: Compile for Older Platform Versions]]. | ||
*/ | ||
@deprecated("Use javaOutputVersion instead", "3.1.2") |
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.
This need to be removed and instead the line below:
version => JavaMajorVersion.javaMajorVersion >= 9 && version >= V2_12_5
needs to be changed to:
version => JavaMajorVersion.javaMajorVersion >= 9 && version >= V2_12_5 && version < V3_1_2
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.
Or maybe not since there is an alias for backcompat?
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.
Thank you, I've made those changes.
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.
@satorg No rush but maybe we could look into this before cutting a release?
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.
Sorry it should be:
version => JavaMajorVersion.javaMajorVersion >= 9 && version.between(V2_12_5, V3_1_2)
But again not sure if we should disable it yet because that flag is still working. Any opinion @TonioGela @satorg @armanbilge?
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.
ok fixed, but I take your point about disabling or not.
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 think if We disable this for scala > 3.1.2, it may cause some suprise for users as it takes no effect. So, I think We should not disable it.
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.
Yeah, let's keep it then. People will get the warning if there is one and we can remove it once the compiler removes it.
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.
this is a good improvement, thanks!
Scala 3.1.2 renamed
-release
to-java-output-version
. See blog.I'm not very confident that this PR is right but, WDYT?