-
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
Environment.OSVersion returns wrong info on Big Sur #41012
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
runtime/src/libraries/Common/src/Interop/OSX/Interop.libobjc.cs Lines 34 to 50 in c87e75e
|
yah, I saw that. Some objective C messaging... |
This suggests everything ultimately reads |
Parsing files seems tricky. What is curious is that we seems to be using API Apple does not use for system utilities. |
It's dependent on which macOS SDK is used. If the code is built with xcode 12 beta and uses the macOS 11 SDK, then I think Apple did this to mitigate older apps making the assumption that major version would be 10 forever, and only return the later version on the new SDK. |
Interesting. Since we do single build on 10.13, we may do some fix-ups here. |
This is more tricky than I expected. I added code to get version via sysctl. However it seems to also go through compat layer so when I ask for I think we have following options IMHO:
While 1. is probably best option long term, 2. would allow us to move forward quickly and safely. We can itterate on the fix once 11.0 really ships and is stable. I personally don't like fourth option. That seems something hard to maintain over time. Let me know @danmosemsft what do you want to do. There is some (unofficial) article suggesting this may be permanent: |
+1 |
I like # 2 ... and eventually we will build 6.0 (?) using the 11.0 SDK and we can remove it. I assume we will backport this also, but it woudl be for Oct at this point which is fine. |
ok. SYSTEM_VERSION_COMPAT can be used as workaround by anybody who really want to see 11.0 right now. (and we added compat 10.16 RID as well) |
/backport to release/5.0 |
oops, should be on the PR! |
@danmosemsft , @wfurt ,the OS version is still shown as 10.16 instead of 11.0 with October Update(runtime 3.1.9 and 2.1.23). Here is the result for runtime 3.1.9 Runtime Environment: |
real impact of #41179 is probably small but since risk is also small I would do it if we want clean CI runs. Should I create PR for 3.1 and possibly 2.1 @danmosemsft ? |
I don't want to change the product just to fix a test. What about customer impact -- it's that this API is broken on Big Sur? For this one, @NicoleWang001 any particular reason you ask? Or just noticed? |
yes, GetIcmpV6Statistics does not work on Big Sur. That was discovered by our tests - I have not seen any real use and apisof.net do't show much either. |
OK, doesn't meet the servicing bar I think unless and until customers tell us it's essential. (cc @karelz) Environment.OSVersion I'm thinking is worth porting, as otherwise it will be surprising when folks move code to 5.0+. If we do it now, we break few or nobody because they are'nt using Big Sur yet. What do you think? |
One could argue the versioning is cosmetic since RID graph can support both. But I think this will be surprising to many users and I would port to at least 3.1 to avoid confusion - under "new OS support" rule - which should be "tell mode", right? |
All existing programs on Big Sur will have this behavior. I do not think it will be that surprising.
I have not heard about a rule like that. (Also, this is a cosmetic change. It is not required to make things work on the new OS.) |
https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/545/NET-Core-Servicing |
What I meant was: if we made the update before Big Sur gets widely deployed, hardly any code will see 10.16 before we change it to 11.0. Fewer people will hve written code like I am happy to close this in that case.. |
Getting another perspective - @marek-safar thoughts about the importance of backporting this change? If nobody feels strongly -we can close this. |
It does not meet the bar for 3.1 for me and it'd be breaking change in minor 3.1 version bump. I think it's better to keep the change for 5.0+ only. |
OK, closing |
This returns 10.16 and may be caveat of the beta.
However, is is curious that OS tools report 11.0 as expected:
This seems to also impact
dotnet --info
and perhaps package selection.cc: @akoeplinger @marek-safar @danmosemsft
The text was updated successfully, but these errors were encountered: