-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Platform Specifications Should Match Casing Among All Build Scripts #81141
Comments
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsDescriptionRecently, a conversation about making all platform ID's in build scripts lowercase was revived in PR #80164. However, the lack of uniformity can lead to unexpected and wrong behavior to unsuspecting developers passing flags directly to MSBuild when using other scripts, like for example Reproduction StepsSee this example:
./build.sh -s clr+libs -c Release
./src/tests/build.sh -x64 -release -generatelayoutonly
./src/tests/build.sh -x64 -release -test:JIT/Methodical/Methodical_d2.csproj
./eng/common/msbuild.sh src/tests/Common/helixpublishwitharcade.proj -maxcpucount -bl -p:TargetArchitecture=x64 -p:TargetOS=Linux -p:TargetOSSubgroup= -p:Configuration=Release Expected behaviorThe Merged Payloads are generated in the same folder as the test builds. Actual behaviorAfter running the last command, checking in under
The test builds will be under Regression?Yes, but according to the discussions in #80164 and other issues linked there, the lowercase behavior added in that PR is the one that the scripts ought to adopt. Known WorkaroundsPass ConfigurationNo response Other informationWhile this is not breaking by any means, at least for the time being, it can be very deceiving how many configuration options are case-insensitive (or are converted to a certain case behind curtains), and then suddenly one becomes case-sensitive. This confusion becomes more apparent when we consider the platform string is expected to be lower case, and all MSBuild properties are Pascal Case.
|
I tried to cover all possible cases and scripts in that PR but based on the huge number of files using the TargetOS property, I might have missed a place. @ivdiazsa as you assigned yourself, I assume you will send a fix? Note that we have validation in MSBuild that makes sure that the TargetOS value is lowercased: runtime/Directory.Build.targets Lines 81 to 84 in 9b76c28
Presumably the runtime tests don't import the repo infrastructure? |
I don't currently have a fix ready but I assigned myself because I'm willing to work on it. However, if you or anyone else has a fix ready, feel free to submit it. |
Fixes #81141. In PR #80164, the build scripts were updated to always require and/or convert the MSBuild `TargetOS` property to lowercase. However, the _helixpublishwitharcade.proj_ file was not included in these efforts, which led to some confusing behavior and misplaced files, as described in issue #81141. This PR addresses and fixes that.
Description
Recently, a conversation about making all platform ID's in build scripts lowercase was revived in PR #80164. However, the lack of uniformity can lead to unexpected and wrong behavior to unsuspecting developers passing flags directly to MSBuild when using other scripts, like for example
eng/common/build.sh
.Reproduction Steps
See this example:
Expected behavior
The Merged Payloads are generated in the same folder as the test builds.
Actual behavior
After running the last command, checking in under
artifacts/tests/coreclr
, there will be two variants of the same results folder:The test builds will be under
linux
and the Merged Payloads will be underLinux
. Consequently, the Merged Payloads will be empty since no tests were found under that path.Regression?
Yes, but according to the discussions in #80164 and other issues linked there, the lowercase behavior added in that PR is the one that the scripts ought to adopt.
Known Workarounds
Pass
-p:TargetOS=linux
instead of-p:TargetOS=Linux
.Configuration
No response
Other information
While this is not breaking by any means, at least for the time being, it can be very deceiving how many configuration options are case-insensitive (or are converted to a certain case behind curtains), and then suddenly one becomes case-sensitive. This confusion becomes more apparent when we consider the platform string is expected to be lower case, and all MSBuild properties are Pascal Case.
The text was updated successfully, but these errors were encountered: