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

Use RID-layout for OS configurations in libraries #32451

Closed
ViktorHofer opened this issue Feb 17, 2020 · 4 comments · Fixed by #80074
Closed

Use RID-layout for OS configurations in libraries #32451

ViktorHofer opened this issue Feb 17, 2020 · 4 comments · Fixed by #80074
Labels
area-Infrastructure-libraries help wanted [up-for-grabs] Good issue for external contributors
Milestone

Comments

@ViktorHofer
Copy link
Member

We should switch to the well defined RID system away from our current defined OS configurations. This allows us to share the OS configuration matrix with installer and have just one central point where this is defined.

See

<Choose>
<When Condition="$(OutputRid.StartsWith('win'))">
<PropertyGroup>
<TargetsWindows>true</TargetsWindows>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('osx'))">
<PropertyGroup>
<TargetsOSX>true</TargetsOSX>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('debian'))">
<PropertyGroup>
<TargetsDebian>true</TargetsDebian>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('ubuntu'))">
<PropertyGroup>
<TargetsUbuntu>true</TargetsUbuntu>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('linuxmint'))">
<PropertyGroup>
<TargetsLinuxMint>true</TargetsLinuxMint>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('rhel'))">
<PropertyGroup>
<TargetsRhel>true</TargetsRhel>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('centos'))">
<PropertyGroup>
<TargetsCentos>true</TargetsCentos>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('opensuse'))">
<PropertyGroup>
<TargetsOpensuse>true</TargetsOpensuse>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('fedora'))">
<PropertyGroup>
<TargetsFedora>true</TargetsFedora>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('oracle'))">
<PropertyGroup>
<TargetsOracle>true</TargetsOracle>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('sles'))">
<PropertyGroup>
<TargetsSles>true</TargetsSles>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</Otherwise>
</Choose>
for how this is currently implemented in installers.

cc @Anipik @ericstj

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Infrastructure-libraries untriaged New issue has not been triaged by the area owner labels Feb 17, 2020
@ericstj ericstj added this to the 5.0 milestone Feb 18, 2020
@ericstj
Copy link
Member

ericstj commented Feb 18, 2020

Yep, @Anipik and I talked about this and agreed this would be good, to avoid the custom runtime.json. We didn't do it in initial pass because it would churn all the projects. Now is a good time to do it.

@Anipik
Copy link
Contributor

Anipik commented May 27, 2020

Things that need to get done here. Taken from @jkotas comment #33315 (comment)

  • Changes that affect developer workflow should be synchronized using Infrastructure - Rollout (April 2020) #33821
  • For anything that gets renamed to use RIDs, make it follow RIDs 100%: i.e.: Debug\win-x64 instead of win.x64.Debug, linux-arm instead linux_arm, etc.
  • Renaming of the build output directories to use RIDs sounds reasonable. I agree with Eric that the .NET SDK uses RID based directory names, and so it sounds reasonable for consistency.
  • Can this be broken into multiple changes? E.g. Would it make sense to rename the output directories as the step 1, without changing the other stuff? Or can the renames in the CI config be separate change?
  • The non-RID names are used in number of places, and we won't be able to change all of them and achive 100% consistency. I do not think it makes sense to try to change as much as possible to use RID OS names. I think we should rather strike the right ballance, e.g. switch to use RIDs where there is a clear prior art (e.g. where the .NET SDK is using them) and leave the rest alone. For example, I do not think it makes sense to be changing the CMakeFiles to use RID OS names.

@ViktorHofer
Copy link
Member Author

@Anipik sounds like we can make incremental progress. Do you want to work on this and if yes, can you break down the necessary changes into individual tasks with a rough estimation? Would like to better understand the size of this task.

@Anipik
Copy link
Contributor

Anipik commented Jun 30, 2020

The Benefits vs cost scenario is not that great for this issue, so we put it on hold. But u can summarize the steps in detail

@Anipik Anipik modified the milestones: 5.0.0, Future Jul 9, 2020
@Anipik Anipik removed their assignment Nov 10, 2021
@ViktorHofer ViktorHofer added the help wanted [up-for-grabs] Good issue for external contributors label May 10, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Dec 30, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jan 2, 2023
ViktorHofer added a commit that referenced this issue Jan 11, 2023
Follow-up on #32451
Follow-up on #80074

In #43651, the "Windows" OS name was lowercased to achieve target frameworks with RIDs in them. At that time, the original plan was to lowercase all TargetOS values but that had to be cut because of resources. This PR finishes that and updates build systems, YML, markdowns and managed components.

To not break existing developer workflows, the passed-in -os value is automatically lower-cased in the script entry points and validated in the msbuild entry point.
@ghost ghost locked as resolved and limited conversation to collaborators Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-libraries help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
4 participants