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

[SR-11635] Bad/Missing documentation for targetEnvironment() #54046

Closed
thomasvl opened this issue Oct 18, 2019 · 4 comments
Closed

[SR-11635] Bad/Missing documentation for targetEnvironment() #54046

thomasvl opened this issue Oct 18, 2019 · 4 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. documentation

Comments

@thomasvl
Copy link

Previous ID SR-11635
Radar None
Original Reporter @thomasvl
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug, Documentation
Assignee amartini (JIRA)
Priority Medium

md5: 44ac0a84a976a3d8367004f655959b90

Issue Description:

https://docs.swift.org/swift-book/ReferenceManual/Statements.html

Under Compiler Control Statements the table shows:

targetEnvironment() takes simulator, macCatalyst

But in the GRAMMAR OF A CONDITIONAL COMPILATION BLOCK block it only says:

"environment → simulator"

So the macCatalyst value isn't documented. Is it valid for targetEnvironment()? Should Catalyst be supported in some way on operating-system for os()?

@belkadan
Copy link
Contributor

Mac Catalyst isn't supported with open-source Swift 5.1 in general, only the Swift that ships with Xcode. If/when Mac Catalyst support is made open-source, the docs should indeed be updated.

cc amartini (JIRA User), @devincoughlin

@thomasvl
Copy link
Author

Shouldn't they atleast not have the current mixed info then?

And where would the Xcode version for this sorta support be documented if not in the Swift book?

@swift-ci
Copy link
Collaborator

Comment by Alex Martini (JIRA)

Thanks for pointing this out! This was just an oversight — the commit to the book's source (8197a730) that added macCatalyst to the table didn't modify the grammar. I've committed a fix (fd70f090) that will go out with the next update of the book.

@swift-ci
Copy link
Collaborator

Comment by Alex Martini (JIRA)

The current version of TSPL includes this correction.

https://docs.swift.org/swift-book/ReferenceManual/Statements.html#grammar_conditional-compilation-block

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. documentation
Projects
None yet
Development

No branches or pull requests

3 participants