Closed
Description
Problem
Generating new docs with cargo doc
without cleaning the files (for example with cargo clean
) creates duplicate entries in aliases.js
and source-files.js
.
The expected behaviour is no duplicate entries.
Steps
I created an example repository here: https://github.com/daxpedda/docs_test.
Going through the commits the bug can be seen easily (#1, #2, #3, #4, #5).
- Run
cargo doc
on a crate with anything to document. - Change some documentation and re-run
cargo doc
without cleaning the files (for example withcargo clean
). - Check the files
target/doc/aliases.js
andtarget/doc/source-files.js
to see the duplicate entries.
Possible Solution(s)
I didn't look at the code of cargo before, so I have no clue. Obviously a quick hack would be just to overwrite the file and regenerate it every time, I don't think the issue is pressing enough to use a hack though.
Notes
I tested this bug on the nightly toolchain on Windows and Linux.