Skip to content

rustdoc fails after interrupting doc generation #140698

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

Open
TheNeikos opened this issue May 6, 2025 · 1 comment
Open

rustdoc fails after interrupting doc generation #140698

TheNeikos opened this issue May 6, 2025 · 1 comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@TheNeikos
Copy link
Contributor

I tried this command:

cargo doc

I then pressed ctrl-c to stop it. I then re-ran it.

I expected to see this happen: It builds the documentation

Instead, this happened:

error: couldn't generate documentation: invalid template: invalid format: should have a newline on the last line
  |
  = note: failed to create or modify "/home/neikos/projects/software-suite/target/doc/search-index.js"

error: could not document `unicode-ident`
warning: build failed, waiting for other jobs to finish...
error: could not document `smallvec`
error: could not document `thiserror`

Meta

✦ ❯ rustdoc --version --verbose
rustdoc 1.85.0 (4d91de4e4 2025-02-17)
binary: rustdoc
commit-hash: 4d91de4e48198da2e33413efdcd9cd2cc0c46688
commit-date: 2025-02-17
host: x86_64-unknown-linux-gnu
release: 1.85.0
LLVM version: 19.1.7

@TheNeikos TheNeikos added the C-bug Category: This is a bug. label May 6, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 6, 2025
@jieyouxu jieyouxu added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels May 6, 2025
@fmease fmease added the S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. label May 6, 2025
@lolbinarycat
Copy link
Contributor

It seems like you're interrupting rustdoc while that file is being written.

unlike most build artifacts, the search index is currently persisted across rebuilds.

I believe that cargo doc should remove the search index before invoking rustdoc, as that would also solve #133544

@lolbinarycat lolbinarycat removed the S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. label May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants