Skip to content

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Jun 29, 2023

When targeting native AOT, these analyzers are producing warnings that are treated as errors

When targeting native AOT, these analyzers are producing warnings that are treated as errors
@ghost ghost assigned jkotas Jun 29, 2023
@ghost
Copy link

ghost commented Jun 29, 2023

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

Issue Details

When targeting native AOT, these analyzers are producing warnings that are treated as errors

Author: jkotas
Assignees: jkotas
Labels:

area-Infrastructure-coreclr

Milestone: -

<!-- Disable some C# warnings for the tests. -->
<NoWarn>78,162,164,168,169,219,251,252,414,429,618,642,649,652,659,675,1691,1717,1718,3001,3002,3003,3005,3008,8981</NoWarn>
<RunAnalyzers>false</RunAnalyzers>
<EnableTrimAnalyzer>false</EnableTrimAnalyzer>
Copy link
Member Author

Choose a reason for hiding this comment

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

I have tried to disable it in more fine grained way first, but it turned out to be whack-a-mole.

This matches what we do for libraries tests.

Copy link
Member

Choose a reason for hiding this comment

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

We could condition on EnableAggressiveTrimming. Those should be clean

Copy link
Member Author

Choose a reason for hiding this comment

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

They are not clean today. I agree it would be a good path to take if we wanted to spend time on incrementally enabling analyzers for test build.

Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

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

Thank you!

@jkotas jkotas merged commit 8a09ed7 into dotnet:main Jun 30, 2023
@jkotas jkotas deleted the analyzers branch June 30, 2023 06:54
@ghost ghost locked as resolved and limited conversation to collaborators Jul 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants