jdx/mise · error

workspace project depends on unknown project

Error message

workspace project {:?} depends on unknown project {:?}

What it means

During Workspace::validate, every project's dependency id is resolved against the workspace's project map. If a declared dependency does not correspond to any defined workspace project, mise throws this error naming both the depending project and the unknown dependency. This keeps the dependency graph closed over defined projects.

Solutions

  1. Fix or remove the unknown dependency id in the named project's depends list
  2. Add the missing [workspace.project] definition if the dependency should exist
  3. Re-run validation after edits to catch any remaining dangling references

Example fix

# before
[workspace.project.app]
depends = ["utile"]
# after
[workspace.project.app]
depends = ["util"]
Defensive patterns

Strategy: validation

Validate before calling

fn validate_deps(ws: &Workspace) -> Result<(), String> {
    for p in ws.projects() {
        for d in &p.dependencies {
            if ws.get(d).is_none() {
                return Err(format!("{} depends on undefined project {:?}", p.id, d));
            }
        }
    }
    Ok(())
}

Try / catch

if let Err(e) = ws.validate() {
    if e.to_string().contains("depends on unknown project") {
        eprintln!("fix depends lists in workspace config: {e}");
    } else {
        return Err(e);
    }
}

Prevention

When it happens

Trigger: A project's depends (or computed dependencies after depends_add/depends_remove) contains a ProjectId absent from the workspace's project definitions, detected at workspace validation time.

Common situations: Typo in a depends entry; referencing a project from another workspace; deleting a project table without cleaning up its dependents' depends lists.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


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

Appendix: source

Thrown at src/task/workspace.rs:1046

            if !visited.insert(dependency_id.clone()) {
                continue;
            }
            self.collect_matching_dependencies(dependency_id, visited, matches, matching);
            let dependency = self
                .projects
                .get(dependency_id)
                .expect("workspace project graph is validated");
            if matches(dependency) {
                matching.push(dependency);
            }
        }
    }

    fn validate(&self) -> Result<()> {
        for project in self.projects() {
            for dependency in &project.dependencies {
                if self.get(dependency).is_none() {
                    bail!(
                        "workspace project {:?} depends on unknown project {:?}",
                        project.id,
                        dependency
                    );
                }
            }
        }
        if let Some(path) = self.find_cycle() {
            return Err(WorkspaceProjectCycleError { path }.into());
        }
        Ok(())
    }

    fn find_cycle(&self) -> Option<Vec<ProjectId>> {
        let mut visited = BTreeSet::new();
        let mut active = BTreeMap::new();
        let mut path = Vec::new();
        for id in self.projects.keys() {

View on GitHub (pinned to 533346cc37)