Skip to content
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

Swap availability for #if check on Float16. #157

Merged

Conversation

stephentyrone
Copy link
Member

Xcode 12 on Catalina has Swift 5.3 but the macOS 10.15 SDK, which breaks the conditionals around Float16. Since the type is unconditionally unavailable on macOS, we can simply #if-out any Float16 extensions instead.

Copy link
Member

@lorentey lorentey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! (I'd probably leave the macOS availability annotations in.)

We really need some sort of compile-time way to check the version of the stdlib. We could have Package.swift do an if #available macOS(11.0) check and set a HAVE_FLOAT16 compile-time conditional based on that, but that seems a bit too fancy.

@stephentyrone
Copy link
Member Author

@lorentey yeah, step 2 here is definitely to figure out how to avoid this mess in the future =)

@stephentyrone stephentyrone merged commit 6b24333 into apple:master Sep 18, 2020
@stephentyrone stephentyrone deleted the float16-availability-redux branch February 19, 2021 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants