-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Build the test tree with TrimMode=full #121697
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
base: main
Are you sure you want to change the base?
Conversation
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Fixes the build crash in dotnet#121697. Since with TrimMode=partial, we consider all static fields targets of reflection, we cannot allow inlining their contents. With full trimming allowed, the optimization is unlocked and we hit an assert when trying to nullcheck a constant.
Fixes the build crash in #121697. Since with TrimMode=partial, we consider all static fields targets of reflection, we cannot allow inlining their contents. With full trimming allowed, the optimization is unlocked and we hit an assert when trying to nullcheck a constant.
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@copilot there are some tests that are failing due to trimming under src/tests/Loader/classloader/generics/Variance/IL. The failure is caused by removal of default constructor. The failure in each of the tests is caused by: private static void UnboxUToTInternal<T,U>()
{
T t = (T) Activator.CreateInstance(typeof(U));
}This method is replicated in many tests. To fix the failure the methods The attribute may need to be propagated to each of the callsites too. For example: private static void CaseClassUToTWrapper<T,U>()
{
UnboxUToTInternal<T,U>();
}needs to be annotated as |
|
@MichalStrehovsky I've opened a new pull request, #121731, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@copilot for C# source files under src/tests/Loader/classloader/generics/Variance/IL, find the following method in each of the files: |
|
@MichalStrehovsky I've opened a new pull request, #121734, to work on those changes. Once the pull request is ready, I'll request review from you. |
* `dynamic` keyword is unsupported with AOT * So are ALCs * `GetInterfaceMap` API has known issues (the test actually passes right now, but will fail with #121697 so just disabling now)
|
@copilot for C# source files under src/tests/Loader/classloader/generics/Variance/IL, find the following method in each of the files: public static bool UIsInstT<T,U>(bool expected). Add an attribute like this: public static bool UIsInstT<T, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] U>(bool expected). The namespace of the attribute is System.Diagnostics.CodeAnalysis. |
|
@MichalStrehovsky I've opened a new pull request, #121833, to work on those changes. Once the pull request is ready, I'll request review from you. |
67c6b16 to
a6a47a5
Compare
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
We're likely losing out on test coverage by not testing the recommended mainstream shipping configuration.
8b8ca50 to
60acf1a
Compare
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jkotas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
We're likely losing out on test coverage by not testing the recommended mainstream shipping configuration.
The test changes are all to make sure we don't trim what's needed.
Where I could, I avoided just putting TrimMode=full on the assembly (because that makes the test case RequiresProcessIsolation and that's not great). For some I had to give up because there was no clean way to do it.
Cc @dotnet/ilc-contrib