{"record":{"id":"a39a7d24c0adf001","repo":"jdx/mise","slug":"err-a39a7d","errorCode":null,"errorMessage":"{err}","messagePattern":"\\{err\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task/mod.rs","lineNumber":1622,"sourceCode":"                RunEntry::Script(s) => Some(s.clone()),\n                _ => None,\n            })\n            .collect()\n    }\n\n    pub(crate) fn all_depends(&self, tasks: &BTreeMap<String, Task>) -> Result<Vec<Task>> {\n        let tasks_ref = build_task_ref_map(tasks.iter());\n        let mut visited = HashSet::from([self.name.clone()]);\n        self.all_depends_recursive(&tasks_ref, &mut visited)\n    }\n\n    fn all_depends_recursive(\n        &self,\n        tasks: &BTreeMap<String, &Task>,\n        visited: &mut HashSet<String>,\n    ) -> Result<Vec<Task>> {\n        if let Some(err) = &self.workspace_dependency_error {\n            bail!(\"{err}\");\n        }\n        let mut depends: Vec<Task> = self\n            .depends\n            .iter()\n            .chain(self.depends_post.iter())\n            .filter(|td| !dep_has_usage_ref(td))\n            .map(|td| match_tasks_with_context(tasks, td, Some(self)))\n            .flatten_ok()\n            .filter_ok(|t| t.name != self.name)\n            .collect::<Result<Vec<_>>>()?;\n\n        // Collect transitive dependencies without following the same task twice.\n        // Cycle detection happens after the runtime graph has resolved wait_for,\n        // depends_post direction, usage templates, args, and environment variants.\n        for dep in depends.clone() {\n            if !visited.insert(dep.name.clone()) {\n                continue;\n            }","sourceCodeStart":1604,"sourceCodeEnd":1640,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/task/mod.rs#L1604-L1640","documentation":"Raised while collecting a task's transitive dependencies (Task::all_depends). The task struct carries a stored workspace_dependency_error that was set earlier during workspace dependency resolution — either because the workspace project graph/provider could not be loaded while '^' upstream dependencies were declared, or because '^' was used outside depends. This site re-raises that stored message instead of resolving deps.","triggerScenarios":"A task declares depends = [\"^build\"] and mise previously failed to load the workspace project graph (provider discovery failed, e.g. no recognizable package-manager manifest, or the graph load itself errored via set_workspace_task_dependency_error). Any later call to all_depends — mise run with dependency traversal, mise tasks tree, dependency-ordered listing — hits the stored Option<String> and bails with it.","commonSituations":"Monorepo where the root package.json/cargo.toml/pyproject.toml is missing or malformed so no workspace provider is detected; using '^deps' in a project that is not part of a recognized workspace; mixing '^' into wait_for or depends_post; CI checkout that skips the workspace manifest files.","solutions":["Read the full message: it embeds the original failure (provider discovery or graph load error) — fix that root cause first","Add or repair the workspace manifest the provider needs (valid workspaces field in package.json, [workspace] members in Cargo.toml, etc.) at the repository root","If the project is not in a workspace, drop the '^' prefix and use a plain task name or an explicit '//path:task' dependency","Ensure no '^' entries sit in wait_for or depends_post — the caret syntax is only legal in depends"],"exampleFix":"# mise.toml — before\n[tasks.build]\ndepends = [\"^compile\"]\n# workspace has no package.json / [workspace] manifest -> provider discovery fails\n\n# after (option 1: fix the workspace so '^' resolves)\n# root package.json: { \"workspaces\": [\"apps/*\", \"libs/*\"] }\n\n# after (option 2: depend explicitly)\n[tasks.build]\ndepends = [\"//libs/core:compile\"]","handlingStrategy":"validation","validationCode":"# pre-flight in CI before running mise tasks:\ntest -f package.json || test -f Cargo.toml || echo 'WARN: no workspace manifest; ^deps will fail'\ngrep -n '\"\\^' mise.toml **/mise.toml 2>/dev/null && echo 'check ^deps: workspace graph must load'","typeGuard":null,"tryCatchPattern":"When shelling out to mise: capture stderr, match the 'failed to resolve upstream task dependencies' prefix, and fail the job with the underlying provider error rather than retrying.","preventionTips":["Keep a valid workspace manifest (package.json workspaces / Cargo [workspace]) at the repo root when using '^' deps","Never use '^' outside depends","Run 'mise doctor' after workspace restructuring"],"tags":["mise","tasks","dependencies","workspace","monorepo"],"backgroundTag":"task-dependency-resolution-failed","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}