You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement --checksum option on swift sdk install (#7722)
### Motivation:
This option [was specified in the corresponding proposal for Swift
SDKs](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md#swift-sdk-installation-and-configuration):
> For Swift SDKs installed from remote URLs an additional `--checksum`
option is required, through which users of a Swift SDK can specify a
checksum provided by a publisher of the SDK. The latter can produce a
checksum by running `swift package compute-checksum` command (introduced
in
[SE-0272](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0272-swiftpm-binary-dependencies.md))
with the Swift SDK bundle archive as an argument.
### Modifications:
Added `isFileSupported` method on `Archiver` to unify archive extensions
matching logic between `swift package compute-checksum` and `swift sdk
install`.
Refactored checksum computation logic into `static func checksum` on
`Workspace.BinaryArtifactsManager` to also unify it between the two
commands.
Added error and output handling for checksums in `func
SwiftSDKBundleStore.installIfValid`, updated corresponding unit tests.
### Result:
Resolves rdar://130590711
---------
Co-authored-by: Alastair Houghton <[email protected]>
0 commit comments