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

Question: why are @available directives commented out? #3

Closed
BasThomas opened this issue Sep 25, 2020 · 7 comments
Closed

Question: why are @available directives commented out? #3

BasThomas opened this issue Sep 25, 2020 · 7 comments

Comments

@BasThomas
Copy link

Like e.g. here:

// @available(macOS 10.16, iOS 14.0, watchOS 7.0, tvOS 14.0, *)

Are these supposed to be commented out, and if so, why?

@Snowy1803
Copy link

I’d guess System was supposed to be included in those versions of the OSes, but then they decided to make it an open source Swift Package, compatible with Linux

@milseman
Copy link
Contributor

This is due to language/tooling issues. We'd like the ability to add availability based on conditional compilation for ABI-stable builds of Swift System while not adding availability for package builds (i.e. a source dependency). For now, we include, but comment out, the availability declarations matching what has already been shipped in binary releases.

@stephentyrone
Copy link
Member

@Snowy1803 Note that System is included in those versions of the OSes (https://developer.apple.com/documentation/system).

@BasThomas
Copy link
Author

Would it help to add an explanation to it somewhere, either in comment(s) or in the documentation?

@milseman
Copy link
Contributor

milseman commented Oct 6, 2020

@BasThomas definitely. I'm trying to put together some more extensive documentation and this should be part of that.

@milseman
Copy link
Contributor

I put this in the new FAQ issue: #18

@BasThomas
Copy link
Author

Great!

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

No branches or pull requests

4 participants