Skip to content

add more details about cargo fetch and when it will regen cargo.lock #15483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/doc/src/commands/cargo-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ fetch` unless the lock file changes.
If the lock file is not available, then this command will generate the lock
file before fetching the dependencies.

If the lock file is not compatible with the current `Cargo.toml`, then this
command will initiate dependency resolution from the current `Cargo.toml` file,
and update the lock file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://doc.rust-lang.org/nightly/cargo/commands/cargo-fetch.html#option-cargo-fetch---locked

This is mentioned in --locked flag. Unsure if we need to emphasize it here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, if we change something, we should probably think holistically. This isn't the only command like this.

If `--target` is not specified, then all target dependencies are fetched.

See also the [cargo-prefetch](https://crates.io/crates/cargo-prefetch)
Expand Down
Loading