dotnet / linker

389 stars 126 forks source link

Don't suppress all warnings with SuppressTrimAnalysisWarnings #3003

Closed sbomer closed 2 years ago

sbomer commented 2 years ago

This replaces https://github.com/dotnet/linker/pull/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 https://github.com/dotnet/linker/issues/2982

sbomer commented 2 years ago

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