{"record":{"id":"9572b4ff7222ef8d","repo":"jdx/mise","slug":"conflicting-options-for-key-multiple-requests-s","errorCode":null,"errorMessage":"conflicting options for {key}: multiple requests share the same install destination","messagePattern":"conflicting options for (.+?): multiple requests share the same install destination","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/toolset/tool_deps.rs","lineNumber":27,"sourceCode":"pub(super) type ToolKey = String;\n\n/// Creates a unique key for a ToolRequest\npub(crate) fn tool_key(tr: &ToolRequest) -> ToolKey {\n    format!(\"{}@{}\", tr.ba().short, tr.version())\n}\n\n/// Multiple option variants cannot safely share one install destination.\n/// Reject them before any install job starts instead of letting one variant\n/// silently satisfy (or race with) another.\npub(crate) fn ensure_compatible_install_requests(requests: &[ToolRequest]) -> Result<()> {\n    let mut options_by_destination = std::collections::HashMap::new();\n    for request in requests {\n        let key = tool_key(request);\n        let options = request.options();\n        if let Some(existing) = options_by_destination.get(&key)\n            && existing != &options\n        {\n            bail!(\n                \"conflicting options for {key}: multiple requests share the same install destination\"\n            );\n        }\n        options_by_destination.insert(key, options);\n    }\n    Ok(())\n}\n\n/// Manages a dependency graph of tools for installation scheduling.\n/// Thin wrapper around `DepsGraph<ToolKey, ToolRequest>` with\n/// tool-specific dependency resolution.\n#[derive(Debug)]\npub(super) struct ToolDeps {\n    inner: DepsGraph<ToolKey, ToolRequest>,\n}\n\nimpl ToolDeps {\n    /// Creates a new ToolDeps from a list of tool requests.","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/toolset/tool_deps.rs#L9-L45","documentation":"ensure_compatible_install_requests groups tool install requests by their install destination (tool_key). If two requests target the same destination but carry different ToolVersionOptions, the outcome of the shared install would be ambiguous, so mise bails with this conflict message.","triggerScenarios":"install_runtimes/install_missing_runtimes/Toolset::new/install_all_versions_with_progress are given two requests for tools resolving to the same install key with differing options — e.g. the same tool+version requested with different settings (flags, env, or install options) from different config files.","commonSituations":"A global and a project mise.toml both specify the same tool but with different options (e.g. different python settings or npm flags); env-scoped configs overriding the same tool version with incompatible options; tasks requesting the same tool with different options.","solutions":["Unify the options for the duplicated tool entry across all config files that declare it","Remove the redundant duplicate entry so only one request per destination exists","Use different versions so the requests map to distinct destinations if you truly need both option sets","Check `mise config ls` and each config's [tools] section to locate the conflicting declarations"],"exampleFix":"// before: global config\ntools = { python = { version = '3.12', venv = '.venv' } }\n// project config\npython = { version = '3.12' }\n// after: make options identical or drop the duplicate\npython = { version = '3.12', venv = '.venv' }","handlingStrategy":"validation","validationCode":"// detect duplicate tool entries with differing options across configs\nconst byKey = {}; for (const r of requests) { const k = toolKey(r); if (byKey[k] && JSON.stringify(byKey[k].options) !== JSON.stringify(r.options())) throw new Error('conflict: '+k); byKey[k]=r; }","typeGuard":null,"tryCatchPattern":"try { installTools(requests) } catch (e) { if (String(e).includes('conflicting options')) { showConfigSources(e); } else { throw e; } }","preventionTips":["Keep tool options identical wherever the same tool+version is declared","Deduplicate tool entries across global/local config files","Use env-scoped configs deliberately and consistently","Run `mise config ls` to audit which files declare each tool"],"tags":["config","conflict","toolset"],"backgroundTag":"conflicting-config-options","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"}