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

allow installation of multiple packages in one line #2585

Closed
kindlychung opened this issue Apr 16, 2016 · 4 comments · Fixed by #4216
Closed

allow installation of multiple packages in one line #2585

kindlychung opened this issue Apr 16, 2016 · 4 comments · Fixed by #4216

Comments

@kindlychung
Copy link

Currently cargo install racer rustfmt would produce an error.

@alexcrichton
Copy link
Member

Sounds fine to me! We can't easily parallelize the compilation just yet, but sequencing should be easy enough.

pwoolcoc pushed a commit to pwoolcoc/cargo that referenced this issue May 26, 2016
@cyplo
Copy link

cyplo commented Jul 9, 2016

Hi ! Currently cargo install racer and cargo install rustfmt take a lot of time. It seems that most of the dependencies are duplicated, i.e. racer and rustfmt use same crates in the same versions and would benefit from shared compilation cache. Is that part of the envisioned solution here ?

@alexcrichton
Copy link
Member

@cyplo I'd be ok if it weren't part of the first solution, but I think as a long term goal that's definitely something to strive for!

@durka
Copy link
Contributor

durka commented Jun 23, 2017

Seems like two PRs #2601 #3075 have stalled out trying to implement this. I'm going to try to pick it up, wish me luck!

bors added a commit that referenced this issue Jul 28, 2017
cargo install multiple crates

rust-lang/rustup#986 for `cargo install`

Revives #2601 @pwoolcoc, replaces #3075 @esclear, closes #2585 @kindlychung @cyplo

Avoids the sticking point of the previous two PRs (multiple registry updates) by threading through a first-run boolean flag to decide whether `select_pkg` needs to call `source.update()`.

There is still the issue that flags such as `--git` and `--vers` are "global" to the multiple packages you may be installing. The workaround is just to run `cargo install` separately. In the future we could add syntax like `cargo install foo=1.0 bar=2.5 quux=git://github.com/durka/quux#dev-branch` or something.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants