diff --git a/src/doc/man/cargo-vendor.md b/src/doc/man/cargo-vendor.md index 169e64db270b..74d431cb433c 100644 --- a/src/doc/man/cargo-vendor.md +++ b/src/doc/man/cargo-vendor.md @@ -21,6 +21,11 @@ stdout after `cargo vendor` completes the vendoring process. You will need to add or redirect it to your Cargo configuration file, which is usually `.cargo/config.toml` locally for the current package. +By default, Cargo treats vendored crates as read-only as it does crates.io. +To modify a vendored crate the correct way is to use `[patch]` or a `path` dependency, +and Cargo will then correctly handle the crate on incremental rebuilds as it knowns +that it is not a read-only dependency. + ## OPTIONS ### Vendor Options diff --git a/src/doc/man/generated_txt/cargo-vendor.txt b/src/doc/man/generated_txt/cargo-vendor.txt index f0314aedbe82..e2394ab329e3 100644 --- a/src/doc/man/generated_txt/cargo-vendor.txt +++ b/src/doc/man/generated_txt/cargo-vendor.txt @@ -18,6 +18,11 @@ DESCRIPTION need to add or redirect it to your Cargo configuration file, which is usually .cargo/config.toml locally for the current package. + By default, Cargo treats vendored crates as read-only as it does + crates.io. To modify a vendored crate the correct way is to use [patch] + or a path dependency, and Cargo will then correctly handle the crate on + incremental rebuilds as it knowns that it is not a read-only dependency. + OPTIONS Vendor Options -s manifest, --sync manifest diff --git a/src/doc/src/commands/cargo-vendor.md b/src/doc/src/commands/cargo-vendor.md index 5e137bd938a8..3183578e387f 100644 --- a/src/doc/src/commands/cargo-vendor.md +++ b/src/doc/src/commands/cargo-vendor.md @@ -21,6 +21,11 @@ stdout after `cargo vendor` completes the vendoring process. You will need to add or redirect it to your Cargo configuration file, which is usually `.cargo/config.toml` locally for the current package. +By default, Cargo treats vendored crates as read-only as it does crates.io. +To modify a vendored crate the correct way is to use `[patch]` or a `path` dependency, +and Cargo will then correctly handle the crate on incremental rebuilds as it knowns +that it is not a read-only dependency. + ## OPTIONS ### Vendor Options diff --git a/src/etc/man/cargo-vendor.1 b/src/etc/man/cargo-vendor.1 index 67744532eb53..ed31a42f7c59 100644 --- a/src/etc/man/cargo-vendor.1 +++ b/src/etc/man/cargo-vendor.1 @@ -18,6 +18,11 @@ The configuration necessary to use the vendored sources would be printed to stdout after \fBcargo vendor\fR completes the vendoring process. You will need to add or redirect it to your Cargo configuration file, which is usually \fB\&.cargo/config.toml\fR locally for the current package. +.sp +By default, Cargo treats vendored crates as read\-only as it does crates.io. +To modify a vendored crate the correct way is to use \fB[patch]\fR or a \fBpath\fR dependency, +and Cargo will then correctly handle the crate on incremental rebuilds as it knowns +that it is not a read\-only dependency. .SH "OPTIONS" .SS "Vendor Options" .sp