-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
C-tracking-issueCategory: A tracking issue for something unstable.Category: A tracking issue for something unstable.Command-install
Description
Original issue: #6667
Implementation PR: #6798
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#install-upgrade
Summary
Instead of failing when cargo install detects a package is already installed, it will upgrade if the versions don't match, or do nothing (exit 0) if it is considered "up-to-date".
cargo +nightly install foo -Z install-upgrade
Unresolved questions
- Is it tracking the correct information? There are many other settings that could be tracked (rustc, env variables, changes in dependencies in
Cargo.lock, mtime for path sources, etc). The current set was chosen to be practical and simple and should cover most use cases. Otherwise--forceis intended as a workaround for more advanced requirements. - Should there be a way to upgrade all outdated packages? (See Proposal:
cargo installwith upgrades #6667 for more about this.) - Should
--no-trackbe kept, or is there a better approach for packaging? Does it have the right behavior? See also Please provide a cargo install option to not write .crates.toml #3316. - Should this be the new default? Should there be an option to disable upgrades and revert to the old behavior?
If a new version of a package drops a binary, should those dropped binaries be uninstalled when the new package is installed? Currently it only replaces binaries.Fixed incargo install: Remove orphaned executables. #7246
alexlapa, tarcieri, mark-i-m, alex, jonasbb and 1 moremark-i-mtarcieri
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: A tracking issue for something unstable.Category: A tracking issue for something unstable.Command-install