Skip to content

Using Versionless rids instead of custom OSes - #33315

Closed
Anipik wants to merge 25 commits into
dotnet:masterfrom
Anipik:Rid
Closed

Using Versionless rids instead of custom OSes#33315
Anipik wants to merge 25 commits into
dotnet:masterfrom
Anipik:Rid

Conversation

@Anipik

@Anipik Anipik commented Mar 6, 2020

Copy link
Copy Markdown
Contributor

Fixes #32451

Comment thread src/libraries/Directory.Build.props Outdated
@ericstj
ericstj requested review from dagood and removed request for ahsonkhan March 7, 2020 00:11

@ericstj ericstj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

did a scan of libraries + plumbing and it seemed ok. I want to make sure we have folks from coreclr and installer review as well. This one may warrant a manual official build.

Comment thread eng/pipelines/common/xplat-setup.yml
@jkotas

jkotas commented Mar 7, 2020

Copy link
Copy Markdown
Member

The abbreviated and all lower identifiers look odd when everything else in .NET is non-abbreviated and CamelCased.

@ericstj

ericstj commented Mar 7, 2020

Copy link
Copy Markdown
Member

@jkotas the same could be said for TargetFrameworks. These come from the same source.

@@ -301,7 +258,7 @@
<!-- Helix properties -->
<OSPlatformConfig>$(TargetOS).$(Platform).$(Configuration)</OSPlatformConfig>
<AnyOSPlatformConfig>AnyOS.AnyCPU.$(Configuration)</AnyOSPlatformConfig>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lower case AnyOS and AnyCPU as well?

@ericstj ericstj Mar 17, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AnyCPU comes from VS and this is the casing they use.
AnyOS is our invention, and perhaps it should be eliminated. There is a representation in the RID graph:

I'd first question any place that needed to actually know this string. That feels like it could be an artifact of the old config system.

Comment thread eng/common/templates/job/job.yml Outdated

@ViktorHofer ViktorHofer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please revert changes in eng/common

platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
managedTestBuildOsGroup: Linux
managedTestBuildOsGroup: linux

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Anipik did we miss these when you renamed OSGroup to BuildOS?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I didnt change the .yml scripts variable names in the previous PR. i Wanted to keep that little bit separate as other change was getting crowded.

Comment thread src/libraries/Directory.Build.props
Comment thread eng/native/build-commons.sh Outdated
endif()
else()
if(NOT (CLR_CMAKE_HOST_OS STREQUAL Windows_NT))
if(NOT (CLR_CMAKE_HOST_OS STREQUAL win))

@akoeplinger akoeplinger Mar 9, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All the other CLR_CMAKE_HOST_OS values on other platforms are initialized to longer names that start with upper case so this makes it inconsistent.

You could change it to Windows on L117 instead.

Comment thread eng/pipelines/coreclr/templates/run-performance-job.yml Outdated
@Anipik

Anipik commented Mar 17, 2020

Copy link
Copy Markdown
Contributor Author

@ericstj @ViktorHofer @safern can you take a look at this. Most of the failures are resolved here and i have a pr in jitutils to fix the formatting failure.

@@ -81,6 +81,10 @@
<Versions>1;2</Versions>
</RuntimeGroup>

<RuntimeGroup Include="WebAssembly">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a product change, did you mean to include this? I thought this was still under discussion: #33327

@Anipik
Anipik requested review from ericstj, jkotas and safern March 18, 2020 02:04
set(CLR_CMAKE_HOST_UNIX_AMD64 1)
set(CLR_CMAKE_HOST_DARWIN 1)
set(CMAKE_ASM_COMPILE_OBJECT "${CMAKE_C_COMPILER} <FLAGS> <DEFINES> <INCLUDES> -o <OBJECT> -c <SOURCE>")
set(CLR_CMAKE_HOST_OS osx)

@jkotas jkotas Mar 18, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is the convention for CLR_CMAKE_HOST_OS ? This line has it lower cased RID, and the very next line has it upped cased human readable?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Again, this feels pretty unnatural to use the lower-cased shortened OS names in CMake. The convention in CMake is to use Linux, Windows, etc.

@jkotas

jkotas commented Mar 18, 2020

Copy link
Copy Markdown
Member

I am sorry, but I still do not understand the benefit of this change. The RID OS names everywhere look plain ugly, we still have the good names in many places and so this is just moving the inconsistency to a different spot. I understand that the installers have to figure out the RID, and this change will make it a bit simpler. How many lines are we going to save by doing this? Are there bad problems with this from the past that this is going to avoid?

@BruceForstall

Copy link
Copy Markdown
Contributor

@Anipik Can you explain in the initial comment above what the PR title actually means, and what its implication is for the various components, including dev workflow? The PR title and associated "Fixed" issue are not sufficiently detailed for me to understand what this is about.

@BruceForstall

Copy link
Copy Markdown
Contributor

Looking through the change, this looks like an extremely disruptive change. There will be many individual scripts (outside the repo) that need to be adjusted. It also seems to turn RID concepts into user-visible concepts, possibly unnecessarily. I always disliked the usage of "Windows_NT" (IMO, it should be "Windows" - we stopped saying "NT" like 20 years ago), and "OSX" should be "macOS". But using "win" everywhere that an OS name is required seems like overkill. Especially since "win" is an English word as well as a magic RID abbreviation meaning the Windows OS. Using "win" instead of "Windows" in non-RID contexts seems wrong. Is this whole change worth the trouble (and inevitable long tail fallout)?

@ericstj

ericstj commented Mar 18, 2020

Copy link
Copy Markdown
Member

The benefit here is that we change the cross-targeting parameter for the libraries projects to match the actual mechanism that is used to select libraries and our runtime implementations (RID). This concept and value space is something built into our product, as opposed to the current set of values which is something only that's really just set of strings we use in comparisons with a somewhat organic history.

I agree that this is a pretty huge change touching more than just libraries. There is some benefit to reducing the number of unique concepts and manual mappings that need to be understood. I believe the idea here was that after this diff folks could think about a runtime in a single language / value space. Initially I was just planning on taking this to our libraries infra, but @Anipik generalized to the entire repo in order to minimize the number of "OS" concepts we had floating around.

@Anipik

Anipik commented Mar 19, 2020

Copy link
Copy Markdown
Contributor Author

@jkotas @BruceForstall @ericstj what is the final agreement here ?

@jkotas

jkotas commented Mar 20, 2020

Copy link
Copy Markdown
Member

My take:

  • 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.

@Anipik

Anipik commented Mar 20, 2020

Copy link
Copy Markdown
Contributor Author

@jkotas that looks like a good plan. i will start working on it and try to split in multiple chunks

@Anipik Anipik closed this Mar 20, 2020
@Anipik
Anipik deleted the Rid branch March 27, 2020 21:46
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use RID-layout for OS configurations in libraries