Hmbown/CodeWhale · error · ValidationError

{dependent} depends on workspace crate {dependency_name} [{k

Error message

{dependent} depends on workspace crate {dependency_name} [{kind}], which is not in the codewhale-* release inventory

What it means

A codewhale-* release crate has a path dependency on another workspace crate whose name is not in the codewhale-* release inventory -- i.e. the dependency is a workspace member not named with the codewhale- prefix, so it can never appear in the publication order. Dev-dependencies are exempt (cargo does not compile them during publish verification, so they may point backwards in the DAG); normal and build dependencies are not. The message names the dependent, the dependency, and the dependency kind.

Source

Thrown at scripts/release/validate-crate-publish-order.py:140

    publish_edges: set[tuple[str, str, str]] = set()
    for dependent in release_names:
        dependencies = workspace_by_name[dependent].get("dependencies", [])
        if not isinstance(dependencies, list):
            raise ValidationError(f"Cargo metadata dependencies for {dependent} must be a list")
        for dependency in dependencies:
            if not isinstance(dependency, dict) or dependency.get("path") is None:
                continue
            dependency_name = dependency.get("name")
            if dependency_name not in workspace_by_name:
                continue
            has_workspace_dependencies[dependent] = True
            kind = dependency.get("kind") or "normal"
            # Cargo does not compile dev-dependencies while verifying a publish.
            # They may legitimately point back across the publication DAG.
            if kind == "dev":
                continue
            if dependency_name not in positions:
                raise ValidationError(
                    f"{dependent} depends on workspace crate {dependency_name} "
                    f"[{kind}], which is not in the codewhale-* release inventory"
                )
            publish_edges.add((dependency_name, dependent, str(kind)))

    violations = sorted(
        (
            dependency,
            dependent,
            kind,
        )
        for dependency, dependent, kind in publish_edges
        if positions[dependency] >= positions[dependent]
    )
    if violations:
        lines = ["crate publication order is not topological:"]
        for dependency, dependent, kind in violations:
            lines.append(

View on GitHub (pinned to 8880682c63)

Solutions

  1. Rename the dependency crate to carry the codewhale- prefix (package.name in its Cargo.toml), update dependents, and add it to scripts/release/crates.sh before its dependents
  2. Alternatively depend on the published crates.io version instead of a path dependency, if the support crate is released separately
  3. If the dependency is genuinely test-only, move it to [dev-dependencies] so it is exempt from the DAG

Example fix

# crates/my-utils/Cargo.toml: before
[package]
name = "my-utils"

# after (then add it to scripts/release/crates.sh)
[package]
name = "codewhale-my-utils"
Defensive patterns

Strategy: validation

Validate before calling

# Before release, scan for non-codewhale path dependencies of release crates:
import json, subprocess

meta = json.loads(subprocess.run(
    ["cargo", "metadata", "--locked", "--format-version", "1", "--no-deps"],
    capture_output=True, text=True, check=True).stdout)
by_name = {p["name"]: p for p in meta["packages"]}
for dependent in (n for n in by_name if n.startswith("codewhale-")):
    for dep in by_name[dependent].get("dependencies", []):
        if dep.get("path") and dep.get("name") in by_name \
                and (dep.get("kind") or "normal") != "dev" \
                and not dep["name"].startswith("codewhale-"):
            raise SystemExit(f"{dependent} path-depends on non-release crate {dep['name']}")

Prevention

When it happens

Trigger: Adding a new internal support crate named without the prefix (e.g. 'my-utils') and path-depending on it from codewhale-tui; renaming an existing codewhale-* crate to drop the prefix while dependents still reference it by path; a build-dependency ('build' kind) on a non-codewhale workspace crate.

Common situations: Introducing helper crates without following the codewhale-* naming convention that the release inventory is built on.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16). Data as JSON: /api/errors/2d71a888e667600c. Report an issue: GitHub.