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 PackageDescription platform constants for the 2023 Apple OS versions #6636

Merged
merged 2 commits into from Jun 6, 2023

Conversation

abertelrud
Copy link
Contributor

@abertelrud abertelrud commented Jun 6, 2023

Add PackageDescription platform constants for the 2023 Apple OS versions.

Motivation

This is an update that happens every year at Apple's annual WWDC conference, where the Apple platforms usually have their versions incremented. This allows packages that specify the latest tools version (in this case 5.9) to declare that they require the latest platform versions, which may be appropriate in some cases. Note that most packages should continue supporting the oldest platform tools version that they can (based on the APIs they use), so that they will be usable to the maximum number of client packages and projects.

Modifications

  • added new platform version number constants for macOS 14, iOS 17, tvOS 17, watchOS 10, macCatalyst 17, and DriverKit 23 (which has its own version number, though it isn't a separate platform)
    • these are available when the package manifest specifies tools version 5.9
  • include a unit test that checks the 5.9 tools version spelling of these new platform versions
  • update a test that checks the 5.9 tools version package manifest generation

Result

Packages that specify tools version 5.9 can use these new platform constants. Older packages can continue to spell these new version numbers using the free-form variant of each platform enum that takes a string.

Remarks

Note that the just-announced visionOS is purposefully excluded from this PR, as it has not yet been released and as no version number has been announced.

rdar://107794704

@abertelrud
Copy link
Contributor Author

@swift-ci please test

@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud abertelrud merged commit 55006dc into apple:main Jun 6, 2023
5 checks passed
@abertelrud abertelrud deleted the eng/anders/apple-platforms-2023 branch June 6, 2023 18:18
abertelrud added a commit to abertelrud/swift-package-manager that referenced this pull request Jun 6, 2023
… versions (apple#6636)

* Add platform constants for each of the Apple platforms, to match those in the WWDC 2023 Xcode beta release.

* Add a package loading unit test for checking the platform versions allowed in tools version 5.9.

rdar://107794704

(cherry picked from commit 55006dc)
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.

None yet

3 participants