-
Notifications
You must be signed in to change notification settings - Fork 13.9k
rustdoc: fix --emit=dep-info on scraped examples
#148268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
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? |
Makes sure both stages (the scraping process itself, and the doc build) emit complete dependency lists.
CC #146220
Part of #83784