dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.02k stars 4.03k forks source link

Completely remove or restore support for `#pragma warning *enable*` #36550

Open jcouv opened 5 years ago

jcouv commented 5 years ago

In earlier designs of nullability, the enable setting was pretty useful for the nullability feature. But now, users can enable nullable warnings with #nullable enable warnings instead.

The question is whether #pragma warning enable ... still stands on its own as a feature to be included in C# 8.0, or whether we should remove it.

In recent LDM, we said we need to come back to this question: https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-05-13.md#removing-support-for-pragma-warning-enable-

Update: this was made an error for C# 8. We should discuss whether to re-enable it past C# 8 (verifying the behavior is understood and desirable) or remove it entirely.

Tagging @AlekseyTs @gafter @RikkiGibson

jcouv commented 5 years ago

From discussion with @MadsTorgersen and @agocke we're thinking of making this an error for now.

jaredpar commented 3 years ago

@jcouv where did we end up on this one?

jcouv commented 3 years ago

Aleksey is championing the feature for #pragma warning enable (in general, not just for nullable warnings). We should keep the code around assuming we'll need it.

jaredpar commented 3 years ago

Good with keeping codde around. Do we still need this issue then? Sounds like at this point we'd be driving any changes here through csharplang right?

jcouv commented 3 years ago

I'd rather keep in around in the off-chance the new feature didn't pan out.