Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Add -d option for finding duplicates #4

Merged
merged 1 commit into from
May 5, 2016
Merged

Conversation

viraptor
Copy link
Contributor

@viraptor viraptor commented May 3, 2016

Cargo has problems with finding optimal set of packages to download. Sometimes
this will result in multiple versions of the same dependency being applied in
the same project and lead to cryptic errors. (rust-lang/cargo#2064)

-d option will find all packages using the same name. If they exist in more than
one version, they'll be printed out in the "inverted" mode, showing where did
they get imported.

if flag_duplicates {
let dups = find_duplicates(&graph);
if dups.len() == 0 {
println!("No package name is imported more than once");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would lean towards leaving this out personally - things like cargo build produce no output if there's nothing to do.

@sfackler
Copy link
Owner

sfackler commented May 5, 2016

This seems cool! One little comment but lgtm otherwise.

Cargo has problems with finding optimal set of packages to download. Sometimes
this will result in multiple versions of the same dependency being applied in
the same project and lead to cryptic errors.

-d option will find all packages using the same name. If they exist in more than
one version, they'll be printed out in the "inverted" mode, showing where did
they get imported.
@viraptor
Copy link
Contributor Author

viraptor commented May 5, 2016

Fixed now.

@sfackler sfackler merged commit 925d888 into sfackler:master May 5, 2016
@sfackler
Copy link
Owner

sfackler commented May 5, 2016

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants