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

generation of RID graph no longer works #82125

Closed
wfurt opened this issue Feb 14, 2023 · 10 comments · Fixed by #82204
Closed

generation of RID graph no longer works #82125

wfurt opened this issue Feb 14, 2023 · 10 comments · Fixed by #82204
Labels
area-Infrastructure-libraries needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration
Milestone

Comments

@wfurt
Copy link
Member

wfurt commented Feb 14, 2023

I was trying add new RID (ubuntu 23.04). I added entry to runtimeGroups.props in Microsoft.NETCore.Platforms and run dotnet.sh pack /p:UpdateRuntimeFiles=true as usually.
But no updates were made to runtime.json and runtime.compatibility.json
Release/6.0 branch still works but I experienced same issue with release/7.0.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Feb 14, 2023
@ghost
Copy link

ghost commented Feb 14, 2023

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

I was trying add new RID (ubuntu 23.04). I added entry to runtimeGroups.props in Microsoft.NETCore.Platforms and run dotnet.sh pack /p:UpdateRuntimeFiles=true as usually.
But no updates were made to runtime.json and runtime.compatibility.json
Release/6.0 branch still works but I experienced same issue with release/7.0.

Author: wfurt
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@carlossanlop
Copy link
Member

6.0 PR with changes that were successfully created with the generator: #82120
7.0 PR with changes that couldn't get created with the generator: #82123

@carlossanlop carlossanlop removed the untriaged New issue has not been triaged by the area owner label Feb 14, 2023
@tmds
Copy link
Member

tmds commented Feb 15, 2023

With .NET 7, source-build for unknown distros manages to successfully update the graph and then use that graph in the build. The task for that (GenerateRuntimeJson) is similar to the one used here (UpdateRuntimeJson).

<Target Name="GenerateRuntimeJson" AfterTargets="Build" Condition="'$(AdditionalRuntimeIdentifiers)' != ''">
<MakeDir Directories="$(IntermediateOutputPath)" />
<GenerateRuntimeGraph RuntimeGroups="@(RuntimeGroupWithQualifiers)"
AdditionalRuntimeIdentifiers="$(AdditionalRuntimeIdentifiers)"
AdditionalRuntimeIdentifierParent="$(AdditionalRuntimeIdentifierParent)"
RuntimeJson="$(BaseOutputPath)runtime.json"
UpdateRuntimeFiles="True" />
</Target>
<Target Name="UpdateRuntimeJson">
<!-- Generates a Runtime graph using RuntimeGroups and diffs it with the graph described by runtime.json and runtime.compatibility.json
Specifying UpdateRuntimeFiles=true skips the diff and updates those files.
The graph can be visualized using the generated dmgl -->
<MakeDir Directories="$(OutputPath)" />
<GenerateRuntimeGraph RuntimeGroups="@(RuntimeGroupWithQualifiers)"
RuntimeJson="runtime.json"
CompatibilityMap="runtime.compatibility.json"
RuntimeDirectedGraph="$(OutputPath)runtime.json.dgml"
UpdateRuntimeFiles="$(UpdateRuntimeFiles)" />
</Target>

@ViktorHofer
Copy link
Member

Here's yet another PR that successfully uses the infrastructure in main: #82185. @wfurt please give it another try.

@ViktorHofer ViktorHofer added the needs-author-action An issue or pull request that requires more info or actions from the author. label Feb 15, 2023
@ghost
Copy link

ghost commented Feb 15, 2023

This issue has been marked needs-author-action and may be missing some important information.

@ViktorHofer ViktorHofer added this to the 8.0.0 milestone Feb 15, 2023
@wfurt
Copy link
Member Author

wfurt commented Feb 15, 2023

What do you want me to try? Just run the pack command as documentation suggest?
https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.NETCore.Platforms/readme.md

@ghost ghost added needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration and removed needs-author-action An issue or pull request that requires more info or actions from the author. labels Feb 15, 2023
ViktorHofer referenced this issue Feb 15, 2023
…76068)

* Use generated runtime.json when building shared framework packages.

* Don't UpdateRuntimeJson on Build.

* PR feedback.

* Update Microsoft.NETCore.Platforms.csproj

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
@ViktorHofer
Copy link
Member

I was looking for any console indication of why it doesn't work anymore but disregard as I just found the culprit: #76068

@wfurt
Copy link
Member Author

wfurt commented Feb 15, 2023

thanks for looking into it @ViktorHofer

@tmds
Copy link
Member

tmds commented Feb 15, 2023

See cd2f0ff#r100777231.

@tmds
Copy link
Member

tmds commented Feb 15, 2023

The change was also backported to 6.0 with some differences: #77510.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 15, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 16, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-libraries needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants