jdx/mise · error

deps provider ' ' depends on unknown provider

Error message

deps provider '{}' depends on unknown provider '{}'

What it means

DepsOrdering builds a scheduling graph over deps providers. Before constructing the graph it validates that every dependency name in each provider's deps list refers to a provider id that actually exists in the supplied set. If a provider lists a dependency that was never registered, construction fails immediately rather than producing a graph with dangling edges. This is an internal wiring/registration problem, not a runtime task failure.

Solutions

  1. Fix the deps list so it references only registered provider ids — check spelling against the actual provider ids.
  2. Register the missing provider (or re-enable the setting that includes it) before constructing DepsOrdering.
  3. Update dependents when a provider is renamed/removed so no stale dependency names remain.
  4. Add a debug log/dump of the providers list to confirm which id/dep pair triggers the mismatch.

Example fix

// before
providers = [("env", ["toolz"])]  // typo, "toolz" not registered

// after
providers = [("env", ["tools"]), ("tools", [])]
Defensive patterns

Strategy: validation

Validate before calling

# Validate all deps reference registered provider ids before building the graph
ids=$(printf '%s\n' "$@" | cut -d: -f1);  # provider ids
# in code: ensure deps ⊆ ids before DepsOrdering::new
assert deps.iter().all(|d| ids.contains(d)), "unknown provider in deps"

Type guard

fn deps_known(providers: &[(String, Vec<String>)]) -> bool {
    let known: std::collections::HashSet<&str> = providers.iter().map(|(id, _)| id.as_str()).collect();
    providers.iter().all(|(_, deps)| deps.iter().all(|d| known.contains(d.as_str())))
}

Try / catch

match DepsOrdering::new(&providers) {
    Err(e) if e.to_string().contains("unknown provider") => {
        eprintln!("wiring bug: fix the deps list to reference registered providers");
    }
    other => other?,
}

Prevention

When it happens

Trigger: Calling DepsOrdering::new(providers) where for some (id, deps) tuple, deps contains a string not present among the provider ids in the same list — e.g. provider "env" declares deps = ["tools"] but no "tools" provider was passed.

Common situations: A provider was renamed or removed without updating dependents' deps lists; a typo in a deps entry; a provider conditionally registered (e.g. disabled by settings) while another still depends on it.

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/285d8d3f99d8214c. Report an issue: GitHub.

Appendix: source

Thrown at src/deps/deps_ordering.rs:23

/// Manages a dependency graph of deps providers for execution scheduling.
/// Thin wrapper around `DepsGraph<String, String>` with deps-specific
/// validation and error messages.
#[derive(Debug)]
pub(crate) struct DepsOrdering {
    inner: DepsGraph<String, String>,
}

impl DepsOrdering {
    /// Creates a new DepsOrdering from a list of (provider_id, depends) tuples.
    pub(crate) fn new(providers: &[(String, Vec<String>)]) -> Result<Self> {
        // Validate that all deps reference known providers before building the graph
        let known: std::collections::HashSet<&str> =
            providers.iter().map(|(id, _)| id.as_str()).collect();
        for (id, deps) in providers {
            for dep in deps {
                if !known.contains(dep.as_str()) {
                    bail!(
                        "deps provider '{}' depends on unknown provider '{}'",
                        id,
                        dep
                    );
                }
            }
        }

        let nodes: Vec<(String, String)> = providers
            .iter()
            .map(|(id, _)| (id.clone(), id.clone()))
            .collect();

        let edges: Vec<(String, String)> = providers
            .iter()
            .flat_map(|(id, deps)| deps.iter().map(move |dep| (id.clone(), dep.clone())))
            .collect();

View on GitHub (pinned to 533346cc37)