-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Trim/AOT analyzer missing some ILC warnings #101203
Comments
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas |
Some thoughts:
|
FYI @jtschuster |
Found two more trim analyzer bugs in CsWinRT:
Here.
Here. I'm a bit puzzled as to how the analyzer missed these ones 🤔 |
Found a bit more in microsoft/CsWinRT#1592:
Here. Seems to only warn at publish time, but not in the IDE.
Same for these two. |
I was able to see the described behavior by building CsWinRT locally. Most of these missing warnings have been fixed in .NET 9, and upgrading the project to target net9.0 reports these from the analyzer as well. The following are still missing in .NET 9:
This is a known issue - https://github.com/dotnet/linker/issues/2632 - and has existing linker tests.
This is a new issue - I've opened #101733 to track it. |
And add a testcase to cover IL2068. This just ensures that this particular testcase runs without allowMissingWarnings for the analyzer, and adds one more testcase to track the specific missing warning that was encountered in dotnet#101203 (tracked in dotnet#101734).
And add a testcase to cover IL2068. This just ensures that this particular testcase runs without allowMissingWarnings for the analyzer, and adds one more testcase to track the specific missing warning that was encountered in dotnet#101203 (tracked in dotnet#101734).
Description
We're in the process of fixing all trim/AOT warnings in CsWinRT, and as of our latest PR we're now down to 0 warnings when building. However, we still get 4 warnings from ILC at publish time. I figured I'd report them in case they're actual trim bugs. Annotations in code seem correct.
Reproduction Steps
Use this test project: MinimalWinRTComponentTest.zip.
The code for CsWinRT we're working on is here: https://github.com/microsoft/CsWinRT/tree/staging/AOT.
Expected behavior
No ILC warnings.
Actual behavior
The text was updated successfully, but these errors were encountered: