- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
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 docon a crate with anything to document.
- Change some documentation and re-run cargo docwithout cleaning the files (for example withcargo clean).
- Check the files 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.
Metadata
Metadata
Assignees
Labels
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.