cargo-edit icon indicating copy to clipboard operation
cargo-edit copied to clipboard

Update dependency versions in `Cargo.toml` to that of `Cargo.lock`

Open oli-obk opened this issue 6 years ago • 4 comments

as per https://github.com/rust-lang/compiler-team/pull/89#issuecomment-494693064

what do you think about having https://github.com/rust-lang/rust/issues/57443 in cargo edit. Maybe as cargo edit sync-with-lockfile?

related: https://github.com/killercup/cargo-edit/issues/41

cc @polybuildr

oli-obk avatar May 29 '19 08:05 oli-obk

Sounds like a good idea -- especially for those projects where you don't want to keep running cargo -Z minimal-versions build and change the manifest manually :)

Maybe this can be a special mode in cargo-upgrade?

killercup avatar May 29 '19 08:05 killercup

Without seeing this, I also thought this would be perfect for cargo upgrade.

The --used flag in https://github.com/killercup/cargo-edit/issues/41#issuecomment-149023303 seems relevant, I think, although cargo upgrade --to-lockfile would read a bit more fluently (but it's all a bikeshed).

eddyb avatar Jun 01 '19 22:06 eddyb

Based on the feedback in prep for merging into cargo, we are looking at making cargo upgrade also do a cargo update which will remove some of the need for --to-lockfile.

We'll need to re-evaluate its place within cargo-upgrade and this issue might be re-opened as we might temporarily lose this functionality.

epage avatar Sep 09 '22 01:09 epage

See #786

epage avatar Sep 09 '22 02:09 epage