{"record":{"id":"1528231ed7704870","repo":"jdx/mise","slug":"conflicting-aqua-var-key-use-only-one-spellin","errorCode":null,"errorMessage":"conflicting aqua var `{key}`: use only one spelling","messagePattern":"conflicting aqua var `(.+?)`: use only one spelling","errorType":"validation","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/backend/aqua.rs","lineNumber":130,"sourceCode":"            }\n\n            let key = if let Some(key) = key.strip_prefix(\"vars.\") {\n                key.to_string()\n            } else {\n                key.clone()\n            };\n            Self::insert_var_option(&mut vars, key, value)?;\n        }\n        Ok(vars)\n    }\n\n    fn insert_var_option<'b>(\n        result: &mut BTreeMap<String, &'b toml::Value>,\n        key: String,\n        value: &'b toml::Value,\n    ) -> Result<()> {\n        if result.contains_key(&key) {\n            bail!(\"conflicting aqua var `{key}`: use only one spelling\");\n        }\n        result.insert(key, value);\n        Ok(())\n    }\n\n    fn insert_nested_var_options<'b>(\n        result: &mut BTreeMap<String, &'b toml::Value>,\n        table: &'b toml::Table,\n    ) -> Result<()> {\n        for (key, value) in table {\n            Self::insert_var_option(result, key.clone(), value)?;\n        }\n        Ok(())\n    }\n}\n\n#[derive(Debug, Clone, PartialEq, Eq)]\nstruct AquaFileLink {","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/backend/aqua.rs#L112-L148","documentation":"The aqua backend merges three spellings of tool options that set aqua registry vars into one canonical map: a nested `vars = { name = value }` table, dotted `vars.name` keys, and legacy bare top-level keys. If the same var name reaches the merge twice - for example both `vars.foo` and `vars = { foo = ... }` in one tool's options - the configuration is ambiguous and option parsing stops with this error instead of silently picking a winner.","triggerScenarios":"In mise.toml, configuring one tool entry with two spellings of the same var: `[tools] \"aqua:x/y\" = { version = \"1\", vars.os = \"linux\", vars = { os = \"darwin\" } }`, or combining a bare legacy key (`os = ...`) with a `vars` table containing the same name. Any aqua install/version resolution then fails during `canonical_var_options`.","commonSituations":"Copy-pasting config examples that use different spellings into a single tool entry; migrating from dotted keys to the `vars` table and leaving the old key behind.","solutions":["Keep one spelling per var - prefer the documented nested table: `vars = { go_version = \"1.24\" }`.","Remove the duplicated dotted (`vars.go_version`) or bare legacy key from the same tool's options.","Re-run `mise ls` or the failing command after the fix to confirm the TOML parses."],"exampleFix":"# before - two spellings of the same var\n[tools]\n\"aqua:scenarigo/scenarigo\" = { version = \"0.21.0\", vars.go_version = \"1.23\", vars = { go_version = \"1.24\" } }\n\n# after - single spelling\n[tools]\n\"aqua:scenarigo/scenarigo\" = { version = \"0.21.0\", vars = { go_version = \"1.24\" } }","handlingStrategy":"validation","validationCode":"// lint tool options before install: no var may arrive via two spellings\nlet dotted: HashSet<&str> = opts.keys().filter_map(|k| k.strip_prefix(\"vars.\")).collect();\nlet table: HashSet<&str> = opts\n    .get(\"vars\")\n    .and_then(|v| v.as_table())\n    .map(|t| t.keys().map(String::as_str).collect())\n    .unwrap_or_default();\nif !dotted.is_disjoint(&table) {\n    return Err(eyre::eyre!(\"remove the duplicate vars spelling in mise.toml\"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Standardize on the documented `vars = { ... }` table in mise.toml for aqua tool options.","When migrating spellings, delete the old key in the same commit.","Run `mise ls <tool>` after editing tool options to catch parse errors early."],"tags":["aqua","toml","configuration","duplicate-keys","tool-options"],"backgroundTag":"duplicate-config-key","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}