]> git.proxmox.com Git - cargo.git/commit
Auto merge of #8725 - chaaz:master, r=ehuss
authorbors <bors@rust-lang.org>
Wed, 2 Dec 2020 01:44:30 +0000 (01:44 +0000)
committerbors <bors@rust-lang.org>
Wed, 2 Dec 2020 01:44:30 +0000 (01:44 +0000)
commit63d0fe43449adcb316d34d98a982b597faca4178
tree7f488e12ab29fed8e8c8646c1abf75b17d4c064a
parentcee17c267f7e45eeecf620c36268aba4be0c9d3a
parent42f34698dcb850c859269f277d8f3903e75cb822
Auto merge of #8725 - chaaz:master, r=ehuss

Add "--workspace" to update command

My `--bin` project has CI which updates the version number in `Cargo.toml`, which it then commits. However, this means that any further cargo command (`build`, `test`, etc) will update the existing `Cargo.lock` file (updating the root version), causing some frustration for users. Furthermore, it breaks the `publish` command, which requires the repo to be current.

I've added a `sync-lockfile` command to simply update the root version in the `Cargo.lock` file to match the `Cargo.toml` in the same way that simple commands like `fetch` do. If no `Cargo.lock` file is present, and new one is generated based on the index.

This is a demo PR for Pre-RFC conversation at https://internals.rust-lang.org/t/pre-rfc-cargo-command-to-just-sync-lockfile/13119, but may become a real PR if it gets approval.
tests/testsuite/update.rs