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:x,y is -Wconf:x -Wconf:y #10708
base: 2.13.x
Are you sure you want to change the base?
Conversation
This looks like the right solution, but a breaking change. In short, @SethTisue what do you think? Small usability thing:
they are displayed the other way around |
I think Scala 3 chose the right design here and we should align with it, especially since I can make sure we very prominently release-note the change. But let's hold it for 2.13.15, to keep 2.13.14 focused on bugfixes. |
It was by mistake, but yes :-)
There are two modes in which it can break
|
Yeah. Let's be very explicit about that in the PR description and release notes. |
it's "just a bug". I could [not -Ed.] add a red flag warning for the comma-separated option. It's "probably" used "rarely". The PR includes important debug Edit: the highly engineered settings infrastructure doesn't have a way to report warnings. Edit: I tried to update the PR comment, but was unable to make it sound like anything but the ravings of a lunatic. |
Relatedly scala/bug#12984 |
-Wconf
applies the "last matching" configuration, or equivalently, the "first matching" in reverse order. User config has precedence over default config.However, previously, two configs in a "comma-separated" setting were taken such that the "first matching" in order as written had precedence. This is different from Scala 3 and possibly unintuitive or awkward to document.
This behavior is corrected so that a config always overrides or has precedence over previous configs, including a comma-separated setting as read from left to right.
Example:
-Wconf:A,B -Wconf:C
is now the same as
-Wconf:A -Wconf:B -Wconf:C
where "the last applicable configuration wins".
Previously, it was taken as
-Wconf:B -Wconf:A -Wconf:C
If configs
A
andB
are "overlapping" filters, then swapping the order will change the resulting behavior.Don't reverse before prependedAll.
Noticed at scala/scala3#19885 (comment)