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

Replace platforms from Package manifest with availability guards #331

Merged
merged 3 commits into from
Mar 4, 2025

Conversation

gjcairo
Copy link
Contributor

@gjcairo gjcairo commented Feb 28, 2025

Minimum deployment versions in package manifests can be problematic for libraries, because changing them or adding them to an existing package that doesn't already use them forces SemVer breaking majors.

Furthermore, depending on a new library that specifies minimum deployment targets would force the adopting library to also have to add these platforms to its manifest (which would in turn force a major).

This PR removes the platforms stanza from the package manifest and replaces them with availability guards.
This will allow more packages to use swift-crypto, without forcing them to mint new majors to support the appropriate platforms.

@gjcairo gjcairo added the 🔨 semver/patch No public API change. label Feb 28, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

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

Let's undo the change in crypto-shasum and instead have that done manually. The tool has gone a little haywire there.

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

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

Nice one, thanks @gjcairo!

@Lukasa Lukasa merged commit f4c4efd into apple:main Mar 4, 2025
30 of 32 checks passed
@gjcairo gjcairo deleted the availability branch March 4, 2025 22:37
Lukasa pushed a commit to apple/swift-certificates that referenced this pull request Mar 10, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Minimum deployment versions in package manifests can be problematic for
libraries, because changing them or adding them to an existing package
that doesn't already use them forces SemVer breaking majors.

Furthermore, depending on a new library that specifies minimum
deployment targets would force the adopting library to also have to add
these platforms to its manifest (which would in turn force a major).

This PR removes the platforms stanza from the package manifest and
replaces it with availability guards where necessary.
`swift-certificates` needed the platforms stanza because `swift-crypto`
forced it onto its adopters. After
apple/swift-crypto#331, this isn't needed
anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants