Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Conversation

@github-actions
Copy link
Contributor

@github-actionsgithub-actionsbot commentedOct 29, 2024
edited by kotlarmilos
Loading

Backport of#108748 to release/9.0-staging

/cc@kotlarmilos

Customer Impact

  • Customer reported
  • Found internally

This PRfixes#108694 by updatingIsOSVersionAtLeast to treat unspecified build or revision components as zero. Previously, theIsOSVersionAtLeast didn't normalize components, leading to incorrect version checks on MacCatalyst when only two components (major and minor) were provided.

Regression

  • Yes
  • No

On MacCatalyst, the version does not include build or revision components, and tests only covered the four-parameter overload ofIsOSVersionAtLeast.

Testing

TheOperatingSystem tests 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.

kotlarmilosand others added17 commitsOctober 29, 2024 09:51
…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>
@ghostghost added the needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners labelOct 29, 2024
@kotlarmiloskotlarmilos self-assigned thisOct 29, 2024
@kotlarmiloskotlarmilos added area-System.Runtime os-maccatalystMacCatalyst OS and removed needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners labelsOct 29, 2024
@kotlarmiloskotlarmilos added this to the9.0.1 milestoneOct 29, 2024
@kotlarmiloskotlarmilos linked an issueOct 29, 2024 that may beclosed by this pull request
@kotlarmiloskotlarmilos added the Servicing-considerIssue for next servicing release review labelOct 29, 2024
Copy link
Member

@jeffhandleyjeffhandley left a 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
Copy link
Member

@artl93 This is ready for Servicing now

@artl93
Copy link
Member

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
Copy link
Member

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?

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 to18.0 , it appears as18.0.-1.-1. In this case,OperatingSystem.IsMacCatalystVersionAtLeast(18,0) would return false, since it compared a default build component (0) with the OS-provided build component (-1).

How long has MacCatalyst worked this way?

We have no evidence thatiOSSupportVersion inSupportVersion.plist has ever included build or revision components.

@kotlarmiloskotlarmilos added Servicing-approvedApproved for servicing release and removed Servicing-considerIssue for next servicing release review labelsOct 30, 2024
@carlossanlopcarlossanlop modified the milestones:9.0.1,9.0.2Nov 21, 2024
@jeffhandleyjeffhandley merged commit5afff13 intorelease/9.0-stagingJan 10, 2025
5 of 13 checks passed
@jeffhandleyjeffhandley deleted the backport/pr-108748-to-release/9.0-staging branchJanuary 10, 2025 21:43
@jeffhandleyjeffhandley modified the milestones:9.0.2,9.0.xJan 18, 2025
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 17, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@jeffhandleyjeffhandleyjeffhandley approved these changes

@jkotasjkotasjkotas approved these changes

@akoeplingerakoeplingerAwaiting requested review from akoeplinger

Assignees

@kotlarmiloskotlarmilos

Labels

area-System.Runtimeos-maccatalystMacCatalyst OSServicing-approvedApproved for servicing release

Projects

None yet

Milestone

9.0.x

Development

Successfully merging this pull request may close these issues.

[MacCatalyst] OperatingSystem is currently not working

6 participants

@jeffhandley@artl93@kotlarmilos@jkotas@carlossanlop

[8]ページ先頭

©2009-2025 Movatter.jp