Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aliases.js and source-files.js duplicate entries. #56921

Closed
daxpedda opened this issue Dec 10, 2018 · 2 comments
Closed

aliases.js and source-files.js duplicate entries. #56921

daxpedda opened this issue Dec 10, 2018 · 2 comments
Assignees
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@daxpedda
Copy link
Contributor

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).

  1. Run cargo doc on a crate with anything to document.
  2. Change some documentation and re-run cargo doc without cleaning the files (for example with cargo clean).
  3. 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.

@alexcrichton alexcrichton transferred this issue from rust-lang/cargo Dec 17, 2018
@alexcrichton alexcrichton added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 17, 2018
@alexcrichton
Copy link
Member

Thanks for the report! I've trasferred this to the rust-lang/rust repository as this is likely a rustdoc bug rather than a Cargo bug

@GuillaumeGomez
Copy link
Member

Indeed, fixing it.

@GuillaumeGomez GuillaumeGomez self-assigned this Dec 18, 2018
Centril added a commit to Centril/rust that referenced this issue Dec 22, 2018
…r=QuietMisdreavus

Replace current crate's searchIndex when regenerating

Fixes rust-lang#56921.

r? @QuietMisdreavus
kennytm added a commit to kennytm/rust that referenced this issue Dec 22, 2018
…r=QuietMisdreavus

Replace current crate's searchIndex when regenerating

Fixes rust-lang#56921.

r? @QuietMisdreavus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants