{"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":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/spm.rs","lineNumber":947,"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":929,"sourceCodeEnd":965,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/spm.rs#L929-L965","documentation":"SwiftPM backend asset selection found more than one *.artifactbundle.zip in a GitHub release and no explicit choice was made. Because mise cannot safely guess which bundle matches the platform, it stops and asks the user to disambiguate via the artifactbundle_asset tool option.","triggerScenarios":"select_artifactbundle_asset filters the release assets with is_artifactbundle_zip, finds 2+ candidates, and bails listing their names.","commonSituations":"A project publishing separate bundles per platform/arch (e.g. one for macOS arm64, one for linux x86_64) without embedding platform-specific variant directories in a single bundle.","solutions":["Set artifactbundle_asset in the tool config to the exact bundle name for your platform","Ask upstream to merge platform variants into a single multi-variant artifact bundle","Pin a different version that ships one unambiguous bundle"],"exampleFix":"// before\n[tools.swiftformat]\nversion = '0.53.0'\n// after\n[tools.swiftformat]\nversion = '0.53.0'\nartifactbundle_asset = 'swiftformat-linux-x86_64.artifactbundle.zip'","handlingStrategy":"validation","validationCode":"// count candidate bundles and pre-choose one\ngh release view <tag> -R <owner>/<repo> --json assets -q '[.assets[].name | select(endswith(\".artifactbundle.zip\"))] | length'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set artifactbundle_asset for releases that publish multiple bundles","Prefer upstream versions with a single multi-variant bundle"],"tags":["swiftpm","ambiguity","artifact-bundle","config"],"backgroundTag":"ambiguous-match","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}