diff --git a/src/doc/man/cargo-vendor.md b/src/doc/man/cargo-vendor.md index 169e64db270..5921cf26b69 100644 --- a/src/doc/man/cargo-vendor.md +++ b/src/doc/man/cargo-vendor.md @@ -21,6 +21,12 @@ 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. +Cargo treats vendored sources as read-only as it does to registry and git sources. +If you intend to modify a crate from a remote source, +use `[patch]` or a `path` dependency pointing to a local copy of that crate. +Cargo will then correctly handle the crate on incremental rebuilds, +as it knowns that it is no longer 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 f0314aedbe8..6ad650baa9c 100644 --- a/src/doc/man/generated_txt/cargo-vendor.txt +++ b/src/doc/man/generated_txt/cargo-vendor.txt @@ -18,6 +18,12 @@ DESCRIPTION need to add or redirect it to your Cargo configuration file, which is usually .cargo/config.toml locally for the current package. + Cargo treats vendored sources as read-only as it does to registry and + git sources. If you intend to modify a crate from a remote source, use + [patch] or a path dependency pointing to a local copy of that crate. + Cargo will then correctly handle the crate on incremental rebuilds, as + it knowns that it is no longer 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 5e137bd938a..bcb767c59bb 100644 --- a/src/doc/src/commands/cargo-vendor.md +++ b/src/doc/src/commands/cargo-vendor.md @@ -21,6 +21,12 @@ 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. +Cargo treats vendored sources as read-only as it does to registry and git sources. +If you intend to modify a crate from a remote source, +use `[patch]` or a `path` dependency pointing to a local copy of that crate. +Cargo will then correctly handle the crate on incremental rebuilds, +as it knowns that it is no longer a read-only dependency. + ## OPTIONS ### Vendor Options diff --git a/src/etc/man/cargo-vendor.1 b/src/etc/man/cargo-vendor.1 index 67744532eb5..a12db8cef05 100644 --- a/src/etc/man/cargo-vendor.1 +++ b/src/etc/man/cargo-vendor.1 @@ -18,6 +18,12 @@ 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 +Cargo treats vendored sources as read\-only as it does to registry and git sources. +If you intend to modify a crate from a remote source, +use \fB[patch]\fR or a \fBpath\fR dependency pointing to a local copy of that crate. +Cargo will then correctly handle the crate on incremental rebuilds, +as it knowns that it is no longer a read\-only dependency. .SH "OPTIONS" .SS "Vendor Options" .sp