Skip to content

Commit d85b020

Browse files
committed
Auto merge of #4823 - johnthagen:patch-1, r=alexcrichton
Add note about running clean before using -vv for build script development This solves an issue that came up in the beginners chat that took about fifteen minutes to finally understand what was going on. This should help users who are actively developing `build.rs` consistently get debugging information printed to the terminal.
2 parents eeb724d + 72c9242 commit d85b020

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/doc/build-script.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,13 @@ the source directory of the build script’s package.
4747
All the lines printed to stdout by a build script are written to a file like
4848
`target/debug/build/<pkg>/output` (the precise location may depend on your
4949
configuration). If you would like to see such output directly in your terminal,
50-
invoke cargo as 'very verbose' with the `-vv` flag. Any line that starts with
51-
`cargo:` is interpreted directly by Cargo. This line must be of the form
52-
`cargo:key=value`, like the examples below:
50+
invoke cargo as 'very verbose' with the `-vv` flag. Note that if neither the
51+
build script nor project source files are modified, subsequent calls to
52+
cargo with the `-vv` will **not** print output to the terminal because a
53+
new build is not executed. Run `cargo clean` before each cargo invokation
54+
if you want to ensure that output is always displayed on your terminal.
55+
Any line that starts with `cargo:` is interpreted directly by Cargo.
56+
This line must be of the form `cargo:key=value`, like the examples below:
5357

5458
```notrust
5559
# specially recognized by Cargo

0 commit comments

Comments
 (0)