{"record":{"id":"5919f757f38fa26c","repo":"jdx/mise","slug":"conflicting-bootstrap-compose-declarations-for-na","errorCode":null,"errorMessage":"conflicting bootstrap compose declarations for {name}\n\n  first:\n    {}\n\n  second:\n    {}","messagePattern":"conflicting bootstrap compose declarations for (.+?)\n\n  first:\n    (.+?)\n\n  second:\n    (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/compose.rs","lineNumber":166,"sourceCode":"    service: String,\n    state: String,\n    #[serde(default)]\n    health: String,\n    #[serde(default)]\n    exit_code: i64,\n    #[serde(skip)]\n    config_hash: Option<String>,\n}\n\npub(crate) fn prepare_requests_from_config(config: &Config) -> Result<Vec<ComposeRequest>> {\n    let mut composed: IndexMap<String, (ComposeTomlConfig, ResourceOrigin)> = IndexMap::new();\n    for config_files in config.bootstrap_config_maps() {\n        for (name, declaration) in compose_from_config_files(config_files) {\n            if let Some(existing) = composed.get(&name) {\n                if existing.0 == declaration.0 {\n                    continue;\n                }\n                bail!(\n                    \"conflicting bootstrap compose declarations for {name}\\n\\n  first:\\n    {}\\n\\n  second:\\n    {}\",\n                    existing.1.conflict_description(),\n                    declaration.1.conflict_description(),\n                );\n            }\n            composed.insert(name, declaration);\n        }\n    }\n    composed\n        .into_iter()\n        .map(|(name, (config, origin))| {\n            ComposeRequest::from_toml_with_origin(name, config, Some(origin))\n        })\n        .collect()\n}\n\nfn compose_from_config_files(\n    config_files: &ConfigMap,","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/compose.rs#L148-L184","documentation":"Two configuration files declare a bootstrap compose project with the same name but different settings. During request preparation, requests_from_config merges per-file declarations; identical duplicates are fine, but any conflicting field is rejected so mise never guesses which declaration wins.","triggerScenarios":"prepare_requests_from_config finds two configs defining a compose project with the same `name` whose resulting declarations differ (different project_dir, services, state, profiles, etc.).","commonSituations":"A global ~/.config/mise/config.toml and a project mise.toml both declare the same compose project with different settings; a copied config block was edited in one file but not the other.","solutions":["Compare the printed 'first'/'second' conflict descriptions and align the two declarations","Rename one of the compose projects so names no longer collide","Remove the duplicate declaration from one of the config files","Use conditional config inclusion so only one declaration is loaded per environment"],"exampleFix":"# before: global config and project config both declare [bootstrap.compose.app] with different project_dir\n# after: keep a single [bootstrap.compose.app] declaration, or rename the second to [bootstrap.compose.app-dev]","handlingStrategy":"validation","validationCode":"# check for duplicate/conflicting compose project names across loaded configs before applying\nmise bootstrap plan   # surfaces conflicts without changing anything","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"conflicting bootstrap compose declarations\") => eprintln!(\"fix duplicate [bootstrap.compose.*] entries in your mise configs\"),\n    other => other?,\n}","preventionTips":["Run `mise bootstrap plan` after adding compose declarations to a new config file","Keep one canonical location for each compose project declaration","Avoid copy-pasting [bootstrap.compose] blocks across global and project configs"],"tags":["bootstrap","compose","config-conflict"],"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-14T05:17:10.506Z"}