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

Add visionOS as a platform alongside iOS, tvOS, watchOS, and the others #6662

Merged

Conversation

abertelrud
Copy link
Contributor

@abertelrud abertelrud commented Jun 21, 2023

Add new enum constants for visionOS in all the places where it is appropriate.

This includes the platforms parameter in the manifest, whose purpose is to list the minimum deployment targets that a package requires. Since there is initially only visionOS 1.0, and because absence of a platform in the platforms parameter means that the default version is supported (not that the platform is unsupported), all packages implicitly support visionOS 1.0 whether or not they list it in the platforms parameter. But having the enum constant alongside those for the other Apple platforms makes everything consistent, and will become important for any future versions.

This change also makes the visionOS platform available for use in conditional target dependencies.

Motivation:

Xcode 15 Beta 2, released earlier today, includes support for the new visionOS platform, and this change aligns SwiftPM with that. Note that this does not mean you can develop visionOS apps with SwiftPM CLI — support is at the same level as for iOS, tvOS, etc, which is that the platform can be mentioned in the manifest, and that when using the experimental xcbuild build system, building libraries for visionOS will be supported at the same level as iOS, tvOS, etc provided that a suitable Xcode is installed.

Modifications:

  • add visionOS wherever iOS, tvOS, watchOS, etc are defined
  • add manifest source generation support
  • adjust PackageDescription.docc/Curation/SupportedPlatforms.md (courtesy of @zkiraly)
  • adjust unit tests

rdar://107064954

…the others

Add new enum constants for visionOS in all the places where it is appropriate.

This includes the `platforms` parameter in the manifest, whose purpose is to list the minimum deployment targets that a package requires. Since there is initially only visionOS 1.0, and because absence of a platform in the `platforms` parameter means that the default version is supported (not that the platform is unsupported), all packages implicitly support visionOS 1.0 whether or not they list it in the `platforms` parameter. But having the enum constant alongside those for the other Apple platforms makes everything consistent, and will become important for any future versions.

This change also makes the `visionOS` platform available for use in conditional target dependencies.

rdar://107064954
@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud abertelrud requested a review from zkiraly June 21, 2023 21:04
@abertelrud abertelrud merged commit 809cb15 into swiftlang:main Jun 21, 2023
@abertelrud abertelrud deleted the eng/anders/add-visionos-platform branch June 21, 2023 23:42
abertelrud added a commit to abertelrud/swift-package-manager that referenced this pull request Jun 21, 2023
…the others (swiftlang#6662)

Add new enum constants for visionOS in all the places where it is appropriate.

This includes the `platforms` parameter in the manifest, whose purpose is to list the minimum deployment targets that a package requires. Since there is initially only visionOS 1.0, and because absence of a platform in the `platforms` parameter means that the default version is supported (not that the platform is unsupported), all packages implicitly support visionOS 1.0 whether or not they list it in the `platforms` parameter. But having the enum constant alongside those for the other Apple platforms makes everything consistent, and will become important for any future versions.

This change also makes the `visionOS` platform available for use in conditional target dependencies.

rdar://107064954
(cherry picked from commit 809cb15)
Copy link
Contributor

@zkiraly zkiraly left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants