Skip to content

Lower unsupported platform minimum versions #126

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

Merged

Conversation

czechboy0
Copy link
Contributor

Motivation

Reported in #124.

In 0.1.4 (in PR #87), we improved the build time errors emitted when an adopter tries to link the generator binary itself to a product that runs on iOS, tvOS, etc (non-macOS/Linux).

Unfortunately, that broke the ability to build multi-platform packages for iOS and friends, as the minimum platform check would fail (we claim we support iOS "99").

Some build systems and IDEs don't correctly separate platform checks for plugins (which run on the host platform) and the final binary (which runs on the destination platform). We should help report these issues, but at the same time, we should fix this regression in 0.1.4 to work at least as well as 0.1.3 did.

Modifications

Lower the minimum platforms to match the runtime library. This doesn't actually make the generate build correctly on these platforms (as we still have PlatformChecks.swift, which contains a hard, descriptive error when building on iOS and friends), it just allows passing the (incorrect) platform check in some cases.

Result

Fixes #124.

Now, adopters can build on the same platforms they could with 0.1.3, and we still don't build on the unsupported platforms.

Test Plan

Tested by using a local workspace and verified that with this change, a simple package that uses the generator can build for iOS.

@czechboy0 czechboy0 requested a review from simonjbeaumont July 18, 2023 10:33
@czechboy0 czechboy0 merged commit 31bb517 into apple:main Jul 18, 2023
@czechboy0 czechboy0 deleted the hd-lower-unsupported-deployment-targets branch July 18, 2023 10:51
@czechboy0 czechboy0 added the 🔨 semver/patch No public API change. label Jul 18, 2023
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.

Swift Package usage: Unable to build iOS targets
2 participants