Add long path support to Windows
Opened this issue · 1 comments
jonahbeckford commented
The problem is that OCaml executables that invoke a file operation on a path over 260 characters fail.
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
The symptom is errors like the following from Dune:
ocamlc #s/DkHelloScript_Std/.DkHelloScript_Std__AndHello.objs/byte/dkHelloScript_Std__AndHello__AndHello.{cmi,cmo,cmt}
ocamlc #s/DkHelloScript_Std/Y33ArticleX/.DkHelloScript_Std__Y33ArticleX__Doc.objs/byte/dkHelloScript_Std__Y33ArticleX__Doc__Doc.{cmo,cmt}
ocamlc #s/DkHelloScript_Std/Y33ArticleX/.DkHelloScript_Std__Y33ArticleX__Httpd.objs/byte/dkHelloScript_Std__Y33ArticleX__Httpd__Httpd.{cmi,cmo,cmt}
File "#s/DkHelloScript_Std/Y33ArticleX/S020RuntimeReqs.ml", line 1:
Error: I/O error: #s/DkHelloScript_Std/Y33ArticleX/.DkHelloScript_Std__Y33ArticleX__S020RuntimeReqs.objs/byte\dkHelloScript_Std__Y33ArticleX__S020RuntimeReqs__S020RuntimeReqs.cmtf5bcb9.tmp: No such file or directory
ocamlc #s/DkHelloScript_Std/Y33ArticleX/.DkHelloScript_Std__Y33ArticleX__S028PriorArt.objs/byte/dkHelloScript_Std__Y33ArticleX__S028PriorArt__S028PriorArt.{cmi,cmo,cmt}
ocamlc #s/DkHelloScript_Std/Y33ArticleX/.DkHelloScript_Std__Y33ArticleX__S032SecTesting.objs/byte/dkHelloScript_Std__Y33ArticleX__S032SecTesting__S032SecTesting.{cmi,cmo,cmt}
File "#s/DkHelloScript_Std/Y33ArticleX/S040UseUScripts.ml", line 1:
Error: I/O error: #s/DkHelloScript_Std/Y33ArticleX/.DkHelloScript_Std__Y33ArticleX__S040UseUScripts.objs/byte\dkHelloScript_Std__Y33ArticleX__S040UseUScripts__S040UseUScripts.cmtcb0eee.tmp: No such file or directory
and:
Error:
C:\builds\aZxc_bBnR\0\diskuv\distributions\1.0\dksdk-coder\ext\DkHelloScript\_build\default/#s/DkHelloScript_Std/B57Graphics/B43Bogue/.DkHelloScript_Std__B57Graphics__B43Bogue__B43Tiny.objs/dkHelloScript_Std__B57Graphics__B43Bogue__B43Tiny__B43Tiny.impl.all-deps:
No such file or directory
-> required by
"C:\\builds\\aZxc_bBnR\\0\\diskuv\\distributions\\1.0\\dksdk-coder\\ext\\DkHelloScript\\_build\\default/#s/DkHelloScript_Std/B57Graphics/B43Bogue/.DkHelloScript_Std__B57Graphics__B43Bogue__B43Tiny.objs/dkHelloScript_Std__B57Graphics__B43Bogue__B43Tiny__B43Tiny.impl.all-deps"
-> required by
"C:\\builds\\aZxc_bBnR\\0\\diskuv\\distributions\\1.0\\dksdk-coder\\ext\\DkHelloScript\\_build\\default/#s/DkHelloScript_Std/B57Graphics/B43Bogue/.DkHelloScript_Std__B57Graphics__B43Bogue__B43Tiny.objs/byte/dkHelloScript_Std__B57Graphics__B43Bogue__B43Tiny__B43Tiny.cmi"
-> required by %{cmi:B43Tiny} at
#s/DkHelloScript_Std/B57Graphics/B43Bogue/dune:115
-> required by
"C:\\builds\\aZxc_bBnR\\0\\diskuv\\distributions\\1.0\\dksdk-coder\\ext\\DkHelloScript\\_build\\default/#s/DkHelloScript_Std/B57Graphics/B43Bogue/DkHelloScript_Std__B57Graphics__B43Bogue__B43Tiny__B43Tiny.cmi"
-> required by
"C:\\builds\\aZxc_bBnR\\0\\diskuv\\distributions\\1.0\\dksdk-coder\\ext\\DkHelloScript\\_build\\install/default/share/dkexport/DkHelloScript_Std__B57Graphics__B43Bogue__B43Tiny/DkHelloScript_Std__B57Graphics__B43Bogue__B43Tiny__B43Tiny.cmi"
-> required by
"C:\\builds\\aZxc_bBnR\\0\\diskuv\\distributions\\1.0\\dksdk-coder\\ext\\DkHelloScript\\_build\\default/DkHelloScript_Std__B57Graphics__B43Bogue__B43Tiny.install"
-> required by alias #s/all-packages in #s/dune:3
File "#s/DkHelloScript_Std/Y33ArticleX/.DkHelloScript_Std__Y33ArticleX__S008StartScript.objs/byte/_unknown_", line 1, characters 0-0:
ocamlc #s/DkHelloScript_Std/Y33ArticleX/.DkHelloScript_Std__Y33ArticleX__S008StartScript.objs/byte/dkHelloScript_Std__Y33ArticleX__S008StartScript__S008StartScript.{cmi,cmo,cmt} (exit 2)
jonahbeckford commented