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

Don't suppress all warnings with SuppressTrimAnalysisWarnings #3003

Merged
merged 5 commits into from
Aug 25, 2022

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented Aug 25, 2022

This replaces #2930 with a different approach. Now SuppressTrimAnalysisWarnings only suppresses those warnings defined to be part of the "trim analysis" category, using a separate command-line argument.
An exception is 5.0 apps, where the setting continues to suppress specific warnings for compatibility.

Fixes #2982

Copy link
Member

@jtschuster jtschuster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure I understand this, it looks like compared to #2930, we're just moving the logic for SuppressTrimAnalysisWarnings to the linker instead of MSBuild; is that right? And I guess custom steps can opt in to suppressing their warnings if they use the "TrimAnalysis" subcategory. Looks good to me if that's the case.

@sbomer
Copy link
Member Author

sbomer commented Aug 25, 2022

Yup, that's right. Instead of updating the NoWarn list in the targets, we just have to keep GetDiagnosticSubcategory up to date.

Copy link
Contributor

@tlakollo tlakollo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me :)

@sbomer sbomer merged commit b23be78 into dotnet:main Aug 25, 2022
sbomer added a commit to sbomer/linker that referenced this pull request Aug 25, 2022
…#3003)

This replaces
dotnet@82c6dc6
with a different approach. Now SuppressTrimAnalysisWarnings only
suppresses those warnings defined to be part of the "trim analysis"
category, using a separate command-line argument.  An exception is 5.0
apps, where the setting continues to suppress specific warnings for
compatibility.
sbomer added a commit that referenced this pull request Aug 29, 2022
…#3005)

This replaces
82c6dc6
with a different approach. Now SuppressTrimAnalysisWarnings only
suppresses those warnings defined to be part of the "trim analysis"
category, using a separate command-line argument.  An exception is 5.0
apps, where the setting continues to suppress specific warnings for
compatibility.
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
…/linker#3003)

This replaces
https://github.com/dotnet/linker/commit/dotnet/linker@82c6dc6f82aeb90cfbe509ae07cf539eecb75550
with a different approach. Now SuppressTrimAnalysisWarnings only
suppresses those warnings defined to be part of the "trim analysis"
category, using a separate command-line argument.  An exception is 5.0
apps, where the setting continues to suppress specific warnings for
compatibility.


Commit migrated from dotnet/linker@b23be78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.NET 7 RC 1 how to show a warning from a linker step?
3 participants