jdx/mise · error

bootstrap compose project

Error message

bootstrap compose project '{name}' renew_anonymous_volumes requires state = "running"

What it means

Thrown during TOML validation when `renew_anonymous_volumes` is enabled for a project whose `state` is not "running". The flag maps to `docker compose up --renew-anonymous-volumes`, which only takes effect during startup, so it requires `state = "running"` to be meaningful.

Solutions

  1. Set `state = "running"` if the project should start with renewed anonymous volumes
  2. Remove `renew_anonymous_volumes` if the state is intentionally not "running"

Example fix

# before
[system.compose.myproj]
state = "present"
renew_anonymous_volumes = true
# after
[system.compose.myproj]
state = "running"
renew_anonymous_volumes = true
Defensive patterns

Strategy: validation

Validate before calling

if cfg.renew_anonymous_volumes && cfg.state != "running" {
    return Err("renew_anonymous_volumes requires state = \"running\"");
}

Prevention

When it happens

Trigger: A `[system.compose.<name>]` block with `renew_anonymous_volumes = true` while `state` is "present", "absent", or anything other than "running". Raised from `from_toml_with_origin` at parse time.

Common situations: Copy-pasting an up-time tuning flag into a tear-down config; switching state to "absent" while leaving the renew flag set.

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


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/25a78c8e037f4486. Report an issue: GitHub.

Appendix: source

Thrown at src/system/compose.rs:348

            bail!(
                "bootstrap compose project '{name}' services cannot be combined with state = \"absent\" because compose down removes the entire project"
            );
        }
        if !config.wait && config.wait_timeout.is_some() {
            bail!("bootstrap compose project '{name}' wait_timeout requires wait = true");
        }
        if config.wait_timeout == Some(0) {
            bail!("bootstrap compose project '{name}' wait_timeout must be greater than zero");
        }
        if config.state != ComposeState::Absent
            && (config.down_volumes || config.down_images.is_some())
        {
            bail!(
                "bootstrap compose project '{name}' down_volumes and down_images require state = \"absent\""
            );
        }
        if config.state != ComposeState::Running && config.renew_anonymous_volumes {
            bail!(
                "bootstrap compose project '{name}' renew_anonymous_volumes requires state = \"running\""
            );
        }
        let explicit_dependencies = config
            .depends_on
            .iter()
            .map(|dependency| parse_dependency(dependency))
            .collect::<Result<Vec<_>>>()?;
        let services = dedupe(config.services);
        let oneshot: IndexSet<String> = dedupe(config.oneshot).into_iter().collect();
        if !services.is_empty() && oneshot.iter().any(|service| !services.contains(service)) {
            bail!(
                "bootstrap compose project '{name}' oneshot services must also appear in services"
            );
        }
        let files = resolve_paths(&config.project_dir, config.files);
        let env_files = resolve_paths(&config.project_dir, config.env_files);
        let path_dependencies = std::iter::once(ResourceId::new(

View on GitHub (pinned to 533346cc37)