Uh oh!
There was an error while loading. Please reload this page.
fix rid processing on macOS - #60494
Conversation
ghost
commented
Oct 15, 2021
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue Details#59066 made some changes how we calculate RID on macOS and it was not quite right. The test was failing because there was embedded '\0'. So even if we add the architecture, that would be stripped with There is still another problem. The way how the old code was written we would always return For 12.0+ the rid will be fixes #60341
|
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Vitek Karas <vitek.karas@microsoft.com>
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
danmoseley
commented
Oct 16, 2021
Regression was after 6.0 fork right? |
agocke
commented
Oct 16, 2021
I don't understand this -- where was the embedded '\0'? |
Uh oh!
There was an error while loading. Please reload this page.
wfurt
commented
Oct 18, 2021
This comes from @agocke runtime/src/native/corehost/hostmisc/pal.unix.cpp Lines 592 to 595 in 1c949ac With the current code and runtime/src/native/corehost/hostmisc/utils.cpp Lines 211 to 221 in 1c949ac So it seems like if we construct |
wfurt
commented
Oct 18, 2021
yes. But we should take both to 6.0 - either now or via servicing as the original intent is to support macOS 12. |
wfurt
commented
Oct 19, 2021
LLVM AOT looks like infrastructure unrelated to the change. |
| size = pos - str; | ||
| } | ||
| else if (major == 12) |
There was a problem hiding this comment.
Shouldn't this read else if (major == 11)? I think line 594 will never execute because, if major==12, line 587 executes instead.
There was a problem hiding this comment.
I was thinking that too. Here is a PR to fix: #60668
There was a problem hiding this comment.
yes, this should not be there. It somehow sneaked in when I was trying to remove the extra size calculation ;(
* fix rid processing on macOS * Update src/native/corehost/hostmisc/pal.unix.cpp * Update src/native/corehost/hostmisc/pal.unix.cpp * remove extra size calculation
* RID work for macOS 12 (#59066) * fix rid processing on macOS (#60494) * fix rid processing on macOS * Update src/native/corehost/hostmisc/pal.unix.cpp * Update src/native/corehost/hostmisc/pal.unix.cpp * remove extra size calculation * Fix "fix rid processing on macOS" (#60668) The `else if (major == 12)` is dead code, since the previous if `if (major > 11)` would be true for `major == 12`. Judging by the comment and code, it looks like the intention of this `else if` statement was to match `major == 11`. * add the packaging for platforms package Co-authored-by: Austin Wise <AustinWise@gmail.com> Co-authored-by: Anirudh Agnihotry <anagniho@microsoft.com>
#59066 made some changes how we calculate RID on macOS and it was not quite right.
The test was failing because there was embedded '\0'. So even if we add the architecture, that would be stripped with
.c_str. It actually worked for11.2.3I started with but failed on11.2(no real ARM dependency IMHO)There is still another problem. The way how the old code was written we would always return
osx.11.0fromget_current_os_rid_platformeven for 11.6. That does not break the test but then when we walk the graph we would end up with genericosx-arm64. So to maintain compatibility, I added special processing for 11.x (and verified with dotnet --info)For 12.0+ the rid will be
osx.12-arm64and that match<Versions>10.10;10.11;10.12;10.13;10.14;10.15;10.16;11.0;12</Versions>fixes#60341