{"record":{"id":"236ae50a46309543","repo":"jdx/mise","slug":"multiple-swiftpm-artifact-bundles-found-set-a","errorCode":null,"errorMessage":"multiple SwiftPM artifact bundles found: {}. Set artifactbundle_asset to choose one","messagePattern":"multiple SwiftPM artifact bundles found: (.+?)\\. Set artifactbundle_asset to choose one","errorType":"validation","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/backend/spm.rs","lineNumber":942,"sourceCode":"            bail!(\"artifactbundle_asset must end with .artifactbundle.zip, got {name}\");\n        }\n        return assets\n            .into_iter()\n            .find(|a| a.name == name)\n            .map(Some)\n            .ok_or_else(|| {\n                eyre::eyre!(\"artifactbundle_asset not found in release assets: {name}\")\n            });\n    }\n\n    let candidates = assets\n        .into_iter()\n        .filter(|a| is_artifactbundle_zip(&a.name))\n        .collect::<Vec<_>>();\n    match candidates.len() {\n        0 => Ok(None),\n        1 => Ok(candidates.into_iter().next()),\n        _ => bail!(\n            \"multiple SwiftPM artifact bundles found: {}. Set artifactbundle_asset to choose one\",\n            candidates\n                .into_iter()\n                .map(|a| a.name)\n                .collect::<Vec<_>>()\n                .join(\", \")\n        ),\n    }\n}\n\nfn is_artifactbundle_zip(name: &str) -> bool {\n    name.to_lowercase().ends_with(\".artifactbundle.zip\")\n}\n\n#[derive(Debug, Deserialize)]\nstruct SwiftTargetInfo {\n    target: SwiftTarget,\n}","sourceCodeStart":924,"sourceCodeEnd":960,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/backend/spm.rs#L924-L960","documentation":"When no explicit artifactbundle_asset is configured, select_artifactbundle_asset looks for exactly one *.artifactbundle.zip in the release. If multiple match (e.g. macOS and Linux bundles, or x64/arm64 splits), mise cannot choose and asks you to disambiguate.","triggerScenarios":"Installing an spm tool whose release contains two or more .artifactbundle.zip assets without setting artifactbundle_asset.","commonSituations":"Projects that publish per-platform or per-architecture bundles; the auto-selection only works when the release has a single bundle.","solutions":["Set artifactbundle_asset to the exact bundle filename for your platform from the release's assets list","If you want cross-machine configs, use platform-specific config (mise.$OSTYPE.toml / [tools] per-platform sections) to pick the right bundle per host"],"exampleFix":"# before\n[tools.\"spm:foo/bar\"]\nversion = \"2.0.0\"\n\n# after\n[tools.\"spm:foo/bar\"]\nversion = \"2.0.0\"\nartifactbundle_asset = \"Bar-2.0.0-macos.artifactbundle.zip\"","handlingStrategy":"validation","validationCode":"gh release view <tag> --repo owner/repo --json assets -q '[.assets[].name | select(endswith(\"artifactbundle.zip\"))] | length' # >1 means you must set artifactbundle_asset","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Releases with multiple bundles always need an explicit artifactbundle_asset","Use per-platform mise config files to pick the right bundle per OS/arch","Watch for new bundles added mid-version when upgrading"],"tags":["spm","swift","release-assets","github","mise-toml"],"backgroundTag":"ambiguous-release-asset","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}