-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
fix: add compiler conditional to hover style #43331
fix: add compiler conditional to hover style #43331
Conversation
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@cipolleschi merged this pull request in 1387725. |
Sorry :( I had thought |
@@ -597,6 +597,7 @@ - (void)invalidateLayer | |||
layer.shadowPath = nil; | |||
} | |||
|
|||
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000 /* __IPHONE_17_0 */ |
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 should be defined for visionOS too right? Checking real quick...
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.
Seems so 👍🏽
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: [forums.swift.org/t/if-vs-available-vs-if-available/40266/2](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] [ADDED] - Compiler conditionals for hover style (cursor: pointer) Pull Request resolved: #43331 Test Plan: CI Green Reviewed By: dmytrorykun Differential Revision: D54540520 Pulled By: cipolleschi fbshipit-source-id: 943ac479062e11969efa7645ec0ead26c6866374
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: 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] [ADDED] - Compiler conditionals for hover style (cursor: pointer)
Test Plan:
CI Green