- Notifications
You must be signed in to change notification settings - Fork5.2k
[release/9.0-staging] FixIsOSVersionAtLeast when build or revision are not provided#109332
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[release/9.0-staging] FixIsOSVersionAtLeast when build or revision are not provided#109332
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…Version.MacCatalyst.csCo-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
…m.csCo-authored-by: Jan Kotas <jkotas@microsoft.com>
…m.csCo-authored-by: Jan Kotas <jkotas@microsoft.com>
…m.csCo-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
…m.csCo-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
jeffhandley left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This looks good to me for servicing.
This fix targets only theIsOSVersionAtLeast so that it returns the expected value when aversion.Build orversion.Revision contains a value less than 0. That is different from the original fix in#108748 where theOperatingSystem instance itself is normalized to have0 for those properties.
jeffhandley commentedOct 29, 2024
@artl93 This is ready for Servicing now |
artl93 commentedOct 29, 2024
Thanks! I'd like, to get clearer on the customer scenario for my education. What does the app see right now? Is the problem that version checks apps do to, for example, make their code selectable based on versions of macOS work properly? How long has MacCatalyst worked this way? |
kotlarmilos commentedOct 30, 2024
This issue doesn’t make the code selectable based on different versions but leads to incorrect behavior. For example, on MacCatalyst, if the version is set to
We have no evidence that |
5afff13 intorelease/9.0-stagingUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Backport of#108748 to release/9.0-staging
/cc@kotlarmilos
Customer Impact
This PRfixes#108694 by updating
IsOSVersionAtLeastto treat unspecified build or revision components as zero. Previously, theIsOSVersionAtLeastdidn't normalize components, leading to incorrect version checks on MacCatalyst when only two components (major and minor) were provided.Regression
On MacCatalyst, the version does not include build or revision components, and tests only covered the four-parameter overload of
IsOSVersionAtLeast.Testing
The
OperatingSystemtests have been extended to cover the three- and two-parameter overloads ofIsOSVersionAtLeast.Risk
Low. Only MacCatalyst should be affected, as it is the only platform that does not provide a build component. Also, this change does not introduce a breaking change.