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

Diagnostics from Source Generators do not respect suppression #52527

Closed
chsienki opened this issue Apr 9, 2021 · 1 comment · Fixed by #52544
Closed

Diagnostics from Source Generators do not respect suppression #52527

chsienki opened this issue Apr 9, 2021 · 1 comment · Fixed by #52544
Assignees
Milestone

Comments

@chsienki
Copy link
Contributor

chsienki commented Apr 9, 2021

Diagnostics produced by source generators do not respect the /warnAsError or /noWarn compiler flags.

@chsienki chsienki added this to the 16.10 milestone Apr 9, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Apr 9, 2021
@jaredpar jaredpar added Bug and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 9, 2021
@geeknoid
Copy link
Member

geeknoid commented Apr 9, 2021

A couple more related points:

  • "#pragma warning dissable" has no impact on warnings produced by a source generator, the warnings are always presented to the user.

  • On the flip side, source generator warnings don't seem to be visible to the VS IDE. The same "#pragma warning disable" statement which has no effect on disabling a source generator warning ends up being underlined by VS and flagged as a superfluous suppression. So the IDE isn't treating the warning from the source generator has being present, so it thinks the suppression is for naught.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants