csharplang icon indicating copy to clipboard operation
csharplang copied to clipboard

[Proposal]: #pragma warning *enable*

Open jcouv opened this issue 5 years ago • 1 comments

#pragma warning enable

  • [x] Proposed
  • [ ] Prototype: Not Started
  • [ ] Implementation: Not Started
  • [ ] Specification: Not Started

Summary

During our work on nullability in C# 8, we added support for #pragma warning enable ... as the mechanism to enable nullable warnings. Since we shipped with #nullable enable ... instead, we disabled that code with the intention to revisit later.

Motivation

Detailed design

Drawbacks

Alternatives

Unresolved questions

Design meetings

  • LDM notes on disabling #pragma warning enable ... in C# 8 timeframe: https://github.com/dotnet/csharplang/blob/7a42cf7d947082d73b4b5d92badbc21a860b652f/meetings/2019/LDM-2019-05-13.md#removing-support-for-pragma-warning-enable-
  • Relates to https://github.com/dotnet/roslyn/issues/36550 (roslyn issue to remove disabled code)
  • https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-08-31.md#pragma-warning-enable
  • https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-09-28.md#ungrouped

jcouv avatar Oct 09 '20 04:10 jcouv

This proposal was rejected by the LDM: https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-09-28.md#ungrouped.

333fred avatar Sep 28 '22 23:09 333fred