-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
-Wconf
options are processed incorrectly
#18367
Comments
|
Per the discussion, in Scala 2 the Hopefully a judicious |
fyi @lrytz |
I'd like to work on this! |
Compiler version
3.3.0
Minimized code
(anything that will produce a warning that can be configured with
-Wconf
will do)Output
scala 2.13.10
$ scala-2.13.10/bin/scalac -Wconf:cat=deprecation:e -Wconf:cat=deprecation:s Test.scala $ scala-2.13.10/bin/scalac -Wconf:cat=deprecation:s -Wconf:cat=deprecation:e Test.scala Test.scala:3: error: method deprecated in object Deprecated is deprecated: def main(args: Array[String]): Unit = Deprecated.deprecated ^ 1 error
scala 3.3.0
Expectation
In scala 2, passing
-Wconf:cat=deprecation:silent
after-Wconf:cat=deprecation:error
would override theerror
setting, i.e. the last provided configuration wins. In scala 3, the opposite is true: the first provided configuration wins. The documentation for the behavior is the same for both:scalac -Wconf:help
includes the following:I would expect that, having the same documentation, the -Wconf flags would be handled in the same order. The scala 2 behavior is useful for providing a general default (e.g.
-Wconf:any:error
) and then being able to append more specific options to the scalac options and have those override the general default. A bit more discussion can be found in #18365The text was updated successfully, but these errors were encountered: