swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.65k stars 1.31k forks source link

[6.0] Implement `--checksum` option on `swift sdk install` #7723

Open MaxDesiatov opened 4 days ago

MaxDesiatov commented 4 days ago

Cherry-pick of https://github.com/swiftlang/swift-package-manager/pull/7722.

Explanation: This option was specified in the corresponding proposal for Swift SDKs:

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) with the Swift SDK bundle archive as an argument.

Scope: the change is isolated to swift sdk install and swift package compute-checksum subcommands. Risk: low due to isolation to only two rarely used subcommands with corresponding automated test cases provided. Testing: updated existing test cases. Issue: rdar://130590711 Reviewer: @bnbarham

MaxDesiatov commented 4 days ago

@swift-ci test