jdx/mise · error
conflicting bootstrap compose declarations for {name} fir
Error message
conflicting bootstrap compose declarations for {name}
first:
{}
second:
{} What it means
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.
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 afd2eddd3a)
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
Example fix
# before: global config and project config both declare [bootstrap.compose.app] with different project_dir # after: keep a single [bootstrap.compose.app] declaration, or rename the second to [bootstrap.compose.app-dev]
Defensive patterns
Strategy: validation
Validate before calling
# check for duplicate/conflicting compose project names across loaded configs before applying mise bootstrap plan # surfaces conflicts without changing anything
Try / catch
match result {
Err(e) if e.to_string().contains("conflicting bootstrap compose declarations") => eprintln!("fix duplicate [bootstrap.compose.*] entries in your mise configs"),
other => other?,
} Prevention
- 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
When it happens
Trigger: 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.).
Common situations: 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.
Related errors
- refusing unsafe change to bootstrap compose project '{}'; in
- bootstrap compose project names cannot be empty
- bootstrap compose project '{name}' project_dir must be absol
- bootstrap compose project '{name}' services cannot be combin
- bootstrap compose project '{name}' wait_timeout requires wai
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/5919f757f38fa26c.
Report an issue: GitHub.