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

Disable Aot and Trim analyzers when building runtime tests #88209

Merged
merged 1 commit into from
Jun 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@
<MonoBinDir>$(__MonoBinDir)</MonoBinDir>
</PropertyGroup>

<!-- Language settings -->
<PropertyGroup>
<RunAnalyzers>false</RunAnalyzers>
</PropertyGroup>

<!-- Setup Default symbol and optimization for Configuration -->
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<Optimize Condition="'$(Optimize)' == ''">false</Optimize>
Expand Down Expand Up @@ -129,6 +124,8 @@
<!-- 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.

<EnableAotAnalyzer>false</EnableAotAnalyzer>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<SkipSigning Condition="'$(CrossGen)' == 'true'">true</SkipSigning>
<AssemblyKey>Test</AssemblyKey>
Expand Down
Loading