It'd be nice if there were a cargo install --upgrade or similar flag that would cargo install --force a crate if its version has been bumped. This could be configured to only allow major, minor, or bugfix releases.
I just had to deal with this again yesterday...
It would also be kind of nice to have cargo update similar to rustup update
FWIW, there's a (non official) Cargo [subcommand] that does this.
@japaric that's nice (it doesn't always compile tho...), but this should really be part of cargo proper and not relegated to a subcommand.
Some related things I'd like from cargo:
I try to move toward repository versions of things once they land (e.g. ripgrep), but sometimes that's just not going to happen (e.g. cargo subcommands). I like to stay up-to-date (mostly for latest bugfixes), and it would be nice if there was a simple command I could run to update everything, or at least give me a list of stuff to update.
This probably belongs in a separate RFC, but I feel it's relevant to the discussion here and I'd like to see resolution on this before submitting a separate RFC.
@beatgammit https://crates.io/crates/cargo-update has all of that.
Sweet, thanks! In that case, I'm on board with not doing this in cargo to highlight that it's not meant for managing packages.
Honestly, cargo install --list already solves my first bullet point and half of the second, and I can always do cargo search to manually check for versions of things. The only think I may add is having cargo install --list check the registry cache for updated versions, but that's really it. However, I don't think it's really necessary for cargo to do this.
to highlight that it's not meant for managing packages
Is this still true? cargo is used by a number of programs as an installation tool. Why should it not be in the business of package management?
Most helpful comment
Is this still true?
cargois used by a number of programs as an installation tool. Why should it not be in the business of package management?