fix a crash in rustdoc merge finalize without input file#146828
fix a crash in rustdoc merge finalize without input file#146828bors merged 4 commits intorust-lang:masterfrom
Conversation
|
r? @notriddle rustbot has assigned @notriddle. Use |
|
Thanks! Can you add a regression test please? |
|
I tried but couldn't write a test. The test utility automatically passes the current file path to |
|
You can create a |
Test added, thanks. |
| .arg("--include-parts-dir=parts") | ||
| .arg("--merge=finalize") | ||
| .out_dir("out") | ||
| .run(); |
There was a problem hiding this comment.
Please add a check to the output to ensure it doesn't crash.
Also, since you don't create a parts folder, I'm pretty sure it actually doesn't test the error:
error: --include-parts-dir expected parts/crate-info to be a file
So you need to create the folder and also the crate-info file into it too, and not empty too apparently otherwise we get:
error: could not write merged cross-crate info: "parts/crate-info": EOF while parsing a value at line 1 column 0
There was a problem hiding this comment.
Also, since you don't create a parts folder, I'm pretty sure it actually doesn't test the error
It doesn't test the error, it tests an ICE described in the linked issue.
So you need to create the folder and also the crate-info file into it too.
They should be created in the previous step by setting --parts-out-dir=parts.
There was a problem hiding this comment.
Hum then it's surprising because I can't seem to reproduce it with latest nightly:
rustdoc 1.92.0-nightly (9f32ccf35 2025-09-21)
There was a problem hiding this comment.
That's strange. I can still reproduce it:
❯ rustdoc -vV
rustdoc 1.92.0-nightly (9f32ccf35 2025-09-21)
binary: rustdoc
commit-hash: 9f32ccf35fb877270bc44a86a126440f04d676d0
commit-date: 2025-09-21
host: aarch64-apple-darwin
release: 1.92.0-nightly
LLVM version: 21.1.1
❯ touch test.rs
❯ rustdoc test.rs -Zunstable-options --parts-out-dir=/tmp/parts_tmp --merge=none
❯ rustdoc -Zunstable-options --include-parts-dir=/tmp/parts_tmp --merge=finalize
thread 'main' (4343049) panicked at /rust/deps/scoped-tls-1.0.1/src/lib.rs:168:9:
There was a problem hiding this comment.
Ah yes, got it. So two things missing: please check that the first command succeeded and created the expected files. And then check that the second command output doesn't contain the string error: internal compiler error:.
There was a problem hiding this comment.
Updated. .run() already implies a successful exit check.
|
Thanks! @bors r+ rollup |
Rollup of 5 pull requests Successful merges: - #146795 (Enable `limit_rdylib_exports` on wasm targets) - #146828 (fix a crash in rustdoc merge finalize without input file) - #146848 (Add x86_64-unknown-motor (Motor OS) tier 3 target) - #146884 (Fix modification check of `rustdoc-json-types`) - #146887 (Remove unused #![feature(get_mut_unchecked)] in Rc and Arc examples) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 5 pull requests Successful merges: - rust-lang/rust#146795 (Enable `limit_rdylib_exports` on wasm targets) - rust-lang/rust#146828 (fix a crash in rustdoc merge finalize without input file) - rust-lang/rust#146848 (Add x86_64-unknown-motor (Motor OS) tier 3 target) - rust-lang/rust#146884 (Fix modification check of `rustdoc-json-types`) - rust-lang/rust#146887 (Remove unused #![feature(get_mut_unchecked)] in Rc and Arc examples) r? `@ghost` `@rustbot` modify labels: rollup
fix a crash in rustdoc merge finalize without input file - Closes rust-lang#146646 `SerializedSearchIndex::union` calls `Symbol::intern`, requiring `SESSION_GLOBALS` to be set.
…llaumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#146795 (Enable `limit_rdylib_exports` on wasm targets) - rust-lang#146828 (fix a crash in rustdoc merge finalize without input file) - rust-lang#146848 (Add x86_64-unknown-motor (Motor OS) tier 3 target) - rust-lang#146884 (Fix modification check of `rustdoc-json-types`) - rust-lang#146887 (Remove unused #![feature(get_mut_unchecked)] in Rc and Arc examples) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 5 pull requests Successful merges: - rust-lang/rust#146795 (Enable `limit_rdylib_exports` on wasm targets) - rust-lang/rust#146828 (fix a crash in rustdoc merge finalize without input file) - rust-lang/rust#146848 (Add x86_64-unknown-motor (Motor OS) tier 3 target) - rust-lang/rust#146884 (Fix modification check of `rustdoc-json-types`) - rust-lang/rust#146887 (Remove unused #![feature(get_mut_unchecked)] in Rc and Arc examples) r? `@ghost` `@rustbot` modify labels: rollup
…llaumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#146795 (Enable `limit_rdylib_exports` on wasm targets) - rust-lang#146828 (fix a crash in rustdoc merge finalize without input file) - rust-lang#146848 (Add x86_64-unknown-motor (Motor OS) tier 3 target) - rust-lang#146884 (Fix modification check of `rustdoc-json-types`) - rust-lang#146887 (Remove unused #![feature(get_mut_unchecked)] in Rc and Arc examples) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 5 pull requests Successful merges: - rust-lang/rust#146795 (Enable `limit_rdylib_exports` on wasm targets) - rust-lang/rust#146828 (fix a crash in rustdoc merge finalize without input file) - rust-lang/rust#146848 (Add x86_64-unknown-motor (Motor OS) tier 3 target) - rust-lang/rust#146884 (Fix modification check of `rustdoc-json-types`) - rust-lang/rust#146887 (Remove unused #![feature(get_mut_unchecked)] in Rc and Arc examples) r? `@ghost` `@rustbot` modify labels: rollup
SerializedSearchIndex::unioncallsSymbol::intern, requiringSESSION_GLOBALSto be set.