Skip to content
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

Revert behaviour change for bootstrap doc command #113123

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,18 +594,20 @@ fn doc_std(

// HACK: because we use `--manifest-path library/sysroot/Cargo.toml`, cargo thinks we only want to document that specific crate, not its dependencies.
// Override its default.
let built_crates = if requested_crates.is_empty() {
builder
.in_tree_crates("sysroot", None)
.into_iter()
.map(|krate| krate.name.to_string())
.collect()
if requested_crates.is_empty() {
for krate in
builder.in_tree_crates("sysroot", None).into_iter().map(|krate| krate.name.to_string())
{
cargo.arg("-p").arg(krate);
}
} else {
requested_crates.to_vec()
};

for krate in built_crates {
cargo.arg("-p").arg(krate);
for krate in STD_PUBLIC_CRATES {
cargo.arg("-p").arg(krate);
if requested_crates.iter().any(|p| p == krate) {
// No need to document more of the libraries if we have the one we want.
break;
}
}
}

builder.run(&mut cargo.into());
Expand Down