jdx/mise · error
conflicting bootstrap compose declarations for
Error message
conflicting bootstrap compose declarations for {name}
first:
{}
second:
{} What it means
mise refuses to build bootstrap compose requests when two config files declare the same compose project name with differing definitions. During prepare_requests_from_config, declarations are collected into a map; if a name collides and the underlying declaration differs from the first one seen, this error is thrown instead of silently picking a winner. Identical duplicates are allowed (they dedupe).
Solutions
- Search all config files for duplicate [bootstrap.compose.<name>] sections and remove or rename one
- Make the two declarations byte-identical if duplication is intentional (identical declarations are skipped)
- Use `mise bootstrap plan` to inspect which declarations are being merged
- Consolidate compose project definitions into a single config layer
Example fix
# before (project mise.toml) [bootstrap.compose.db] project_dir = "/srv/app" state = "present" # before (~/.config/mise/config.toml) [bootstrap.compose.db] project_dir = "/srv/other" state = "present" // after: keep only one definition, or make both identical [bootstrap.compose.db] project_dir = "/srv/app" state = "present"
Defensive patterns
Strategy: validation
Validate before calling
// before loading bootstrap config, ensure each compose project name is declared once
def check_no_conflicting_compose_projects(configs: list[dict]) -> None:
seen: dict[str, dict] = {}
for cfg in configs:
for name, decl in cfg.get("bootstrap", {}).get("compose", {}).items():
if name in seen and seen[name] != decl:
raise ValueError(f"conflicting bootstrap compose declarations for {name}")
seen[name] = decl Prevention
- Keep compose project definitions in exactly one config layer
- Run `mise bootstrap plan` in CI to catch conflicts before apply
- Avoid copy-pasting [bootstrap.compose.*] blocks between user and project configs
When it happens
Trigger: Two or more bootstrap config files (via config.bootstrap_config_maps()) define a [bootstrap.compose.<name>] section with the same project name but different project_dir, state, services, profiles, or other fields.
Common situations: A user-level and a project-level config both define the same compose project after copying a snippet; a team config merge introduced a second definition; a refactor renamed a project but left the old entry in another file.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- bootstrap compose project
- bootstrap compose project
- bootstrap compose project names cannot be empty
- a provided source resolves to a path
- additional asset ' ' is not an archive
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/5919f757f38fa26c.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/compose.rs:166
service: String,
state: String,
#[serde(default)]
health: String,
#[serde(default)]
exit_code: i64,
#[serde(skip)]
config_hash: Option<String>,
}
pub(crate) fn prepare_requests_from_config(config: &Config) -> Result<Vec<ComposeRequest>> {
let mut composed: IndexMap<String, (ComposeTomlConfig, ResourceOrigin)> = IndexMap::new();
for config_files in config.bootstrap_config_maps() {
for (name, declaration) in compose_from_config_files(config_files) {
if let Some(existing) = composed.get(&name) {
if existing.0 == declaration.0 {
continue;
}
bail!(
"conflicting bootstrap compose declarations for {name}\n\n first:\n {}\n\n second:\n {}",
existing.1.conflict_description(),
declaration.1.conflict_description(),
);
}
composed.insert(name, declaration);
}
}
composed
.into_iter()
.map(|(name, (config, origin))| {
ComposeRequest::from_toml_with_origin(name, config, Some(origin))
})
.collect()
}
fn compose_from_config_files(
config_files: &ConfigMap,View on GitHub (pinned to 533346cc37)