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

Is "cargo install-update" still working? #68

Closed
matthiaskrgr opened this issue Mar 19, 2018 · 6 comments
Closed

Is "cargo install-update" still working? #68

matthiaskrgr opened this issue Mar 19, 2018 · 6 comments
Labels

Comments

@matthiaskrgr
Copy link
Contributor

cargo 1.26.0-nightly (d6c3983fe 2018-03-16)
release: 1.26.0
commit-hash: d6c3983fe3bd8fa06b54712e53fb23645598188b
commit-date: 2018-03-16
~/.cargo/bin/cargo-install-update install-update -lag

does work, however

cargo install-update -lag

does not (I'm 99% sure it did before! :/)
I'm not sure what the error is here...

error: The subcommand 'install-update' wasn't recognized
        Did you mean 'install'?
If you believe you received this message in error, try re-running with 'cargo -- install-update'
USAGE:
    cargo [OPTIONS] [SUBCOMMAND]
For more information try --help

Cargo had some changes to its cmdine arg parsing, maybe this broke something here?

It'd kind of weird though, I have my own cargo plugin "cargo-cache" which I can still use via "cargo cache", I don't understand why cargo install update would break but cargo cache would not.

@mati865
Copy link
Contributor

mati865 commented Mar 19, 2018

Cargo was migrated to clap recently: rust-lang/cargo#5152
cargo-outdated and cargo-edit are another victims here.

EDIT: clap issue: clap-rs/clap#1215

@nabijaczleweli nabijaczleweli changed the title is "cargo install-update" still ẁorking? Is "cargo install-update" still working? Mar 19, 2018
@nabijaczleweli
Copy link
Owner

That means that should be resolved when someone decides to update cargo's clap dep (why they can't just specify down to minor as opposed to to patch will forever remain a mystery to me). Will close then.

@kbknapp
Copy link

kbknapp commented Mar 19, 2018

@matklad is aware of this issue, and it's fixed in upstream clap. So I'm assuming this will be fixed in the next nightly version of cargo.

@matklad
Copy link

matklad commented Mar 20, 2018

I think this issue could be closed, because it has nothing to do with cargo-update per se. The PR to rust is waiting for bors.

why they can't just specify down to minor as opposed to to patch will forever remain a mystery to me

So, we specify the requirements for clap version here: https://github.com/rust-lang/cargo/blob/d10ec661b06420654bbc4ed0ccd32295698aa1dc/Cargo.toml#L56. Note that clap = "2.31.2" means the same as clap = "^2.31.2". That is, even if you specify patch version, Cargo would use a later patch, if available. The reason why we specify patch version is because we want to explicitly forbid 2.31.1 just in case.

Note, however, that this is only requirement, the actual version of clap, used by production builds of Cargo is specified in the lockfile in the rust-lang/rust repository: https://github.com/rust-lang/rust/blob/6bfa7d02d6713acd15ead20c199b808e85031f9e/src/Cargo.lock#L187

We need that lockfile, as usual, to make sure that the builds of rustc/cargo/rls and others are reproducible. For example, just updating from clap 2.31.1 to 2.31.2 would have broken a single test in Cargo which, accidentally, relied on the previous wrong behavior.

Hopefully this clarifies situation a bit about version of packages, used in Cargo :)

And sorry once again for this disruption!

@nabijaczleweli
Copy link
Owner

Ah, thanks for clearing up how semvers degenerate into semver reqs!

Closing since relevant external issue just closed.

@nabijaczleweli
Copy link
Owner

Quoth @kbknapp:

This has finally made it into the latest nightly cargo build too - so the fix is rustup update nightly.

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

No branches or pull requests

5 participants