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

cargo install errors if same version already installed #6727

Closed
gnzlbg opened this issue Mar 8, 2019 · 4 comments · Fixed by #7560
Closed

cargo install errors if same version already installed #6727

gnzlbg opened this issue Mar 8, 2019 · 4 comments · Fixed by #7560
Labels

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Mar 8, 2019

Problem

cargo install is not idempotent on nightly (probably has never been)

Steps

cargo install xargo # OK if xargo not installed
cargo install xargo # Errors

errors with:

Updating crates.io index
  Installing xargo v0.3.13
error: binary `xargo` already exists in destination as part of `xargo v0.3.13`

but the version to install is identical with the version currently installed. This should be a warning instead of a hard error.

@gnzlbg gnzlbg added the C-bug Category: bug label Mar 8, 2019
@dwijnand
Copy link
Member

dwijnand commented Mar 8, 2019

Will be fixed if we go ahead with the proposal in #6667.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented May 28, 2019

@dwijnand we didn't go with that, @ehuss is there a plan for solving this ?

For CI systems it is often useful to use the cargo: cache on, e.g., Travis. I want cargo install foo --XYZ to only install foo if it is not already installed, or if there is a newer version, or similar. But if the exact same version is installed, I don't want cargo to just "fail" here.

@ehuss
Copy link
Contributor

ehuss commented May 28, 2019

@gnzlbg This has been implemented on nightly. cargo +nightly install foo -Z install-upgrade. If you can try it out and leave feedback on the tracking issue (#6797), I'd appreciate it.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented May 28, 2019

Nice! Thank you!

@bors bors closed this as completed in fb44150 Nov 21, 2019
LakshyAAAgrawal added a commit to LakshyAAAgrawal/streamblocks-graalvm that referenced this issue May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants