Use PortableRuntimeIdentifierGraph in ToolPackage#55046
Conversation
Where does it end up using it? |
|
sdk/src/Layout/redist/targets/GenerateLayout.targets Lines 13 to 15 in dec5a57 It copies runtime.json (legacy graph) as RuntimeIdentifier.json which ends up at "openbsd-x64": {
"#import": [
"openbsd-x64"
]
}(without the proper hierarchy) |
|
I published openbsd-x64 sdk via GA workflow https://github.com/am11/dotnet-riscv/releases/tag/11.0.100-preview.7.26327.199, if you extract the tar, you will find both files under that location. |
That sounds like a bug at https://github.com/dotnet/runtime/blob/567a079a3f45e2e217815b49e1e09fa76ab72f11/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj#L29C46-L29C55 . This line will introduce the self-reference when TargetRid == PortableTargetRid . |
|
@jkotas, I have tested with this PR and can confirm that If it makes sense then this PR switching to portable graph (when available; not available in <.NET8 TFMs) can move forward. dotnet/runtime#129929 is optional; it only makes sense if this PR is not accepted, or if we want to support
Correctness fix is in dotnet/runtime#129944 (i.e. it is unrelated to |
There was a problem hiding this comment.
Pull request overview
Updates dotnet tool’s RID graph lookup to use the portable runtime identifier graph so newer platforms (e.g., OpenBSD) can resolve RID-specific tool packages correctly, aligning tool behavior with post-.NET 8 RID-graph expectations.
Changes:
- Switch default runtime graph file from
RuntimeIdentifierGraph.json(legacy/frozen) toPortableRuntimeIdentifierGraph.jsonfor tool package operations.
jkotas
left a comment
There was a problem hiding this comment.
Migrating away from the legacy RID graph for tools looks good to me.
I will leave this for the tools area owners to sign off.
The legacy graph is frozen since .NET 8 and we are supposed to use portable graph for new platforms. However, after building OpenBSD, I found that "dotnet tool" fails as it ends up using the legacy graph.