-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[wasm][tests] IL2105
trimming errors in test projects
#51602
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue Details
|
System.ComponentModel.Primitives.Tests
IL2105
trimming errors in test projects
cc @eerhardt |
Issue: dotnet#51602 `System.ObjectModel.Tests` `System.ComponentModel.Primitives` `System.ComponentModel.TypeConverter.Tests`
Getting similar errors for
|
I don't understand why we are failing the build with linker errors coming from tests. Can anyone explain? I thought we suppressed all trim warnings in tests. If IL2105 isn't being suppressed by default, we should disable it explicitly in our tests. |
Is that done just for the linker tests?
|
Should I disable all trim warnings ( |
runtime/eng/testing/tests.mobile.targets Lines 16 to 19 in c16cb0e
However, I think the issue here is that So we should also add @sbomer - is there a reason 2105 isn't suppressed? |
ah, ok! that doesn't apply for |
And should this issue be closed? |
Not if the tests are still failing. We should do something to make them pass. |
I'm trying that now in #52004 . I meant, that this issue is for IL2105 specifically, and if we are disabling it as "not relevant for tests", or "won't fix for tests", then we can close this issue. I'll update when I have results from the build. |
I wouldn't disable the test. I would just suppress the warning. |
Yes - it's not categorized as a "Trim analysis" warning in the linker because we want to encourage the use of fully-qualified type names for parameters that have These tests look like they aren't testing a user scenario (they seem to use strings that don't map to any types) so I think it would be fine just to suppress IL2105 for the tests. |
Sounds good to me. Thanks for verifying. |
Building these tests with
/p:EnableAggressiveTrimming=true
fails with:Build
System.ObjectModel.Tests
:System.ComponentModel.Primitives.csproj
System.ComponentModel.TypeConverter.Tests
The text was updated successfully, but these errors were encountered: