-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[5.9] Cross-compilation: fix bundles not unpacked on installation #6362
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 test windows |
@@ -17,8 +17,8 @@ import PackageModel | |||
|
|||
import struct TSCBasic.AbsolutePath | |||
|
|||
struct RemoveDestination: DestinationCommand { | |||
static let configuration = CommandConfiguration( | |||
public struct RemoveDestination: DestinationCommand { |
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 need to come 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.
Clarified in the PR to the main
branch, this is due to SwiftDestinationTool
referencing this type moving to a different target, while RemoveDestination
could stay where it were.
`swift experimental-destination` subcommands no longer work and always display help output. This is a regression introduced in #6362 after making `SwiftDestinationTool` conform to `AsyncParsableCommand` instead of `ParsableCommand` but not updating `swift-package-manager` command sources to call `async` overload of `main()` function on `SwiftDestinationTool`. rdar://107618266
`swift experimental-destination` subcommands no longer work and always display help output. This is a regression introduced in #6362 after making `SwiftDestinationTool` conform to `AsyncParsableCommand` instead of `ParsableCommand` but not updating `swift-package-manager` command sources to call `async` overload of `main()` function on `SwiftDestinationTool`. rdar://107618266
`swift experimental-destination` subcommands no longer work and always display help output. This is a regression introduced in #6362 after making `SwiftDestinationTool` conform to `AsyncParsableCommand` instead of `ParsableCommand` but not updating `swift-package-manager` command sources to call `async` overload of `main()` function on `SwiftDestinationTool`. rdar://107618266
`swift experimental-destination` subcommands no longer work and always display help output. This is a regression introduced in #6362 after making `SwiftDestinationTool` conform to `AsyncParsableCommand` instead of `ParsableCommand` but not updating `swift-package-manager` command sources to call `async` overload of `main()` function on `SwiftDestinationTool`. rdar://107618266
`swift experimental-destination` subcommands no longer work and always display help output. This is a regression introduced in #6362 after making `SwiftDestinationTool` conform to `AsyncParsableCommand` instead of `ParsableCommand` but not updating `swift-package-manager` command sources to call `async` overload of `main()` function on `SwiftDestinationTool`. rdar://107618266
`swift experimental-destination` subcommands no longer work and always display help output. This is a regression introduced in #6362 after making `SwiftDestinationTool` conform to `AsyncParsableCommand` instead of `ParsableCommand` but not updating `swift-package-manager` command sources to call `async` overload of `main()` function on `SwiftDestinationTool`. rdar://107618266
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.