Skip to content

Add conditionals to unbreak building ToolsSupportCore for iOS #241

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

Merged
merged 1 commit into from
Jul 2, 2021

Conversation

abertelrud
Copy link
Contributor

One availability conditional wasn't properly including the iOS platform, and another conditional caused an "implementation required" error. This restores the ability to build on iOS after #228 and #236.

One availability conditional wasn't properly including the iOS platform, and another conditional caused an "implementation required" error.  This restores the ability to build on iOS.
@abertelrud
Copy link
Contributor Author

@swift-ci please test

@abertelrud abertelrud requested a review from compnerd July 2, 2021 05:37
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Do we need to worry about tvOS and watchOS being covered?

@abertelrud
Copy link
Contributor Author

Do we need to worry about tvOS and watchOS being covered?

Ideally yes. I initially went down that route with this fix, just for completeness, but discovered that there are bigger blockers to building for those right now. For example, while the posix_spawn APIs don't work iOS they are at least defined, but they are marked as unavailable for tvOS and watchOS.

So it would be some work to get TSC to work on tvOS and watchOS. Since iOS is the one being actively used, that's the one that needs to continue working. Perhaps we should have a clearer error message on watchOS and iOS until it's supported, if ever. Ideally we'd have CI for at least building on iOS (only some of the unit tests run, since subprocess launching isn't available).

For the availability conditionals I've been taking the approach of copying the conditions from the definition to the call site, which is why I included tvOS and watchOS in that diff here.

@abertelrud abertelrud merged commit 3b6b97d into main Jul 2, 2021
@abertelrud abertelrud deleted the eng/repair-support-for-ios branch July 2, 2021 16:42
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