-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support NoWarn as MSBuildWarningsAsMessages #4421
Comments
My only concern with this is it's a potentially confusing change in behavior for users: if they were using |
I'm not sure I understand. Why would they be doing that? |
It would have been a harmless "error" of misunderstanding: at some point, someone tried to silence a warning. It didn't work, but they left it in. Now it would be silenced, which I think is a breaking (but admittedly not that breaking) change from current behavior. |
I see. Maybe we save this for 17? It is technically breaking. |
One issue is that NoWarn supports just the integers but MSBuildWarningsAsMessages treats everything as a string. Not that this couldn't be changed but that's how its currently implemented. So for instance |
We talked about this and decided we should try to do this for the next major version. Mainly because NoWarn currently works for NuGet warnings as well as compiler warnings, so it is weird that MSBuild warnings are the odd one out. |
From our meeting today, I'd like to ask for this issue to be extended to all related warning/error properties such as From the original email:
|
@rainersigwald @dsplaisted is this planned for the next release? We are hoping to rely on it for disabling linker warnings. |
Just FYI, we have added a |
Fixes dotnet#4421 Currently not behind a warning wave, so will have to update that when it's available.
@Forgind awesome! Are there plans to do the same for the other properties? (See #4421 (comment)) |
@sbomer, I think we wanted to go one at a time, since this could be a breaking change. In any case, adding support for letting |
I had assumed there was a The way it works in Roslyn and ILLink is that |
#3062 tracks adding |
Enable NoWarn Fixes dotnet#4421
In same feature flag as NoWarn (can change to a separate feature flag if desired.) Addition to #4421.
Currently, it is not very discoverable how to disable a warning that comes from an sdk target or wherever else that is not one of the fixed components that read $(NoWarn) and police themselves, which includes NuGet and csc, but not sdk targets.
The nice thing about NoWarn is that it has project property page UI ready to go.
And even once you find MSBuildWarningsAsMessages, it's quite a mouthful and requires explaining a technicality when teaching: that it will still be logged as a low importance message. NoWarn really conveys the user intent much better.
cc @dsplaisted @rainersigwald
The text was updated successfully, but these errors were encountered: