jdx/mise · error · eyre::Report

[bootstrap].config_roots did not match any config roots

Error message

[bootstrap].config_roots did not match any config roots

What it means

A `[bootstrap]` config declares `config_roots` patterns that scope which project configs the bootstrap layer merges. After expanding those patterns from the declaring config's root, `expand_bootstrap_config_roots` matched no roots at all, so the bootstrap merge aborts instead of silently doing nothing.

Source

Thrown at src/config/mod.rs:1556

        cf.bootstrap_config()
            .and_then(|bootstrap| bootstrap.config_roots.map(|patterns| (path, patterns)))
    }) else {
        return Ok(vec![]);
    };
    if patterns.is_empty() {
        return Ok(vec![]);
    }

    let declaring_root = config
        .config_files
        .get(declaring_config)
        .expect("declaring bootstrap config is loaded")
        .config_root();
    let mut roots = expand_bootstrap_config_roots(&declaring_root, &patterns)?;
    roots.sort();
    roots.dedup();
    if roots.is_empty() {
        bail!("[bootstrap].config_roots did not match any config roots");
    }

    let mut base = config.config_files.clone();
    base.retain(|path, _| {
        is_global_config(path)
            || !path
                .canonicalize()
                .is_ok_and(|path| roots.iter().any(|root| path.starts_with(root)))
    });
    let mut maps = vec![BootstrapConfigMap {
        config_files: base,
        tera_ctx: config.tera_ctx.clone(),
    }];
    let idiomatic_filenames = BTreeMap::new();
    for root in roots {
        let paths = config_paths_in_dir_with_filenames(&root, &DEFAULT_CONFIG_FILENAMES);
        let config_files = load_config_files_from_paths(&paths, &idiomatic_filenames).await?;
        let vars_config = config.with_config_files(config_files.clone());

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. From the directory of the config declaring [bootstrap], verify each pattern: `ls -d <pattern>`
  2. Update the globs to the current layout, using `**` where nesting must be matched
  3. Remove the `[bootstrap]` block if bootstrap merging is no longer intended

Example fix

# before
[bootstrap]
config_roots = ["svc/*"]

# after (match the actual layout)
[bootstrap]
config_roots = ["apps/*", "libs/*"]
Defensive patterns

Strategy: validation

Validate before calling

cd <dir-of-bootstrap-config> && ls -d apps/* libs/* >/dev/null 2>&1 \
  && echo 'bootstrap config_roots match' || echo 'no match — update [bootstrap].config_roots'

Prevention

When it happens

Trigger: A trusted config contains `[bootstrap] config_roots = [...]` whose globs match no directories under the declaring config's root — typo, renamed directories, patterns written against the wrong root, or a worktree missing the expected layout.

Common situations: Bootstrap config written for a repo layout that later changed; patterns copy-pasted from another project; running from a fresh/partial clone where expected subprojects are absent.

Related errors


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/1e61b96ce44f30fe. Report an issue: GitHub.