Add "--workspace" to update command by chaaz · Pull Request #8725 · ru...
source link: https://github.com/rust-lang/cargo/pull/8725
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
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.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK