-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Unreproducible "failed to remove file" from cargo doc #13531
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
Comments
Thanks for the report! I'm pretty certain this is #6313 and #10368, since it prints the warning:
I don't think we need another issue to track the collision. Of course it would be good if cargo didn't randomly fail on collisions, but I think those other issues cover the tracking of trying to address it. |
With respect, I don't agree that this bug should be closed. This bug is about he fact that cargo doc randomly fails.This is an aspect of the situation that is not covered by other bugs. Neither #6313 nor #10368 reasonably represents the fact that cargo is rendered generally unreliable. Neither of them contain the error message that I experienced (and, naturally searched for). #10368 merely quotes the general "there are have duplicate outputs" message. #6313 is a tracking issue. This bug could be fixed separately.It would be possible to address the unreliability without eliminating the dup[licate artiffacts. Possible workarounds in cargo include additional serialisation, more careful/robust handling of output file writes, or tolerating certain errors. That would leave a situation where cargo would reliably run to completion; the docs output for the affected crates would still be unpredictable and maybe broken, but other documentation would be unaffected, and the overall run would complete. That would be a significant practical improvement. #6313 has been open for over half a decade. Expecting it to be fixed soon would be the triumph of hope over experience. The background is that we need Rust to be reliable. That means we need cargo to not randomly fail. |
I think I have this issue as well, but it can only be re-produced in CI? See https://github.com/us-irs/va416xx-rs/actions/runs/9797632441/job/27337932825 |
Problem
Steps
I don't have a reproducer. This is about the third time this has happened to me. In each case, running the original
cargo doc
command again "seems to fix it".Possible Solution(s)
Probably, cargo is doing things in parallel to the same files. #6313 may be related.
Until #6313 can be fixed, cargo should at least take some kind of lock, or put pids in filenames, or something, to avoid this kind of uncontrolled behaviour. Having "one or the other" version documented is tolerable. Randomly crapping out isn't.
Notes
The command I ran was
nailing-cargo doc --document-private-items --all-features --workspace
which turns intocargo doc --locked --offline --document-private-items --all-features --workspace
. I was inarti.git#ab950a685900bce50bd54e24694243592a2c5c67
. I don't think this information is relevant, though.Version
The text was updated successfully, but these errors were encountered: