Using Versionless rids instead of custom OSes - #33315
Conversation
ericstj
left a comment
There was a problem hiding this comment.
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.
|
The abbreviated and all lower identifiers look odd when everything else in .NET is non-abbreviated and CamelCased. |
|
@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> | |||
There was a problem hiding this comment.
Lower case AnyOS and AnyCPU as well?
There was a problem hiding this comment.
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.
ViktorHofer
left a comment
There was a problem hiding this comment.
Please revert changes in eng/common
| platforms: ${{ parameters.platforms }} | ||
| helixQueueGroup: ${{ parameters.helixQueueGroup }} | ||
| managedTestBuildOsGroup: Linux | ||
| managedTestBuildOsGroup: linux |
There was a problem hiding this comment.
@Anipik did we miss these when you renamed OSGroup to BuildOS?
There was a problem hiding this comment.
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.
| endif() | ||
| else() | ||
| if(NOT (CLR_CMAKE_HOST_OS STREQUAL Windows_NT)) | ||
| if(NOT (CLR_CMAKE_HOST_OS STREQUAL win)) |
There was a problem hiding this comment.
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.
|
@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"> | |||
There was a problem hiding this comment.
This is a product change, did you mean to include this? I thought this was still under discussion: #33327
| 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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
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? |
|
@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. |
|
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)? |
|
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. |
|
@jkotas @BruceForstall @ericstj what is the final agreement here ? |
|
My take:
|
|
@jkotas that looks like a good plan. i will start working on it and try to split in multiple chunks |
Fixes #32451