Skip to content
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

Add pragma to suppress all obsoletion warnings. #73292

Open
teo-tsirpanis opened this issue May 1, 2024 · 0 comments
Open

Add pragma to suppress all obsoletion warnings. #73292

teo-tsirpanis opened this issue May 1, 2024 · 0 comments

Comments

@teo-tsirpanis
Copy link
Contributor

Context: dotnet/runtime#101738

Source-generated files that use obsolete user-provided APIs will have obsoletion warnings themselves. The standard warning code can be suppressed at the start of the generated file, but if the API is obsoleted with a custom diagnostic ID, the warning cannot be easily suppressed just for that file.

To solve this, I propose to introduce a #pragma warnings disable obsolete directive that suppresses all obsoletetion warnings regardless of ID.

c.c. @RikkiGibson

@RikkiGibson RikkiGibson added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels May 9, 2024
@jaredpar jaredpar added Feature Request and removed untriaged Issues and PRs which have not yet been triaged by a lead labels May 20, 2024
@jaredpar jaredpar added this to the 17.12 milestone May 20, 2024
@jaredpar jaredpar modified the milestones: 17.12, .NET 10 Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants