- Notifications
You must be signed in to change notification settings - Fork3.1k
Fix-Wconf and-nowarn to be more consistent#10750
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
801b298 to820ad16Comparesom-snytt commentedApr 11, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Somewhere in the Reporting adjusts the deprecation conf depending on deprecation.isSetByUser. Note: revisit |
ce202a3 to7da120cCompareSethTisue commentedJul 18, 2024
@som-snytt if I'm a Scala user hurriedly/impatiently reading the 2.13.15 release notes, what is the upshot of this change for me...? |
This comment was marked as resolved.
This comment was marked as resolved.
7da120c to2e0c786Comparelrytz commentedAug 14, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
In the current form it's both (which is the right thing), not "instead". |
som-snytt commentedAug 14, 2024
@lrytz thanks again for the care you take. I reviewed the changes again and updated the text. |
| if (needsDefaultAdjustment|| settings.nowarn.value) { | ||
| val (user, defaults)= conf.filters.splitAt(conf.filters.length- settings.WconfDefault.length) | ||
| valDeprecation=MessageFilter.Category(WarningCategory.Deprecation) | ||
| valaction=if (settings.deprecation.value)Action.WarningelseAction.Silent |
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.
Worth following up whether-deprecation -nowarn does the obvious thing (whatever that is). With a custom reporter, there could be a difference between "what is displayed" and "warnings that reach the reporter"?
-Wconf and-nowarn to be more consistent
Uh oh!
There was an error while loading.Please reload this page.
Always respect user
-Wconfsettings, including-nowarn. Previously, some defaults were incorrectly enforced.For example,
-Wconf:cat=deprecation:e -deprecation -nowarnwould fail to issue an error on deprecation, but now correctly works the same as
-deprecation -nowarn -Wconf:cat=deprecation:e-nowarnsets-Xmaxwarns:0(which limits how many warnings are displayed) and also suppresses the "summary" messages that report a summary count, as well as suppressing the error under-Werror("No warnings can be incurred"). It addsany:sto suppress any other warnings, and turns offcat=scala3-migration:ethat boosts migration errors under-Xsource:3.Fixesscala/bug#12984
Fixesscala/bug#12664
Instead of adding wconf for deprecation when setting is selected, adjust the default filter when processing the configuration. This ensures that user config is respected in this respect.
Otherwise, subtle order dependency is not friendly.
Besides setting
maxwarns,nowarnis a trailing-Wconf:any:s. That is, any unconfigured warnings are silenced. Configured warnings are counted and reported in the usual way, but summaries are silenced under-nowarn.