rustdoc: fix --emit=dep-info on scraped examples#148268
rustdoc: fix --emit=dep-info on scraped examples#148268bors merged 2 commits intorust-lang:masterfrom
--emit=dep-info on scraped examples#148268Conversation
|
|
0f8db3b to
64349b0
Compare
This comment has been minimized.
This comment has been minimized.
64349b0 to
8611f0b
Compare
|
r? rustdoc |
|
Thanks! @bors r+ rollup |
…=GuillaumeGomez rustdoc: fix `--emit=dep-info` on scraped examples Makes sure both stages (the scraping process itself, and the doc build) emit complete dependency lists. CC rust-lang#146220 Part of rust-lang#83784
Rollup of 4 pull requests Successful merges: - #139751 (Implement pin-project in pattern matching for `&pin mut|const T`) - #147633 (Add new `--bypass-ignore-backends` option) - #148262 (Fix types being marked as dead when they are inferred generic arguments) - #148268 (rustdoc: fix `--emit=dep-info` on scraped examples) r? `@ghost` `@rustbot` modify labels: rollup
…=GuillaumeGomez rustdoc: fix `--emit=dep-info` on scraped examples Makes sure both stages (the scraping process itself, and the doc build) emit complete dependency lists. CC rust-lang#146220 Part of rust-lang#83784
Rollup of 4 pull requests Successful merges: - #144291 (Constify trait aliases) - #147633 (Add new `--bypass-ignore-backends` option) - #148262 (Fix types being marked as dead when they are inferred generic arguments) - #148268 (rustdoc: fix `--emit=dep-info` on scraped examples) r? `@ghost` `@rustbot` modify labels: rollup
|
Failed in rollup: #148308 (comment) (job: aarch64-msvc-1) |
Does anybody know whether it's okay to use backslashes in these dep files? Should I fix the test, or the emitter? |
|
Lacking any other resource to work with, I checked Cargo's dep info parser and the GNU Make docs. Both of these seem to imply that backslashes are fine, as long as they don't immediately precede a special character (like another backslash, a newline, or an asterisk): } else if let Some(pos) = line.find(": ") {
if found_deps {
continue;
}
found_deps = true;
let mut deps = line[pos + 2..].split_whitespace();
while let Some(s) = deps.next() {
let mut file = s.to_string();
while file.ends_with('\\') {
file.pop();
file.push(' ');
file.push_str(deps.next().ok_or_else(|| {
crate::util::internal("malformed dep-info format, trailing \\")
})?);
}
ret.files.entry(file.into()).or_default();
}https://www.gnu.org/software/make/manual/make.html#Wildcard-Pitfall
|
|
@rustbot ready |
|
Please note that |
|
Is there anything I need to change about this code? |
|
I don't think so. Let's go again. @bors r+ rollup |
Rollup of 8 pull requests Successful merges: - #135099 (Add FileCheck annotations to mir-opt/copy-prop) - #145903 (Give correct suggestion for a typo in raw pointers) - #147520 (Port the remaining SIMD intrinsics to const-eval) - #148068 (rustdoc: Use configured target modifiers when collecting doctests) - #148099 (Prepare to move debugger discovery from compiletest to bootstrap) - #148268 (rustdoc: fix `--emit=dep-info` on scraped examples) - #148306 (Remove double check when decoding ExpnId to avoid races) - #148378 (Fix documentation for std::panic::update_hook) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - rust-lang/rust#135099 (Add FileCheck annotations to mir-opt/copy-prop) - rust-lang/rust#145903 (Give correct suggestion for a typo in raw pointers) - rust-lang/rust#147520 (Port the remaining SIMD intrinsics to const-eval) - rust-lang/rust#148068 (rustdoc: Use configured target modifiers when collecting doctests) - rust-lang/rust#148099 (Prepare to move debugger discovery from compiletest to bootstrap) - rust-lang/rust#148268 (rustdoc: fix `--emit=dep-info` on scraped examples) - rust-lang/rust#148306 (Remove double check when decoding ExpnId to avoid races) - rust-lang/rust#148378 (Fix documentation for std::panic::update_hook) r? `@ghost` `@rustbot` modify labels: rollup
…llaumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#135099 (Add FileCheck annotations to mir-opt/copy-prop) - rust-lang#145903 (Give correct suggestion for a typo in raw pointers) - rust-lang#147520 (Port the remaining SIMD intrinsics to const-eval) - rust-lang#148068 (rustdoc: Use configured target modifiers when collecting doctests) - rust-lang#148099 (Prepare to move debugger discovery from compiletest to bootstrap) - rust-lang#148268 (rustdoc: fix `--emit=dep-info` on scraped examples) - rust-lang#148306 (Remove double check when decoding ExpnId to avoid races) - rust-lang#148378 (Fix documentation for std::panic::update_hook) r? `@ghost` `@rustbot` modify labels: rollup
Makes sure both stages (the scraping process itself, and the doc build) emit complete dependency lists.
CC #146220
Part of #83784