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
Multiple IL2049 warnings when publishing with NativeAOT and _AggressiveAttributeTrimming #88994
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsDescriptionI tried using
Reproduction Steps
$env:COMPUTESHARP_SWAPCHAIN_CLI_PUBLISH_AOT='true';
dotnet publish samples\ComputeSharp.SwapChain.Cli\ComputeSharp.SwapChain.Cli.csproj -c Release -f net8.0 -r win-x64 Expected behaviorShould build with no warnings. Actual behaviorWhen Regression?No response Known WorkaroundsNo response Configuration
Other informationNo response
|
It's generating a warning because an obscure/useless corner case of the attribute trimming XML format is not implemented. Can be fixed by just not generating the warning (it's unlikely the obscure corner case is worth the effort to implement). Since |
This affects NativeAOT when targeting Apple platforms (net8.0-macos/maccatalyst/ios/tvos):
|
Fixes #88994. ILLinker attribute XML format has a way to express "only remove these attributes when parameter X has value of Y". We currently generate a warning and don't trim the attribute at all. The savings from trimming these attributes are going to be miniscule. Even in IL, this is scraping the bottom of the barrel. In Native AOT these attributes are pretty effectively deduplicated across assemblies. We'll likely never need this. This keeps the existing behavior (don't trim the attribute), but removes the warning.
Does this show up in customer scenarios? (Would we want this for 8.0?) |
Sorry for the late reply. Yes these show up in template apps, I have posted examples of warnings here: PS I see you have already opened a PR for this, thanks! |
Fixes #88994. ILLinker attribute XML format has a way to express "only remove these attributes when parameter X has value of Y". We currently generate a warning and don't trim the attribute at all. The savings from trimming these attributes are going to be miniscule. Even in IL, this is scraping the bottom of the barrel. In Native AOT these attributes are pretty effectively deduplicated across assemblies. We'll likely never need this. This keeps the existing behavior (don't trim the attribute), but removes the warning.
Fixes #88994. ILLinker attribute XML format has a way to express "only remove these attributes when parameter X has value of Y". We currently generate a warning and don't trim the attribute at all. The savings from trimming these attributes are going to be miniscule. Even in IL, this is scraping the bottom of the barrel. In Native AOT these attributes are pretty effectively deduplicated across assemblies. We'll likely never need this. This keeps the existing behavior (don't trim the attribute), but removes the warning.
Fixes #88994. ILLinker attribute XML format has a way to express "only remove these attributes when parameter X has value of Y". We currently generate a warning and don't trim the attribute at all. The savings from trimming these attributes are going to be miniscule. Even in IL, this is scraping the bottom of the barrel. In Native AOT these attributes are pretty effectively deduplicated across assemblies. We'll likely never need this. This keeps the existing behavior (don't trim the attribute), but removes the warning. Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
Description
I tried using
_AggressiveAttributeTrimming
to check the size diffs, and noticed a whole bunch of warnings:Reproduction Steps
Expected behavior
Should build with no warnings.
Actual behavior
When
_AggressiveAttributeTrimming
is set, you get a whole bunch of warnings.Configuration
The text was updated successfully, but these errors were encountered: