Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate multiple versions of the same crate within our transitive dependencies #433

Closed
bstrie opened this issue Oct 17, 2019 · 2 comments

Comments

@bstrie
Copy link
Contributor

bstrie commented Oct 17, 2019

Low-priority successor to #387 which should wait for #140 to be addressed first. Currently our full crate graph contains several different copies of the same dependency, due to some of our dependencies requiring incompatible versions. We can see these by running git grep "name =" Cargo.lock | uniq -c | grep -v "1 Cargo.lock" | sort -r, which as of today gives me:

   3 Cargo.lock:name = "rand_core"
   3 Cargo.lock:name = "rand"
   2 Cargo.lock:name = "winapi"
   2 Cargo.lock:name = "url"
   2 Cargo.lock:name = "unicode-xid"
   2 Cargo.lock:name = "unicase"
   2 Cargo.lock:name = "syn"
   2 Cargo.lock:name = "serde_urlencoded"
   2 Cargo.lock:name = "rand_os"
   2 Cargo.lock:name = "rand_hc"
   2 Cargo.lock:name = "rand_chacha"
   2 Cargo.lock:name = "quote"
   2 Cargo.lock:name = "proc-macro2"
   2 Cargo.lock:name = "percent-encoding"
   2 Cargo.lock:name = "mime_guess"
   2 Cargo.lock:name = "mime"
   2 Cargo.lock:name = "log"
   2 Cargo.lock:name = "idna"

This could be partially addressed by pruning unnecessary dependencies from our crate graph (which is why this ought to wait for #140 first), but ultimately this might require manually patching dependencies who are slow to update.

@emschwartz
Copy link
Member

Can this be closed now?

@bstrie
Copy link
Contributor Author

bstrie commented Dec 18, 2019

I believe this predates the great default-features = false refactor; today it looks like this instead:

   3 Cargo.lock:name = "rand_core"
   3 Cargo.lock:name = "rand"
   2 Cargo.lock:name = "winapi"
   2 Cargo.lock:name = "uuid"
   2 Cargo.lock:name = "url"
   2 Cargo.lock:name = "serde_urlencoded"
   2 Cargo.lock:name = "rand_os"
   2 Cargo.lock:name = "rand_hc"
   2 Cargo.lock:name = "rand_chacha"
   2 Cargo.lock:name = "percent-encoding"
   2 Cargo.lock:name = "log"
   2 Cargo.lock:name = "idna"

So we did manage to get rid of 7 duplicated dependencies. I'm not entirely satisfied, but this is such a low priority for now (especially since now we have a good understanding of where in the pipeline our compilation time problems are, and are unrelated to duplicated dependencies) that I don't think it's useful to keep this open as a separate issue from #140 (which I still would like to do one day, after 1.0).

@bstrie bstrie closed this as completed Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants