Skip to content

Commit aaadab6

Browse files
committed
Auto merge of #11092 - TheButlah:patch-1, r=epage
Clarify when cargo detects changes ### What does this PR try to resolve? Its not clear if "any file" means "any rust file" or "any file, including non rust files". I think the confusion stemmed from the focus on it belonging to the rust package. So it was unclear if any file in the directory counts as belonging to the package, or if the package only contains rust source files, and therefore a `.proto` or `.fbs` file in the same directory as the Cargo.toml would not trigger a rebuild. I amended the wording to focus on directories rather than packages. ### How should we test and review this PR? Please let me know which change it should be, and I will update my PR accordingly. Also, please let me know if my edit is accurate, or if it is misleading!
2 parents 9ef926d + 53a1064 commit aaadab6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/src/reference/build-scripts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,9 @@ cross-compiling, so keep that in consideration of the impact on compile time.
323323

324324
When rebuilding a package, Cargo does not necessarily know if the build script
325325
needs to be run again. By default, it takes a conservative approach of always
326-
re-running the build script if any file within the package is changed (or the
327-
list of files controlled by the [`exclude` and `include` fields]). For most
328-
cases, this is not a good choice, so it is recommended that every build script
326+
re-running the build script if *any* file within the package directory is changed
327+
(or the list of files controlled by the [`exclude` and `include` fields]). For
328+
most cases, this is not a good choice, so it is recommended that every build script
329329
emit at least one of the `rerun-if` instructions (described below). If these
330330
are emitted, then Cargo will only re-run the script if the given value has
331331
changed. If Cargo is re-running the build scripts of your own crate or a

0 commit comments

Comments
 (0)