-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[5.9] Fix Swift SDK bundles not working due to quarantine #6427
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Cross-compilation destination" is a very verbose name. "Swift SDK" (note that this is distinct from just plain "SDK" used in other contexts) is a nicer alternative. Not all of the types and functions were renamed yet, especially `Destination`, which has been present in the codebase for long time. Renaming that type will be potentially source-breaking for libSwiftPM clients. This change is focused and updating user-visible strings and renaming types and functions that were only recently added. CLI subcommands were renamed accordingly.
When using `swift experimental-sdk install` subcommand with bundle archives or bundles unpacked from archives downloaded manually in the browser, installed executables are quarantined and trigger an error message when used by `swift build` Steps To Reproduce: 1. Download a destination bundle archive 2. Unpack and install the bundle with `swift experimental-destination install` 3. Confirm that the destination is installed and note its ID with `swift experimental-destination list` 4. Build using the newly installed destination with `swift build --experimental-destination-selector <destination-id>` Actual result: Building with this destination triggers an error: "`swift-driver` cannot be opened because the developer cannot be verified." rdar://107392863
MaxDesiatov
requested review from
abertelrud,
neonichu and
tomerd
as code owners
April 13, 2023 15:38
tomerd
approved these changes
Apr 13, 2023
…into maxd/5.9-fix-quarantine-error
MaxDesiatov
changed the base branch from
maxd/5.9-swift-sdks-renaming
to
release/5.9
April 14, 2023 10:58
# Conflicts: # Sources/Basics/FileSystem/FileSystem+Extensions.swift
# Conflicts: # Sources/PackageModel/SwiftSDKBundle.swift
Converting to a draft as it's blocked by swiftlang/swift-tools-support-core#419 and swiftlang/swift-tools-support-core#412 |
neonichu
approved these changes
May 11, 2023
@swift-ci smoke test |
@swift-ci smoke test |
@swift-ci test windows |
@swift-ci smoke test |
@swift-ci test windows |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-picked from 738f5f3
When using
swift experimental-sdk install
subcommand with bundle archives or bundles unpacked from archives downloaded manually in the browser, installed executables are quarantined and trigger an error message when used byswift build
Steps To Reproduce:
swift experimental-destination install
swift experimental-destination list
swift build --experimental-destination-selector <destination-id>
Actual result:
Building with this destination triggers an error: "
swift-driver
cannot be opened because the developer cannot be verified."rdar://107392863
Modifications:
Running
xattr -r -d -s com.apple.quarantine
on the installed bundle fixes the error. The reason is that bundles downloaded in the browser get a quarantine attribute assigned and unpacking such bundles preserves it.