Open jyn514 opened 3 years ago
cc @willcrichton
@jyn514 does this issue happen consistently for you? I couldn't reproduce it after ~5 build attempts.
If you can repro it, can you run with -v
and paste the logs?
Hmm, it reproduces on one laptop but not the other ... I wonder if it's related to my shared CARGO_TARGET_DIR? I'll get you the logs this afternoon.
I get this consistently when running with -Zrustdoc-scrape-examples=all
and using another target-dir specified as --target-dir target/extra
, solution is to run twice.
The first build seems to fail when compiling the first -p krate
and before compiling all workspace members, the second build completes by first building the workspace members and then compiling and documenting the -p krate
edit: A few more tries now with cleans inbetween, can't reproduce it fully anymore, and a second run doesn't always solve it, not sure what makes it not work. Have replicated this in CI, see https://github.com/twitch-rs/twitch_api/actions/runs/3306813105/jobs/5457978565 (gist)
Thanks for the report @Emilgardis. I tried reproducing by cloning the twitch_api
repo and running cargo xtask doc
, but I encountered no errors. I'll see if I can reproduce it another way.
Ok!
If I could be of assistance in the reproduction of the bug or with producing logs, I opened https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/debugging.20.22.60--scrape-examples.3Dall.60.20failed.20to.20load.20examples.22 earlier
Actually I think I see the issue. Your logs show that channel_information-{some hash}.examples
was generated, but then Cargo tried to read channel_information-{a different hash}.examples
later. So there's some kind of issue in selecting which hash to write/read from. I'll keep investigating this.
Problem
I think the issue is that cargo isn't waiting for some rustdoc processes to complete?
Steps
git clone https://github.com/deadlinks/cargo-deadlinks/ && cd cargo-deadlinks
cargo doc -Zrustdoc-scrape-examples=all
Possible Solution(s)
No response
Notes
No response
Version
cargo 1.58.0 (built from source on b4ab730ca6e0a0644e47a90aca727836ed2a83f5)