-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Improve handling of minimum deployment target #2710
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
Conversation
We have a bit of a muddled deployment target situation in 5.2: - anything declared by SwiftPM's own manifest defaulted to macOS 10.10, but the toolchain doesn't actually work on macOS < 10.15 anymore - libPackageDescription was built with minimum deployment target of 10.15, but we were explicitly compiling the manifest for 10.10 minimum - support for running tests on macOS is aligned with Xcode (so 10.15 minimum), but we were not enforcing that This change makes it more consistent for 5.3: - declare a 10.15 minimum in the manifest - build manifests without deployment target, defaulting to the host - always build tests for macOS with a minimum deployment target of 10.15 rdar://problem/62121806
@swift-ci please smoke test |
Is there some way to do this without restricting client packages who want to continue using it conditionally with |
@SDGGiesbrecht you're specifically talking about the change to SwiftPM's package manifest and clients of libSwiftPM, right? |
Yes. It’s just the |
...and only when pulled in as a package dependency. Basing it on an environment variable like |
I think that sounds reasonable to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build manifests without deployment target, defaulting to the host
Also slightly uncomfortable with this, since it could result in subtle behavioral differences between someone running Xcode on the latest macOS versus last year's OS (since they'd be compiling the manifest with different deployment targets).
How about we leave it at a fixed 10.15 for now?
I think we can actually do the same thing you suggested for XCTest and use the deployment target of libPackageDescription. |
Another reason to only specify the deployment target when we're building SwiftPM for deployment in a toolchain. |
Hmm, yeah, that seems like a good idea! |
- Default to 10.10 in the manifest, but override it with 10.15 in the bootstrap script - Use XCTest and PackageDescription binaries as source for deployment target for tests and manifest building respectively
@swift-ci please smoke test |
makes sense, XCTest on CI still has a 10.14 minimum deployment target, the test should be using a dynamic value as well. |
- Improved caching - Check XCTest minimum deployment target for all platforms
@swift-ci please smoke test |
Failure is:
That makes sense. On Linux, we won't get a value from XCTest, so it'll default to 10.10, but there's a higher declared deployment target of 10.12 for the package. The test is incorrectly expecting 10.10 in this scenario. |
@swift-ci please smoke test |
@swift-ci please smoke test |
We have a bit of a muddled deployment target situation in 5.2: - anything declared by SwiftPM's own manifest defaulted to macOS 10.10, but the toolchain doesn't actually work on macOS < 10.15 anymore - libPackageDescription was built with minimum deployment target of 10.15, but we were explicitly compiling the manifest for 10.10 minimum - support for running tests on macOS is aligned with Xcode (so 10.15 minimum), but we were not enforcing that This change makes it more consistent for 5.3: - make the deployment target configurable in the manifest, we'll still default to 10.10 but set it to 10.15 in the bootstrap script, so toolchains will end up with a 10.15 minimum deployment target - build manifests with the same deployment target as `libPackageDescription`, defaulting to 10.15 - always build tests with the minimum deployment target of the corresponding XCTest framework rdar://problem/62121806 (cherry picked from commit cf6f83c)
We have a bit of a muddled deployment target situation in 5.2: - anything declared by SwiftPM's own manifest defaulted to macOS 10.10, but the toolchain doesn't actually work on macOS < 10.15 anymore - libPackageDescription was built with minimum deployment target of 10.15, but we were explicitly compiling the manifest for 10.10 minimum - support for running tests on macOS is aligned with Xcode (so 10.15 minimum), but we were not enforcing that This change makes it more consistent for 5.3: - make the deployment target configurable in the manifest, we'll still default to 10.10 but set it to 10.15 in the bootstrap script, so toolchains will end up with a 10.15 minimum deployment target - build manifests with the same deployment target as `libPackageDescription`, defaulting to 10.15 - always build tests with the minimum deployment target of the corresponding XCTest framework rdar://problem/62121806 (cherry picked from commit cf6f83c)
We have a bit of a muddled deployment target situation in 5.2:
but the toolchain doesn't actually work on macOS < 10.15 anymore
10.15, but we were explicitly compiling the manifest for 10.10 minimum
minimum), but we were not enforcing that
This change makes it more consistent for 5.3:
rdar://problem/62121806