ugexe / zef

Raku Module Management
Artistic License 2.0
207 stars 44 forks source link

Issue with zef installs on windows #452

Open coke opened 2 years ago

coke commented 2 years ago

After reinstalling rakudo a few times, and updating zef, my zef install now consistently fails with any installed version of rakudo, even after wiping out the entire install directory and re-installing moar/nqp/rakudo/zef.

I've tried now with clean rakudo/zef installs with both HEAD and 2022.04 and am getting the same errors trying to install modules.

Please see https://github.com/labster/p6-file-directory-tree/issues/20 for an example. This is also happening on JSON::Marshal.

coke commented 2 years ago
$ sw_vers.bat
C:\>systeminfo   | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.19042 N/A Build 19042
$ raku --version
Welcome to Rakudo™ v2022.04.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.04.
$ zef --version
v0.13.8
coke commented 2 years ago

I was able to install Directory::Tree from a git clone at one point during this testing; it appears to require installing from the ecosystem to generate the error.

ugexe commented 2 years ago

What if you use —/rea ?

coke commented 2 years ago

ok, that worked.

ugexe commented 2 years ago

I suspect the precomp paths its trying to save to is too long when using rea (which has longer names than other ecosystems). It might require something like https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/ In your example the path is C:\Users\coke\.zef\tmp\File%3A%3ADirectory%3A%3ATree%3Aver%3C%2A%3E%3Aauth%3Cgithub%3Alabster%3E.tar.gz\p6-file-directory-tree-master\.precomp\D9FCEA76B4CE7E9B96269DCF9BA0D77F691994B0\95\952279BFDDC9EF8BA07A41980D0268FA20AB126F.repo-id.1BKAD88ZKTH9VQBFCLIUSVDX8.tmp and thats 265 chars

coke commented 2 years ago

What does --/rea do? (Or, I suppose: what is rea?)

coke commented 2 years ago

ah, https://github.com/Raku/REA.

Thanks, @ugexe

coke commented 2 years ago

Related issue that --/rea didn't help with:

$ zef install --/rea --deps-only .
<...>
===> Testing: IO::Capture::Simple:ver<0.0.1>
[IO::Capture::Simple] ===SORRY!=== Error while compiling C:\Users\coke\.zef\store\raku-io-capture-simple-79e699342c0eeb14b8ac52c2f4a0f8819f007e98\1EC8187B786EFDA431B7EB5588440234DB3278C2/t/stderr.t
[IO::Capture::Simple] Failed to open file C:\Users\coke\.zef\store\raku-io-capture-simple-79e699342c0eeb14b8ac52c2f4a0f8819f007e98\1EC8187B786EFDA431B7EB5588440234DB3278C2\.precomp\D9FCEA76B4CE7E9B96269DCF9BA0D77F691994B0\08\08F50F3693BCF14763628EFA49665820B0A22DAA.repo-id.F5IOU30YB07V19FC6R7SMW5JH.tmp: No such file or directory
[IO::Capture::Simple] at C:\Users\coke\.zef\store\raku-io-capture-simple-79e699342c0eeb14b8ac52c2f4a0f8819f007e98\1EC8187B786EFDA431B7EB5588440234DB3278C2/t/stderr.t:1
[IO::Capture::Simple] Actually thrown at:
[IO::Capture::Simple]   in any statement_control at C:\raku\share\perl6\lib/Perl6/Grammar.moarvm line 1
[IO::Capture::Simple] ===SORRY!=== Error while compiling C:\Users\coke\.zef\store\raku-io-capture-simple-79e699342c0eeb14b8ac52c2f4a0f8819f007e98\1EC8187B786EFDA431B7EB5588440234DB3278C2/t/stdout.t
[IO::Capture::Simple] Failed to open file C:\Users\coke\.zef\store\raku-io-capture-simple-79e699342c0eeb14b8ac52c2f4a0f8819f007e98\1EC8187B786EFDA431B7EB5588440234DB3278C2\.precomp\D9FCEA76B4CE7E9B96269DCF9BA0D77F691994B0\08\08F50F3693BCF14763628EFA49665820B0A22DAA.repo-id.42QOQQLE0UPGCGD0UE406MZKT.tmp: No such file or directory
[IO::Capture::Simple] at C:\Users\coke\.zef\store\raku-io-capture-simple-79e699342c0eeb14b8ac52c2f4a0f8819f007e98\1EC8187B786EFDA431B7EB5588440234DB3278C2/t/stdout.t:1
[IO::Capture::Simple] Actually thrown at:
[IO::Capture::Simple]   in any statement_control at C:\raku\share\perl6\lib/Perl6/Grammar.moarvm line 1
[IO::Capture::Simple] ===SORRY!=== Error while compiling C:\Users\coke\.zef\store\raku-io-capture-simple-79e699342c0eeb14b8ac52c2f4a0f8819f007e98\1EC8187B786EFDA431B7EB5588440234DB3278C2/t/test-io-capture/01-basic.t
[IO::Capture::Simple] ===SORRY!=== Error while compiling C:\Users\coke\.zef\store\raku-io-capture-simple-79e699342c0eeb14b8ac52c2f4a0f8819f007e98\1EC8187B786EFDA431B7EB5588440234DB3278C2\lib\Test\IO\Capture.pm6 (Test::IO::Capture)
[IO::Capture::Simple] Failed to open file C:\Users\coke\.zef\store\raku-io-capture-simple-79e699342c0eeb14b8ac52c2f4a0f8819f007e98\1EC8187B786EFDA431B7EB5588440234DB3278C2\.precomp\D9FCEA76B4CE7E9B96269DCF9BA0D77F691994B0\95\952279BFDDC9EF8BA07A41980D0268FA20AB126F.repo-id.8H6XCOAV5SN8OXB4SHE4FC2G1.tmp: No such file or directory
[IO::Capture::Simple] at C:\Users\coke\.zef\store\raku-io-capture-simple-79e699342c0eeb14b8ac52c2f4a0f8819f007e98\1EC8187B786EFDA431B7EB5588440234DB3278C2\lib\Test\IO\Capture.pm6 (Test::IO::Capture):1
[IO::Capture::Simple] Actually thrown at:
[IO::Capture::Simple]   in any statement_control at C:\raku\share\perl6\lib/Perl6/Grammar.moarvm line 1
[IO::Capture::Simple] at C:\Users\coke\.zef\store\raku-io-capture-simple-79e699342c0eeb14b8ac52c2f4a0f8819f007e98\1EC8187B786EFDA431B7EB5588440234DB3278C2/t/test-io-capture/01-basic.t:1
===> Testing [FAIL]: IO::Capture::Simple:ver<0.0.1>
Aborting due to test failure: IO::Capture::Simple:ver<0.0.1> (use --force-test to override)
coke commented 2 years ago

If you think this is still the windows filename length; is this maybe a rakudo thing we can do to reduce length of precomp file names in general? (shorter guids, fewer non guid path components?)

ugexe commented 2 years ago

Right, REA just uses the longest file names and thus ends up in the longest temp directory name. As far as what rakudo can do yeah sure we can remove path parts, but that is just moving the issue up a (probably insignificant) amount. Honestly I'm not sure why this issue occurs though, as I'm pretty sure libuv uses the UNC paths as shown here which should have a much longer limitation.

coke commented 2 years ago

I've enabled support for long paths on windows (via the registry, and post-reboot), and am still getting failures trying to install IO::Capture::Simple - no failures if I clone that repo and do a zef install .

ugexe commented 2 years ago

You might try actually creating the path that is causing the problem with a raku one-liner to see if it works

coke commented 1 year ago

Related to https://github.com/MoarVM/MoarVM/pull/1745. I'm getting this failure on many items that would (probably) otherwise install no problem.