bootstrap: doc: document std crates one by one#157143
bootstrap: doc: document std crates one by one#157143Fabian-Gruenbichler wants to merge 1 commit into
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
fe86a47 to
c67b1f5
Compare
|
force-pushed with clippy fix |
| cargo | ||
| .arg("--no-deps") | ||
| .arg("--target-dir") | ||
| .arg(&*target_dir.to_string_lossy()) |
There was a problem hiding this comment.
It's preexisting, but I think we should be able to just pass target_dir here? Cargo::arg should take Path/OsStr.
| Kind::Doc, | ||
| ); | ||
| let mut crates = requested_crates.to_vec(); | ||
| let std_lib_crate_order = STD_PUBLIC_CRATES |
There was a problem hiding this comment.
yes, but it seems it is still required to document things in the right order. I am happy to fix this another way, but I haven't yet found a simple reproducer that allows me to figure out what takes a wrong turn where. if somebody has a clue, I am happy to take a closer look there :)
|
I'm a bit hesistant on papering over this in bootstrap 🤔 Is there any particular combo that makes it more likely to trigger this? EDIT: ah, the discussion on the issue also points to rust-lang/cargo#8487. Also not super sure on the tradeoffs. Do we know if using this approach can bring back other problems? |
|
my reproducer was simply running |
|
Is there a way to override the order without documenting the crates one by one? Sure would be nice to fix this in Cargo than to add yet another hack to bootstrap :) |
|
AFAIK/AFAICT cargo already tries to pick the right order, but somehow still sometimes takes a wrong turn. I tried manually reproducing it with a workspace and crates referencing eachother, but failed to do so. I think the way bootstrap calls |
Since switching over from individual, per crate
cargo rustdocinvocations to a singlecargo docinvocation for all crates, the doc output forStdbecame racy. Dependencies betweenlibrary/workspace crates were handled in a flaky fashion, sometimes being emitted as relative references, sometimes as references to the html root.This is probably only a workaround, and it should actually be fixed in cargo or rustdoc, but I haven't managed to reproduce this issue outside of the Std doc build via bootstrap.
Closes: #156567
Fixes: 58e18dd