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 with cargo clean).
- Check the files
target/doc/aliases.js and target/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.
Problem
Generating new docs with
cargo docwithout cleaning the files (for example withcargo clean) creates duplicate entries inaliases.jsandsource-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).
cargo docon a crate with anything to document.cargo docwithout cleaning the files (for example withcargo clean).target/doc/aliases.jsandtarget/doc/source-files.jsto 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.