Cargo health · Dependencies
Path dependency resolving outside the scanned workspace
rust_doctor::cargo::path_dependency_outside_workspace
Vendor the crate inside the workspace or publish it; a path leaving the workspace only resolves on the author's machine.
- Category
- Dependencies
- Default level
- warn
- Tier
- P1
- Producer
- Cargo health
- Diff scope
- line
Not a defect when
Every build environment provides the target directory on purpose, such as a git submodule or a monorepo directory above the scanned workspace root.
What it reads
Cargo.toml, Cargo.lock and .cargo/config.toml.
Tier
Serious: worth interrupting other work for.
The tier bounds how severe a rule may be; its category bounds the tier.Diff scope
The changed line itself.
What--scope contextual looks at to decide whether a change caused the finding.Change it
Turn it off, or make it blocking, without touching the code it flags:
rust-doctor --rule rust_doctor::cargo::path_dependency_outside_workspace=off .
rust-doctor --rule rust_doctor::cargo::path_dependency_outside_workspace=error .