You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo-upgrade 0.8.0
Upgrade dependencies as specified in the local manifest file (i.e. Cargo.toml)
USAGE:
cargo upgrade [OPTIONS] [DEPENDENCY]...
ARGS:
<DEPENDENCY>... Crates to be upgraded
OPTIONS:
--all [deprecated in favor of `--workspace`]
--allow-prerelease Include prerelease versions when fetching from crates.io (e.g. 0.6.0-alpha')
--dry-run Print changes to be made without making them
--exclude <EXCLUDE> Crates to exclude and not upgrade
-h, --help Print help information
--manifest-path <PATH> Path to the manifest to upgrade
--offline Run without accessing the network
-p, --package <PKGID> Package id of the crate to add this dependency to
--skip-compatible Only update a dependency if the new version is semver incompatible
--to-lockfile Upgrade all packages to the version in the lockfile
-V, --version Print version information
--workspace Upgrade all packages in the workspace
-Z <FLAG> Unstable (nightly-only) flags [possible values: preserve-precision]
This command differs from `cargo update`, which updates the dependency versions recorded in the local lock file (Cargo.lock).
If `<dependency>`(s) are provided, only the specified dependencies will be upgraded. The version to upgrade to for each can be specified with e.g.
`[email protected]` or `serde@>=0.9,<2.0`.
Dev, build, and all target dependencies will also be upgraded. Only dependencies from crates.io are supported. Git/path dependencies will be
ignored.
All packages in the workspace will be upgraded if the `--workspace` flag is supplied. The `--workspace` flag may be supplied in the presence of a
virtual manifest.
If the '--to-lockfile' flag is supplied, all dependencies will be upgraded to the currently locked version as recorded in the Cargo.lock file. This
flag requires that the Cargo.lock file is up-to-date. If the lock file is missing, or it needs to be updated, cargo-upgrade will exit with an
error. If the '--to-lockfile' flag is supplied then the network won't be accessed.
Another open question is if we should somehow integrate this into cargo update or if it should remain a distinct command. I was hoping some prior art would help clarify some decisions here but not really.
Activity
epage commentedon Mar 31, 2022
Bugs
cargo-upgrade#751cargo upgrade#444cargo upgrade --manifest-pathonly works with absolute paths #565Requests
cargo upgrade? #513Makefeat(upgrade): Provide table view for upgrades #753cargo outdatedpart of cargo itself rust-lang/cargo#4309cargo update --locked. #265Uncertain
cargo upgradestopped working for good #475epage commentedon Mar 31, 2022
Prior art
poetry add <name>@latestpyproject.tomlpython-poetry/poetry#461cargo updatevscargo upgradego getgo get <dep>@latestepage commentedon Mar 31, 2022
Current design
epage commentedon Mar 31, 2022
--manfest-pathand--packageworking like normal but--excludebeing an opt-out for when noDEPENDENCYis specified and we select all, is odd.epage commentedon Mar 31, 2022
Another open question is if we should somehow integrate this into
cargo updateor if it should remain a distinct command. I was hoping some prior art would help clarify some decisions here but not really.epage commentedon Jul 14, 2022
I split out the main UX question to #737
TCROC commentedon Aug 13, 2023
Any update on this issue @epage ? I would love to see this merged into the
cargo updatecommand. Or at least into the official cargo distribution.epage commentedon Aug 13, 2023
A design for a subset of the functuionality being merged into
cargo updatehas been FCPed: rust-lang/cargo#12425