You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a meta issue to coordinate the different issues related to handling device paths and long paths on Windows (such as \\?\ or \\.\). There are several places where Cargo does not handle these well, but it is not clear exactly how they all should be approached. Changes for these require careful consideration, and it's not clear what a general good approach would look like. Some rough thoughts to consider:
Where exactly are the problems? (Making a very clear overview would be an extremely helpful way to help here!)
If we don't or can't support MAX_PATH paths, does it make sense to ever use device paths? Can they just be converted to normal paths and make Windows handle its regular normalization?
Is supporting long paths feasible without a manifest?
Should the fixes be primarily done to the standard library?
Should Cargo use an external library (like dunce), or should it all be internal? What should be done with normalize_path?
How to approach normalization/canonicalization? There are classic issues like whether to follow symlinks, but also the troubles of using's Rust's canonicalize function on Windows.
Should Cargo try to avoid device (aka verbatim) paths as much as possible?
Are there other ways to lean on Win32 normalization (like \\.\ or GetFullPathNameW)?
Is it feasible to just translate \\?\ paths to \\.\, and rely on the Win32 API to do normalization? This would not support long-paths, but there are many other problems with long paths. (Probably not, just tossing out the idea.)
This is a meta issue to coordinate the different issues related to handling device paths and long paths on Windows (such as
\\?\or\\.\). There are several places where Cargo does not handle these well, but it is not clear exactly how they all should be approached. Changes for these require careful consideration, and it's not clear what a general good approach would look like. Some rough thoughts to consider:targetdirectory exceed MAX_PATH seems like it would be quite difficult due to issues like Windows: Allow running processes whose path exceeds the legacyMAX_PATHrust#86406. Manifests require a registry setting that is off by default.dunce), or should it all be internal? What should be done withnormalize_path?canonicalizefunction on Windows.\\.\orGetFullPathNameW)?\\?\GLOBALROOT\style paths (see Windows: Fixfs::canonicalizeto work with legacy drivers rust#86447)?\\?\paths to\\.\, and rely on the Win32 API to do normalization? This would not support long-paths, but there are many other problems with long paths. (Probably not, just tossing out the idea.)Linking issues and PRs:
\\?\verbatim paths break idiomatic use of OUT_DIR andinclude!#13919 — Windows\\?\verbatim paths break idiomatic use of OUT_DIR andinclude!