-
Notifications
You must be signed in to change notification settings - Fork 412
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
Too easy to reach MAX_PATH on windows #11303
Comments
@dra27, do you have anything to say about this ? |
I suppose we can disable sandboxing if limit of the path goes above 255? Not really sure what else we could do. |
Here are few ideas:
|
cf. a recent foray in ocaml/ocaml#13444. The TL;DR from my perspective was "Windows long path support doesn't work, or certainly not well enough to be turning it on automatically"! I think anything which requires the user to reconfigure their machine is a mistake in terms of general OCaml/Dune usability. Given that all these paths are internal to Dune, Dune could manually transform paths so that it can access long paths (using the FWIW - and I realise it adds a layer of complexity - I'd index/hash these names on all systems, and keep the lengths down - it's not like very long paths don't run into occasional problems on Unix too (cf. shebang issues, etc.). |
Quoting a comment from ocaml/ocaml#13444 (comment)
cc @jonahbeckford, to make sure you see the current issue |
I've a PoC with some renaming: #11307 length = 155
becomes length = 109
|
and 134
becomes 94
|
Note that the example above use a short name for inline-tests because of MAX_PATH. |
But in general, we could have more than one library per directory defining inline tests. |
many libs with inline tests can live together, one segment of the path still contains the libname ( |
Context
Windows has big constraint on file-path length. See https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry
Some combinaison of dune features can result in file path that are quite long, increasing the probability of reaching the limit.
Here is an example involving sandboxing, inline-test and wasm_of_ocaml (236 chars)
Changing name and layout of the test to make the path as small as possible (inline test named t at the root), you get 158 chars.
Question
Can we change some naming to make paths smaller ?
Can we do something to hint users about enabling long paths ? I don't know how much this can be a solution..
The text was updated successfully, but these errors were encountered: