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

Remove uses of IlcTrimMetadata from the test tree #91774

Merged
merged 2 commits into from
Sep 11, 2023

Conversation

MichalStrehovsky
Copy link
Member

This is basically just making tests trimmable. We want to be testing the shipping configuration without weird switches.

I left IlcTrimMetadata in two test projects because the uses there were too annoying to fix up. For System.Security, the problem is in non-trimmability of the APIs and would need RD.XML/whatever. For Vectors, the problem is in the use of dynamic in the tests due to laziness and I'm equally lazy to rewrite all of it.

Fixes #71506.

Cc @dotnet/ilc-contrib

We want to be testing the shipping configuration.

I left it in two test projects because the uses there were too annoying to fix up. For System.Security, the problem is in non-trimmability of the APIs and would need RD.XML/whatever. For Vectors, the problem is in the use of `dynamic` in the tests due to laziness and I'm equally lazy to rewrite all of it.

Fixes dotnet#71506.
@ghost
Copy link

ghost commented Sep 8, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

This is basically just making tests trimmable. We want to be testing the shipping configuration without weird switches.

I left IlcTrimMetadata in two test projects because the uses there were too annoying to fix up. For System.Security, the problem is in non-trimmability of the APIs and would need RD.XML/whatever. For Vectors, the problem is in the use of dynamic in the tests due to laziness and I'm equally lazy to rewrite all of it.

Fixes #71506.

Cc @dotnet/ilc-contrib

Author: MichalStrehovsky
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Type t = typeof(XmlConvert).Assembly.GetType("System.Xml.LocalAppContextSwitches");
Type t = Type.GetType("System.Xml.LocalAppContextSwitches, System.Private.Xml");
Copy link
Member

Choose a reason for hiding this comment

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

I've been seeing so much of this lately that I'm wondering if we should just implement the necessary data flow for this.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 this is my favorite go to way of doing things

Copy link
Member

Choose a reason for hiding this comment

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

The sad part is that even if we implement it (which I think we should) it will only work when the app targets net9+. It's not much use for almost every library out there right now. It will take something like 4 years to really be usable by libraries.
And backporting it to .NET 6 is... difficult to say the least.

…ctors.Tests.csproj

Co-authored-by: Vitek Karas <10670590+vitek-karas@users.noreply.github.com>
@MichalStrehovsky MichalStrehovsky merged commit 533da06 into dotnet:main Sep 11, 2023
@MichalStrehovsky MichalStrehovsky deleted the fix71506 branch September 11, 2023 08:40
@ghost ghost locked as resolved and limited conversation to collaborators Oct 11, 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.

[NativeAOT] Replace IlcTrimMetadata on test projects
4 participants