{"record":{"id":"3870c45469d7e2fd","repo":"jdx/mise","slug":"the-packslip-lists-a-and-b-for-this-host-and-m","errorCode":null,"errorMessage":"the packslip lists {a} and {b} for this host and mise will not guess between them{hint}","messagePattern":"the packslip lists (.+?) and (.+?) for this host and mise will not guess between them(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/packslip.rs","lineNumber":337,"sourceCode":"    host: &HostPlatform,\n    variant: Option<&str>,\n) -> Result<&'a Artifact> {\n    let strict = host.as_host();\n    let variants = artifacts\n        .iter()\n        .filter_map(|a| a.variant.as_deref())\n        .unique()\n        .join(\", \");\n    let hint = match variant {\n        Some(v) => format!(\" with variant {v:?}\"),\n        None if !variants.is_empty() => {\n            format!(\"; set `variant` to one of {variants} if one of those is meant for you\")\n        }\n        None => String::new(),\n    };\n    match packslip::select_artifact(artifacts, &strict, variant, &FORMAT_PREFERENCE) {\n        Ok(artifact) => return Ok(artifact),\n        Err(Selection::Ambiguous(a, b)) => bail!(\n            \"the packslip lists {a} and {b} for this host and mise will not guess between them{hint}\"\n        ),\n        Err(Selection::NoMatch) => {}\n    }\n    if host.libc.as_deref() == Some(\"gnu\") {\n        let musl = Host {\n            libc: Some(\"musl\"),\n            ..strict\n        };\n        match packslip::select_artifact(artifacts, &musl, variant, &FORMAT_PREFERENCE) {\n            Ok(artifact) => {\n                debug!(\n                    \"no gnu build fits this host; taking the musl build {}, which is static\",\n                    artifact.name\n                );\n                return Ok(artifact);\n            }\n            Err(Selection::Ambiguous(a, b)) => bail!(","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/backend/packslip.rs#L319-L355","documentation":"A packslip manifest lists two artifacts that both match the host, and mise deliberately refuses to pick one. `select_artifact` returns `Selection::Ambiguous(a, b)` for the strict host match and the code bails with both names plus a hint listing the `variant` option values that would disambiguate.","triggerScenarios":"Installing a packslip tool whose release manifest contains two artifacts equal-preference for the host (e.g. two libc or arch variants) without a `variant` tool option set.","commonSituations":"Projects shipping both gnu and musl (or generic and tuned) builds for the same triple; manifests updated upstream to add a new variant; users on hosts where prior versions had one artifact and now have two.","solutions":["Set the `variant` tool option to one of the artifact names listed in the hint.","Check the release manifest and pick the artifact matching your libc (gnu vs musl).","Report the ambiguous manifest to the upstream project if both entries are duplicates."],"exampleFix":"// before\n[tools]\n\"packslip:github.com/owner/tool\" = \"2.1\"\n// after\n[tools]\n\"packslip:github.com/owner/tool\" = { version = \"2.1\", variant = \"gnu\" }","handlingStrategy":"validation","validationCode":"// before install, inspect the manifest for host-matching artifacts\n// and count candidates; if >1, require a variant option\nif (matchingArtifacts.length > 1 && !toolOpts.variant)\n  throw new Error(`set variant to one of: ${matchingArtifacts.map(a => a.name).join(\", \")}`);","typeGuard":null,"tryCatchPattern":"match result {\n  Err(e) if e.to_string().contains(\"mise will not guess between them\") => {\n    let names = extract_two_artifact_names(&e.to_string());\n    bail!(\"set `variant` to one of {:?}\", names);\n  }\n  other => other?,\n}","preventionTips":["Always set `variant` for packslip tools that ship multiple libc/arch builds.","Read the release manifest when adding a new packslip tool.","Pin an exact version to avoid surprise manifest changes upstream."],"tags":["packslip","artifact-selection","ambiguity"],"backgroundTag":"invalid-argument-value","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}