-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Cross-compilation: fix bundles not unpacked on installation #6361
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
`swift experimental-destination install` subcommand works with bundle directories, but fails to unpack bundle archives. We should pass an instance of an archiver to the installation function to unpack destination bundle archives if needed. Since `withTemporaryDirectory` is `async`, `SwiftDestinationTool` had to be converted to `AsyncParsableCommand` and also gain `@main` attribute for that to work. Additionally, `@main` attribute requires `-parse-as-library` passed in CMake.
@swift-ci smoke test |
@swift-ci smoke test |
@swift-ci test windows |
@swift-ci smoke test |
@swift-ci smoke test linux |
@swift-ci test windows |
@swift-ci smoke test |
@swift-ci test windows |
@swift-ci smoke test |
This comment was marked as duplicate.
This comment was marked as duplicate.
1 similar comment
@swift-ci test windows |
@@ -12,8 +12,8 @@ | |||
|
|||
import ArgumentParser | |||
|
|||
struct ConfigureDestination: ParsableCommand { | |||
static let configuration = CommandConfiguration( | |||
public struct ConfigureDestination: ParsableCommand { |
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.
curious why these became public?
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.
The reason is that SwiftDestinationTool
referencing this type had to be moved to a different target so that it could gain the @main
attribute.
Interesting - I suspect it might be this PR, but I'm not sure. I'm seeing a new failure around this time:
|
This fixes an issue with the Windows build highlighted in #6361 (comment)
This fixes an issue with the Windows build highlighted in #6361 (comment)
This fixes an issue with the Windows build highlighted in #6361 (comment)
Motivation:
swift experimental-destination install
subcommand works with bundle directories, but fails to unpack bundle archives.rdar://107367895
Modifications:
We should pass an instance of an archiver to the installation function to unpack destination bundle archives if needed. Since
withTemporaryDirectory
isasync
,SwiftDestinationTool
had to be converted toAsyncParsableCommand
and also gain@main
attribute for that to work. Additionally,@main
attribute requires-parse-as-library
passed in CMake.