Skip to content

Commit 79a8fe7

Browse files
committed
docs: Clarify vendored sources as read-only and way to modify
1 parent 3bb0697 commit 79a8fe7

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

src/doc/man/cargo-vendor.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ stdout after `cargo vendor` completes the vendoring process.
2121
You will need to add or redirect it to your Cargo configuration file,
2222
which is usually `.cargo/config.toml` locally for the current package.
2323

24+
By default, Cargo treats vendored crates as read-only as it does crates.io.
25+
To modify a vendored crate the correct way is to use `[patch]` or a `path` dependency,
26+
and Cargo will then correctly handle the crate on incremental rebuilds as it knowns
27+
that it is not a read-only dependency.
28+
2429
## OPTIONS
2530

2631
### Vendor Options

src/doc/man/generated_txt/cargo-vendor.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ DESCRIPTION
1818
need to add or redirect it to your Cargo configuration file, which is
1919
usually .cargo/config.toml locally for the current package.
2020

21+
By default, Cargo treats vendored crates as read-only as it does
22+
crates.io. To modify a vendored crate the correct way is to use [patch]
23+
or a path dependency, and Cargo will then correctly handle the crate on
24+
incremental rebuilds as it knowns that it is not a read-only dependency.
25+
2126
OPTIONS
2227
Vendor Options
2328
-s manifest, --sync manifest

src/doc/src/commands/cargo-vendor.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ stdout after `cargo vendor` completes the vendoring process.
2121
You will need to add or redirect it to your Cargo configuration file,
2222
which is usually `.cargo/config.toml` locally for the current package.
2323

24+
By default, Cargo treats vendored crates as read-only as it does crates.io.
25+
To modify a vendored crate the correct way is to use `[patch]` or a `path` dependency,
26+
and Cargo will then correctly handle the crate on incremental rebuilds as it knowns
27+
that it is not a read-only dependency.
28+
2429
## OPTIONS
2530

2631
### Vendor Options

src/etc/man/cargo-vendor.1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ The configuration necessary to use the vendored sources would be printed to
1818
stdout after \fBcargo vendor\fR completes the vendoring process.
1919
You will need to add or redirect it to your Cargo configuration file,
2020
which is usually \fB\&.cargo/config.toml\fR locally for the current package.
21+
.sp
22+
By default, Cargo treats vendored crates as read\-only as it does crates.io.
23+
To modify a vendored crate the correct way is to use \fB[patch]\fR or a \fBpath\fR dependency,
24+
and Cargo will then correctly handle the crate on incremental rebuilds as it knowns
25+
that it is not a read\-only dependency.
2126
.SH "OPTIONS"
2227
.SS "Vendor Options"
2328
.sp

0 commit comments

Comments
 (0)