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

Run DependencyInjection trimming tests as native AOT. #101129

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project DefaultTargets="Build">
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<PropertyGroup>
<AdditionalProjectReferences>Microsoft.Extensions.DependencyInjection</AdditionalProjectReferences>
</PropertyGroup>

<ItemGroup>
<TestConsoleAppSourceFiles Include="..\TrimmingTests\ActivatorUtilitiesTests.cs" />
<TestConsoleAppSourceFiles Include="..\TrimmingTests\ServiceCollectionExtensionsTests.cs" />
Copy link
Member

Choose a reason for hiding this comment

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

What's the key by which we decide the trimming tests that should be also native AOT tests?

ServiceCollectionExtensionsTests would not have hit the issue we were discussing and feels as applicable as any other trimming test.

Should we just run all trimming tests? There's a greater than zero chance they may catch something and it only makes the CI a couple minutes slower.

These tests are testing assumptions under which we suppressed static analysis warnings. We've made the wrong call on suppressing a warning many times in the past. There could be an AOT angle to the trimming suppression. I think that might tip the scale to "all TrimmingTests should be AOT tests".

Copy link
Member Author

Choose a reason for hiding this comment

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

Should we just run all trimming tests?

Yes, I think that would be a good idea. I don't have time to do it myself right now, so it would be great if someone else could pick that up.

Copy link
Member

Choose a reason for hiding this comment

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

Should we just run all trimming tests?

Yes, I think that would be a good idea. I don't have time to do it myself right now, so it would be great if someone else could pick that up.

Seemed straightforward enough so I just did it in #101229. Looks like it found stuff. Unclear if test issues or product issues at this point.

</ItemGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
</Project>
Loading