Skip to content

Commit 14190ed

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

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

src/doc/man/cargo-vendor.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ 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+
Cargo treats vendored sources as read-only as it does to registry and git sources.
25+
If you intend to modify a crate from a remote source,
26+
use `[patch]` or a `path` dependency pointing to a local copy of that crate.
27+
Cargo will then correctly handle the crate on incremental rebuilds,
28+
as it knowns that it is no longer a read-only dependency.
29+
2430
## OPTIONS
2531

2632
### Vendor Options

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ 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+
Cargo treats vendored sources as read-only as it does to registry and
22+
git sources.
23+
If you intend to modify a crate from a remote source, use [patch] or a
24+
path dependency pointing to a local copy of that crate. Cargo will then
25+
correctly handle the crate on incremental rebuilds, as it knowns that it
26+
is no longer a read-only dependency.
27+
2128
OPTIONS
2229
Vendor Options
2330
-s manifest, --sync manifest

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ 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+
Cargo treats vendored sources as read-only as it does to registry and git sources.
25+
If you intend to modify a crate from a remote source,
26+
use `[patch]` or a `path` dependency pointing to a local copy of that crate.
27+
Cargo will then correctly handle the crate on incremental rebuilds,
28+
as it knowns that it is no longer a read-only dependency.
29+
2430
## OPTIONS
2531

2632
### Vendor Options

src/etc/man/cargo-vendor.1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ 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+
Cargo treats vendored sources as read\-only as it does to registry and git sources.
23+
.br
24+
If you intend to modify a crate from a remote source,
25+
use \fB[patch]\fR or a \fBpath\fR dependency pointing to a local copy of that crate.
26+
Cargo will then correctly handle the crate on incremental rebuilds,
27+
as it knowns that it is no longer a read\-only dependency.
2128
.SH "OPTIONS"
2229
.SS "Vendor Options"
2330
.sp

0 commit comments

Comments
 (0)