`.binaryTarget` gives an unhelpful error if a zip file on disk ends in `.artifactbundle`
#10,077 opened on May 19, 2026
Repository metrics
- Stars
- (10,145 stars)
- PR merge metrics
- (Avg merge 9d 4h) (62 merged PRs in 30d)
Description
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 packageetc.
Description
When using a .artifactbundle file on disk, that happens to be a ZIP file, SwiftPM will report an error that the file is not valid and the path provided must end in .artifactbundle, .xcframework, or .zip.
This issue persists going back to the introduction of .artifactbundle static library support on Windows.
Expected behavior
An error informing me why .artifactbundle zip files are not permitted, either with more detail OR for the file to be read correctlly.
Actual behavior
SwiftPM either refuses to read the file or errors out early and informs you it isn't valid based on the file extension, and not on the contents of the file.
Steps to reproduce
- Take any
.artifactbundle.zipfile - Remove the
.zipextension - Reference it in the
Package.swiftfile - Run
swift build - (Optional) Sob uncontrollably because SwiftPM is gaslighting you.
Swift Package Manager version/commit hash
6.3.2
Swift & OS version (output of swift --version ; uname -a)
Swift version 6.3.2 (swift-6.3.2-RELEASE) Target: x86_64-unknown-windows-msvc Build config: +assertions