cargo-outdated icon indicating copy to clipboard operation
cargo-outdated copied to clipboard

dev-dependencies of dependencies specified by path are not found

Open wfraser opened this issue 5 years ago • 2 comments

Example

root/Cargo.toml:

...

[dependencies]
path-dependency = { path = "path-dependency" }

root/path-dependency/Cargo.toml:

...

[dev-dependencies]
env_logger = "*"

Running cargo outdated -v gives:

  Parsing... current workspace
Resolving... current workspace
  Parsing... compat workspace
 Updating... compat workspace
    Updating registry `https://github.com/rust-lang/crates.io-index`
Resolving... compat workspace
  Parsing... latest workspace
error: Direct dependency env_logger not found for package path-dependency

It only seems to do this if the dependency is specified by path; regular crates.io dependencies don't have this problem.

wfraser avatar Jul 12 '18 20:07 wfraser

Possibly the same problem with git patched dependencies via [patch.crates-io].

NickAtAccuPS avatar Oct 25 '18 19:10 NickAtAccuPS

This error only appears when the inner crate is not a workspace member of the outer one, i.e. adding this to root/Cargo.toml:

[workspace]
members = ["path-dependency"]

makes the error go away.

hcpl avatar Nov 12 '18 13:11 hcpl