You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Milestone for 2.13.9 since we should at least consider this in that timeframe.
Is it only proposed to add new aliases for existing flags (which is pretty easy to justify/accept)? Or is there any question of altering existing behavior?
In scala 3: -Xtarget / -Xunchecked-java-output-version - specifies the version of produced JVM bytecode -release / -java-output-version - as above + it checks if the produced bytecode will be safe to use (if the referenced methods/classes/etc. will be available)
So the former setting is redundant when the latter is used and it's also unsafe so there are hardly any situations when someone might really want to use -Xtarget.
To my understanding currently in scala 2 -release itself only performs the checks but does not set the version of produced bytecode so it's not really useful unless -target (without X) with the same value of java version is used.
The idea is to make -release in scala 2 (or -java-output-version after the renaming) have the same twofold effect as in scala 3.
Here's the PR introducing this semantic change in scala 3 scala/scala3#10746, which was itself a port from scala 2 with some improvements.
reproduction steps
As proposed at scala/scala3#14606
problem
Everything is easier when compiler options align on Scala2/3 especially for cross-compilers and migrators.
The text was updated successfully, but these errors were encountered: