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

Support for renamed dependencies

Open Imberflur opened this issue 4 years ago • 2 comments

It seems like dependencies renamed in the Cargo.toml will be ignored in the graph. E.g.

bar = { git = "https://github.com/example/project", package = "foo" }

Imberflur avatar Jul 29 '19 03:07 Imberflur

I've pushed a commit addressing this case. However, a new edge case is possible where two dependencies have the same "package" value but different versions or git repositories. I think I want to integrate with the cargo crate to properly handle all the cases, but that is a bit too much work for me now.

mrcnski avatar Jul 29 '19 12:07 mrcnski

Here is the commit that addressed your case:

https://github.com/m-cat/cargo-deps/commit/6722e2e5713a963c66c4fe33862d760956f7b467

It simply overrides the name of a dependency by the package value, if it is set.

I haven't had time to look into this further -- any help is appreciated.

mrcnski avatar Oct 22 '19 20:10 mrcnski