jdx/mise · error

unresolved dependency

Error message

unresolved dependency: {}

What it means

While walking a formula's dependency closure, mise encountered a dependency name that is absent from the formula map fetched from the Homebrew API. Rather than guessing, it bails with the unresolved formula name. This indicates the dependency graph references a formula that could not be resolved to a tap/canonical key.

Solutions

  1. Run `brew update` / refresh the API metadata and retry, so the formula map is complete
  2. Check `brew info <name>` — if renamed, use the new formula name in your mise config
  3. Ensure all required taps are added (mise tap or brew tap) so cross-tap dependencies resolve
  4. If the formula genuinely exists but mise misses it, file a mise bug with the formula name and tap

Example fix

# before
brew_deps = ["old-name"]
# after (formula renamed)
brew_deps = ["new-name"]
Defensive patterns

Strategy: validation

Validate before calling

brew info <formula-name> >/dev/null 2>&1 && echo ok || echo 'formula unknown'
mise ls-remote brew:<formula-name> | head -1

Try / catch

catch the 'unresolved dependency: X' message; run `brew info X`; if renamed, update mise config to the new name, if cross-tap, add the tap via `mise tap` or brew

Prevention

When it happens

Trigger: `visit` in resolve.rs processes a dep whose name is not present in `ctx.formulae` after canonicalization — e.g. the API snapshot lacks the formula, a tap dependency points to a formula on a tap that was not fetched, or the name was renamed/deleted in homebrew/core.

Common situations: Stale or partial Homebrew API metadata; installing a tap formula whose deps live on another tap that is not tapped; formula renamed upstream (old name kept as an alias, not a real formula); typo in a custom tap formula's depends_on.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


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

Appendix: source

Thrown at src/system/packages/brew/resolve.rs:240

        raw_bases: &'a HashMap<FormulaKey, Option<String>>,
        canonical: &'a HashMap<FormulaKey, FormulaKey>,
        done: &'a mut HashSet<FormulaKey>,
        visiting: &'a mut Vec<FormulaKey>,
        on_request: &'a HashSet<FormulaKey>,
        sorted: &'a mut Vec<ResolvedFormula>,
    }
    fn visit(key: &FormulaKey, ctx: &mut VisitContext<'_>) -> Result<()> {
        if ctx.done.contains(key) {
            return Ok(());
        }
        if ctx.visiting.iter().any(|n| n == key) {
            // dependency cycles exist in homebrew/core (rare, e.g. mutual
            // optional deps); break the cycle rather than erroring
            debug!("dependency cycle involving {}, breaking", key.name);
            return Ok(());
        }
        let Some(formula) = ctx.formulae.get(key) else {
            bail!("unresolved dependency: {}", key.name);
        };
        ctx.visiting.push(key.clone());
        let tag = dep_tag(formula, ctx.host_tag);
        for dep in install_deps(formula, &tag) {
            let dep_key = FormulaKey::new(dep.clone(), key.tap_name.clone(), key.tap_url.clone());
            let dep_key = ctx.canonical.get(&dep_key).cloned().unwrap_or(dep_key);
            visit(&dep_key, ctx)?;
        }
        ctx.visiting.pop();
        ctx.done.insert(key.clone());
        ctx.sorted.push(ResolvedFormula {
            formula: ctx.formulae[key].clone(),
            tap_raw_base: ctx.raw_bases.get(key).cloned().flatten(),
            on_request: ctx.on_request.contains(key),
        });
        Ok(())
    }
    let mut keys: Vec<FormulaKey> = formulae.keys().cloned().collect();

View on GitHub (pinned to 533346cc37)