jdx/mise · error

^task dependencies are supported only in depends

Error message

^task dependencies are supported only in depends

What it means

mise's '^task' syntax means "the same-named task in every upstream workspace project" and is only supported in the depends list. resolve_workspace_task_dependencies rejects the configuration outright if any entry of depends_post or wait_for starts with '^', because post-dependencies and wait-for have no meaningful upstream expansion semantics.

Source

Thrown at src/task/mod.rs:1761

    }

    /// Expands `^task` dependencies to the matching task in every upstream workspace project.
    ///
    /// Each expanded dependency is optional because not every project in the dependency closure
    /// needs to implement the requested task. The workspace graph traversal still continues
    /// through those projects so matching tasks farther upstream are retained.
    pub(crate) fn resolve_workspace_task_dependencies(
        &mut self,
        graph: &workspace::WorkspaceProjectGraph,
        project_ids_by_root: &BTreeMap<PathBuf, BTreeSet<workspace::ProjectId>>,
    ) -> Result<()> {
        if self
            .depends_post
            .iter()
            .chain(&self.wait_for)
            .any(|dep| dep.task.starts_with('^'))
        {
            bail!("^task dependencies are supported only in depends");
        }
        if !self.depends.iter().any(|dep| dep.task.starts_with('^')) {
            return Ok(());
        }

        let mut project_ids = BTreeSet::new();
        let stable_task_names = once(self.name.as_str())
            .chain(self.aliases.iter().map(String::as_str))
            .filter(|name| is_workspace_project_task(name))
            .collect_vec();

        for name in stable_task_names {
            let (project_id, _) = name
                .split_once('#')
                .expect("workspace project task contains #");
            if let Ok(project_id) = project_id.parse::<workspace::ProjectId>()
                && graph.get(&project_id).is_some()
            {

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. Move the '^' entry from depends_post/wait_for into depends
  2. If you only want the local post-step, drop the caret: depends_post = ["publish"]
  3. If you want the upstream task, expand it explicitly: depends = ["//libs/core:publish"]

Example fix

# before
[tasks.release]
depends_post = ["^publish"]
wait_for = ["^lint"]

# after
[tasks.release]
depends = ["^publish"]
wait_for = ["lint"]
Defensive patterns

Strategy: validation

Validate before calling

# fail if '^' appears anywhere but depends
python3 - <<'EOF'
import tomllib, sys
cfg = tomllib.load(open('mise.toml','rb'))
for name, t in cfg.get('tasks', {}).items():
    for field in ('depends_post', 'wait_for'):
        bad = [d for d in t.get(field, []) if str(d).startswith('^')]
        if bad: sys.exit(f"{name}: '^' not allowed in {field}: {bad}")
print('ok')
EOF

Prevention

When it happens

Trigger: Declaring wait_for = ["^lint"] or depends_post = ["^publish"] on any task; the check runs over both lists chained together as soon as workspace task dependency resolution executes (which happens whenever workspace-aware task config is loaded).

Common situations: Copying a depends entry into wait_for expecting the same caret behavior; upgrading mise and consolidating depends into depends_post/wait_for for ordering reasons; authoring a publish flow that wants upstream post-steps.

Related errors


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