Skip to content

Possible nightly rustdoc doc generation time / size regression #134435

@piaoyh

Description

@piaoyh

I published my crate to crates.io, but I found the server does not generate documentation properly. My crate is cryptocol and its link is https://docs.rs/cryptocol/0.8.5/cryptocol/. However, the webpage https://docs.rs/cryptocol/0.8.5/cryptocol/number/big_uint/struct.BigUInt.html#struct.BigUInt is failed to be generated. At the site, rust-lang/docs.rs#2676 , it is recommended to toss the issue here because it is considered that the reason is related to that fact that cargo +nightly docs does not work properly.

I tried this code:

cargo +nightly docs

I expected to see this happen: All the webpages will be generated properly. Especially, /home/youngho/shared/rust-target/doc/cryptocol/number/big_uint/struct.BigUInt.html should be properly generated. So, for offline test, when I execute cargo +nightly docs, it should generate all the webpages fine as executing cargo doc.

Instead, this happened: For offline test, when I execute cargo +nightly docs, it keeps running but never ends. It looks that the cargo falls into infinite loop. However, when I execute cargo doc, it generated all the webpages fine.

Meta

rustc --version --verbose:

cargo 1.83.0 (5ffbef321 2024-10-29)
rustc 1.83.0 (90b35a623 2024-11-26)
rustdoc 1.83.0 (90b35a623 2024-11-26)

$ rustc --version --verbose
rustc 1.83.0 (90b35a623 2024-11-26)
binary: rustc
commit-hash: 90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf
commit-date: 2024-11-26
host: x86_64-unknown-linux-gnu
release: 1.83.0
LLVM version: 19.1.1

I feel it strange about why it takes so irrationally long and generates irrationally big size of file. (Somebody said that if you wait for an hour, it generates 60 MB-sized struct.BigUInt.html, but I haven't wait for that long time.) BigUInt.rs of version 0.8.4 is 2.9 MB in size while BigUInt.rs of version 0.8.5 is 4.0 MB. The change (1.1 MB) in size makes huge difference. There must be a size threshold that cargo cannot deal with files.

backtrace


Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcE-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions