rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.8k stars 12.66k forks source link

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

Open DoumanAsh opened 9 years ago

DoumanAsh commented 9 years ago

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

nrc commented 8 years ago

cc me (and also, sigh)

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

steveklabnik commented 5 years ago

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

Diggsey commented 3 years ago

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 commented 3 years ago

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

ChrisDenton commented 3 years ago

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 {}