Skip to content

Feature request: cargo install --upgrade <binary> #3496

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

Closed
colemickens opened this issue Jan 5, 2017 · 4 comments
Closed

Feature request: cargo install --upgrade <binary> #3496

colemickens opened this issue Jan 5, 2017 · 4 comments

Comments

@colemickens
Copy link

When using pip, I can run pip install --upgrade azure-cli to get the latest version of the azure-cli package built and installed (and thus the az binary gets updated if needed as well).

As far as I can tell, there isn't any way to do this with cargo install today.

At best, I can use cargo install --list | grep <Something> but that doesn't tell me if it's up-to-date.

Alternatively, cargo install <something> -f will force re-compile even if the binary is up-to-date and it's unnecessary.

Maybe there could be a cargo install --upgrade <something> functionality?

@alexcrichton
Copy link
Member

I believe this is covered by #2082, but thanks for the report!

@dhardy
Copy link

dhardy commented Mar 3, 2018

Can this be re-opened please? #4981 says it simply uninstalls, then reinstalls.

I have the situation on CI that cargo install --force was used to force update, but is slow, sometimes to the point of timing out the test.

I'll try cargo-update since --reinstall or --force is not a substitute for a real update command.

Note: I want an "install-or-update-as-necessary" command; apparently cargo install-update -i NAME does this.

@sfackler
Copy link
Member

sfackler commented Mar 3, 2018

How would --upgrade solve the problem that compiling cargo-web takes too long? It seems like it would be easier in that case to just pull the prebuilt binary: https://github.com/koute/cargo-web/releases.

@dhardy
Copy link

dhardy commented Mar 4, 2018

It doesn't always take too long. Travis nodes appear to be highly loaded; at least performance is quite variable and normally the build doesn't time out, it's just slow. The current solution using install-update works fine, although installing cargo-update itself is a bit hacky since it's necessary to quench the error on "already installed" (not an error by most standards).

Another reason to have a cargo upgrade option: to allow --all.

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

No branches or pull requests

4 participants