Skip to content

Conversation

@cipolleschi
Copy link
Contributor

Summary:

Commit 73664f5 broke two jobs in CircleCI that we run using Xcode 14.3.1 because the commit introduced some types that are available only to iOS 17.
The code was wrapped around if(@available()) statement, but this does not compile out the code. It is a runtime check and the code needs to build anyway.

This takes effect at compile time as well. However, unlike with #available, the method must type check and compile. The code will always be emitted into your binary: however, it will only be used when the binary is executed on platforms that meet the availability requirements.

source: https://forums.swift.org/t/if-vs-available-vs-if-available/40266/2

This change should fix it, introducing some compile time pragmas that removes the code if we build with older versions of Xcode

Changelog:

[iOS][Changed] - Compile out UIHoverStyle code for older Xcode versions

Test Plan:

CircleCI is green

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Mar 5, 2024
@cipolleschi cipolleschi force-pushed the cipolleschi/fix-ci-for-hover-types branch from 2a71f3c to 0d62331 Compare March 5, 2024 14:59
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cipolleschi cipolleschi closed this Mar 5, 2024
@cortinico cortinico deleted the cipolleschi/fix-ci-for-hover-types branch June 10, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants