Skip to content

swift package compute-checksum doesn't support artifactbundleindex #9219

@laosb

Description

@laosb

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

In SE-305, for artifactbundleindex binary targets, the checksum in binaryTarget enum is defined to be the checksum of the index file itself:

The checksum for each .zip file in the index is computed in the same manner as for other binary .zip files, i.e. using swift package compute-checksum. The checksum in the binary target that references the .artifactbundleindex is the checksum of the .artifactbundleindex file itself. In this way, SwiftPM can validate the integrity of any of the .zip archives referenced by the index file.

However, swift package compute-checksum does not accept artifactbundleindex file at all.

Expected behavior

swift package compute-checksum some.artifactbundleindex gives a valid checksum for use.

Actual behavior

% swift package compute-checksum test.artifactbundleindex
error: unexpected file type; supported extensions are: zip, tar.gz, tar

Steps to reproduce

  1. Create a valid .artifactbundleindex file according to https://github.com/swiftlang/swift-evolution/blob/main/proposals/0305-swiftpm-binary-target-improvements.md
  2. swift package compute-checksum test.artifactbundleindex

Swift Package Manager version/commit hash

Swift Package Manager - Swift 6.2.0-dev

Swift & OS version (output of swift --version ; uname -a)

Apple Swift version 6.2 (swift-6.2-RELEASE)
Target: arm64-apple-macosx26.0
Build config: +assertions
Darwin <REDACTED> 25.0.0 Darwin Kernel Version 25.0.0: Mon Aug 25 21:12:01 PDT 2025; root:xnu-12377.1.9~3/RELEASE_ARM64_T8132 arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions