jdx/mise · error
bootstrap compose project names cannot be empty
Error message
bootstrap compose project names cannot be empty
What it means
`ComposeRequest::from_toml` builds each project from its `[bootstrap.compose.<name>]` table key; the key doubles as the project identifier, so an empty string is rejected immediately. TOML bare keys cannot be empty, so this only happens with an explicitly quoted empty key or programmatic construction.
Source
Thrown at src/system/compose.rs:272
if !dry_run {
return action;
}
dry_run_actions
.get(&request.name)
.copied()
.filter(|action| {
matches!(
action,
ResourceAction::Create | ResourceAction::Update | ResourceAction::Remove
)
})
.unwrap_or(action)
}
impl ComposeRequest {
fn from_toml(name: String, config: ComposeTomlConfig) -> Result<Self> {
if name.is_empty() {
bail!("bootstrap compose project names cannot be empty");
}
if !config.project_dir.is_absolute() {
bail!(
"bootstrap compose project '{name}' project_dir must be absolute: {}",
config.project_dir.display()
);
}
validate_project_name(config.project_name.as_deref())?;
validate_values("profile", &config.profiles)?;
validate_values("service", &config.services)?;
validate_values("oneshot service", &config.oneshot)?;
validate_command("command", &config.command)?;
validate_command("engine_command", &config.engine_command)?;
if config.state == ComposeState::Absent && !config.services.is_empty() {
bail!(
"bootstrap compose project '{name}' services cannot be combined with state = \"absent\" because compose down removes the entire project"
);
}View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Give the project a real name: `[bootstrap.compose.web]`.
- If the name comes from a template variable, ensure it is non-empty before rendering (or skip the table entirely when unset).
- Re-run `mise bootstrap compose plan` to confirm the config parses.
Example fix
# before [bootstrap.compose.""] project_dir = "/srv/web" # after [bootstrap.compose.web] project_dir = "/srv/web"
Defensive patterns
Strategy: validation
Validate before calling
// before building requests from templated config, assert non-empty table keys assert!(!name.is_empty(), "bootstrap compose project name must be non-empty");
Prevention
- When templating mise.toml, skip the whole compose table if the project-name variable is empty.
- Prefer bare TOML keys ([bootstrap.compose.web]) so an empty name cannot even be written.
When it happens
Trigger: A config contains `[bootstrap.compose.""]` (quoted empty table key), or tooling/templates generate a compose table with an unset project-name variable that interpolates to an empty string.
Common situations: Templated mise.toml (`[bootstrap.compose."{{ env.WEB_PROJECT }}"]`) where the variable is empty on some hosts; hand-editing that accidentally produced an empty quoted key.
Understand the failure class
Background: Config validation failed: what "invalid value for {key}" and settings-rejection errors mean across 19 open-source libraries — this error's family across 19 libraries.
Related errors
- bootstrap compose project '{name}' wait_timeout requires wai
- bootstrap compose project '{name}' wait_timeout must be grea
- bootstrap compose project '{name}' oneshot services must als
- bootstrap compose project '{name}' project_dir must be absol
- bootstrap compose project '{name}' services cannot be combin
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/4ef0d1771990cd08.
Report an issue: GitHub.