Closed MehdiChinoune closed 2 years ago
that saves 2 characters off the path. it would be possible to save 2 more using subst to git repo root (say
M:\
orS:\
). it might be possible to subst to the package directory for even more savings, but IIRC some packages look outside their package directory with relative paths.
It would be possible to save 10 characters by stripping mingw-w64-
prefix from MinGW-packages folder names.
Microsoft added support for path length up to 32767 since Windows 1607 ^1 (before Windows Server 2016), but should be enabled by the user. Fortunately It is enabled on Github Actions Images.
(Get-ItemProperty "HKLM:System\CurrentControlSet\Control\FileSystem").LongPathsEnabled
1
I think the blocker is from mingw-w64 side where MAX_PATH is still defined to 260
// minwindef.h:33
#define MAX_PATH 260
that new path limit only works if you dont use MAX_PATH afaik, so depends on each tool and not mingw-w64. python uses the new limit for example
@lazka Could you rebuild rust, I think this change will fix its failure to build with msys2-autobuild.
@lazka Could you rebuild rust, I think this change will fix its failure to build with msys2-autobuild.
thanks, building now
that new path limit only works if you dont use MAX_PATH afaik, so depends on each tool and not mingw-w64. python uses the new limit for example
Yes. Also, I think each executable needs to have a manifest that opts it in to the new limit. Because a program could easily get a buffer overflow from some of those APIs that don't take a length, and assume a MAX_PATH sized buffer.
I was afraid of this:
Cloning into 'C:\runner\_work\msys2-autobuild\msys2-autobuild\M'...
C:
means the CWD on drive C, C:\
means the root of drive C.
rust still went through.. weird
In autobuild, the CWD on drive C was the root (the CWD on drive D was the checkout of msys2-autobuild). On my self-hosted runner, there is only drive C, so the CWD was the checkout in the runner's work directory.
that saves 2 characters off the path. it would be possible to save 2 more using subst to git repo root (say
M:\
orS:\
). it might be possible to subst to the package directory for even more savings, but IIRC some packages look outside their package directory with relative paths.