Closed altrack closed 5 months ago
It complicates builds if options are not accepted across versions.
This case is just a limitation for 2.12.
Since -target
is deprecated for all versions, the behavior does not introduce a warning.
The messaging is:
warning: -target is deprecated: Scala 2.12 cannot emit valid class files for targets newer than 8 (this is possible with Scala 2.13). Use -release to compile against a specific platform API version.
one warning found
or on 2.13
warning: -target is deprecated: Use -release instead to compile against the correct platform API.
1 warning
The only difficulty I detect is that the parenthetical on 2.12 is a bit run-on.
I must have broken the linking mechanism, but the linked PR is a fix in lieu of closing won't-fix. It expands the help a bit.
@altrack does https://github.com/scala/scala/pull/10638 LGTY?
Reproduction steps
Scala version: 2.12.18
Problem
Shows a flag that was deprecated in 2.12.17 as valid.
When trying to use one of the values - compiler shows a warning that the only valid option for Scala 2.12 is 8.
Expected
remove -target flag option support.