Skip to content

Commit a2badc1

Browse files
committed
Auto merge of #9674 - iankronquist:patch-1, r=alexcrichton
Document cargo limitation w/ workspaces & configs This behavior is described in this bug: #2930 I think we should document limitations of the tool which exist at present if they do not bind our hands in the future. If this bug is fixed, this note should be removed.
2 parents 680eadc + d054652 commit a2badc1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/doc/src/reference/config.md

+8
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ together. Numbers, strings, and booleans will use the value in the deeper
3030
config directory taking precedence over ancestor directories, where the
3131
home directory is the lowest priority. Arrays will be joined together.
3232

33+
At present, when being invoked from a workspace, Cargo does not read config
34+
files from crates within the workspace. i.e. if a workspace has two crates in
35+
it, named `/projects/foo/bar/baz/mylib` and `/projects/foo/bar/baz/mybin`, and
36+
there are Cargo configs at `/projects/foo/bar/baz/mylib/.cargo/config.toml`
37+
and `/projects/foo/bar/baz/mybin/.cargo/config.toml`, Cargo does not read
38+
those configuration files if it is invoked from the workspace root
39+
(`/projects/foo/bar/baz/`).
40+
3341
> **Note:** Cargo also reads config files without the `.toml` extension, such as
3442
> `.cargo/config`. Support for the `.toml` extension was added in version 1.39
3543
> and is the preferred form. If both files exist, Cargo will use the file

0 commit comments

Comments
 (0)