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

Rustdoc: pages are being overwritten on the file systems with case-insensitive names #25879

Open
DoumanAsh opened this issue May 29, 2015 · 5 comments
Labels
C-bug Category: This is a bug. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@DoumanAsh
Copy link

Not sure if we can work around the case-insensitivity but when generating docs for the identifiers with the same name, but different cases(well it is ok for Rust after all :))
Like:
https://github.com/DoumanAsh/trace-macro/blob/master/src/lib.rs#L29
https://github.com/DoumanAsh/trace-macro/blob/master/src/lib.rs#L150

We will have only one page, instead of two. I suspect that the last generated page will overwrite the first one since from Win file-system point of view it will be the same file.(And NTFS is also case-insensitive?)

I'm not sure what would be a good work around for that.
I suppose it would be good idea to track names to avoid such issues and if there are several identifiers with the same names(different case) it should warn and generate pages with some suffix(like [-num]).
Or even no need to warn, after all docs will be generated successfully.

Rust stable 1.0
rustdoc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)
Win8 x64

@alexcrichton alexcrichton added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 29, 2015
@nrc
Copy link
Member

nrc commented Jul 26, 2016

cc me (and also, sigh)

If anyone wants to tackle this I'm happy to mentor, however, it won't be super-easy.

@steveklabnik steveklabnik added T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. and removed T-tools labels May 18, 2017
@Mark-Simulacrum Mark-Simulacrum added C-bug Category: This is a bug. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Jul 22, 2017
@steveklabnik
Copy link
Member

Triage: i'm not aware of any changes here, nor any plans to fix this any time soon

@Diggsey
Copy link
Contributor

Diggsey commented Dec 1, 2020

One option would be to generate a disambiguation page whenever this problem is detected. That way inbound links will still work correctly, with the only downside that the user has to click an extra time.

@rbtcollins
Copy link
Contributor

I would edit the summary to make this clearer, but this affects:

  • Windows (all vFAT, EXFAT, NTFS without FILE_FLAG_POSIX_SEMANTICS)
  • MacOSX (HFS+ and APFS both default to case insensitivity and require a reformat to be case sensitive).

@ChrisDenton
Copy link
Member

Is this not the general problem of tying filenames directly to Rust identifiers? For example an easy way to break rustdoc on Windows is:

pub mod nul {}

@camelid camelid changed the title Rustdoc: pages are being overwritten on the file systems with case-insensetive names Rustdoc: pages are being overwritten on the file systems with case-insensitive names Jan 10, 2022
@ehuss ehuss removed the T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. label Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants