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

Add new .NET 9 NativeAOT runtime pack RIDs #18121

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/redist/targets/GenerateBundledVersions.targets
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@

<ILCompilerSupportedRids Include="@(Net80ILCompilerSupportedRids)" />

<NativeAOTRuntimePackRids Include="
<Net80NativeAOTRuntimePackRids Include="
ios-arm64;
iossimulator-arm64;
iossimulator-x64;
Expand All @@ -360,6 +360,19 @@
"
/>

<NativeAOTRuntimePackRids Include="
@(Net80NativeAOTRuntimePackRids);
linux-x64;
linux-arm64;
linux-musl-x64;
linux-musl-arm64;
win-x64;
win-arm64;
browser-wasm;
wasi-wasm;
Comment on lines +371 to +372
Copy link
Member Author

@filipnavara filipnavara Jan 5, 2024

Choose a reason for hiding this comment

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

I assume that these two could be a bit controversial. There are no official runtime packs for these two RIDs and they are only relevant for the NativeAOT/LLVM experiment in the dotnet/runtimelab repository.

However, moving fully to the runtime pack approach in .NET 9 would mean that NativeAOT/LLVM has to adapt. It's non-trivial to update the supported RID list from MSBuild in an efficient way since it requires to be done early in the restore process (ie. one cannot make a NuGet that adds browser-wasm to the list).

When doing NativeAOT publish with a RID not on this list the runtime pack is silently not downloaded and resolved, resulting in a build with no runtime libraries and bogus errors later on. There's no explicit check for this case and no user friendly error. On the other hand, with a RID on this list that has no corresponding NuGet package you get a fairly meaningful error about the NuGet package not being found.

cc @SingleAccretion

Copy link
Member

Choose a reason for hiding this comment

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

On the other hand, with a RID on this list that has no corresponding NuGet package you get a fairly meaningful error about the NuGet package not being found.

Yes I agree that is much better.

"
/>

<AspNetCore31RuntimePackRids Include="@(AspNetCore30RuntimePackRids)" />
<AspNetCore50RuntimePackRids Include="@(AspNetCore31RuntimePackRids);linux-musl-arm;win-arm64" />
<AspNetCore60RuntimePackRids Include="@(AspNetCore50RuntimePackRids);osx-arm64;linux-s390x;linux-loongarch64" />
Expand Down Expand Up @@ -623,7 +636,7 @@ Copyright (c) .NET Foundation. All rights reserved.
RuntimeFrameworkName="Microsoft.NETCore.App"
LatestRuntimeFrameworkVersion="$(_NET80RuntimePackVersion)"
RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.NativeAOT.**RID**"
RuntimePackRuntimeIdentifiers="@(NativeAOTRuntimePackRids, '%3B')"
RuntimePackRuntimeIdentifiers="@(Net80NativeAOTRuntimePackRids, '%3B')"
RuntimePackLabels="NativeAOT"
/>

Expand Down