Skip to content

Package fetching has regressed on Windows #17477

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

Closed
squeek502 opened this issue Oct 11, 2023 · 4 comments · Fixed by #17478
Closed

Package fetching has regressed on Windows #17477

squeek502 opened this issue Oct 11, 2023 · 4 comments · Fixed by #17478
Labels
bug Observed behavior contradicts documented or intended behavior os-windows regression It worked in a previous version of Zig, but stopped working. zig build system std.Build, the build runner, `zig build` subcommand, package management
Milestone

Comments

@squeek502
Copy link
Collaborator

Zig Version

0.12.0-dev.878+7abf9b3a83

Steps to Reproduce and Observed Behavior

Regressed in #17392

Building zls on latest master:

> zig build -Doptimize=ReleaseSafe
C:\Users\Ryan\Programming\Zig\zls\zig-cache\o\8c6656817d7b9ba969d47a90c375e93f\dependencies.zig:3:70: error: invalid escape character: 'p'
        pub const build_root = "C:\\Users\\Ryan\\AppData\\Local\\zig\p\\1220363c7e27b2d3f39de6ff6e90f9537a0634199860fea237a55ddb1e1717f5d6a5";
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Ryan\Programming\Zig\zls\zig-cache\o\8c6656817d7b9ba969d47a90c375e93f\dependencies.zig:8:70: error: invalid escape character: 'p'
        pub const build_root = "C:\\Users\\Ryan\\AppData\\Local\\zig\p\\122089a8247a693cad53beb161bde6c30f71376cd4298798d45b32740c3581405864";
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Ryan\Programming\Zig\zls\zig-cache\o\8c6656817d7b9ba969d47a90c375e93f\dependencies.zig:13:70: error: invalid escape character: 'p'
        pub const build_root = "C:\\Users\\Ryan\\AppData\\Local\\zig\p\\1220bb12c9bfe291eed1afe6a2070c7c39918ab1979f24a281bba39dfb23f5bcd544";
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

With 0.12.0-dev.819+75b48ef50 (one build before #17392 was merged):

> "C:\Users\Ryan\Programming\Zig\zig-downloaded\zig-windows-x86_64-0.12.0-dev.819+75b48ef50\zig" build -Doptimize=ReleaseSafe

(success)

Expected Behavior

Successful fetching and compilation

@squeek502 squeek502 added bug Observed behavior contradicts documented or intended behavior os-windows regression It worked in a previous version of Zig, but stopped working. labels Oct 11, 2023
@der-teufel-programming
Copy link
Contributor

I'll take a look at this since I've also stared having problems with building zls

squeek502 added a commit to squeek502/zig that referenced this issue Oct 11, 2023
…b_path

Fixes a package fetching regression on Windows. Closes ziglang#17477
@squeek502
Copy link
Collaborator Author

squeek502 commented Oct 11, 2023

@der-teufel-programming I've found a fix already: #17478

@squeek502
Copy link
Collaborator Author

squeek502 commented Oct 11, 2023

By the way, this can also manifest as this error:

> zig build -Doptimize=ReleaseSafe
warning: FileNotFound: C:\Users\Ryan\AppData\Local\zig\p\1220363c7e27b2d3f39de6ff6e90f9537a0634199860fea237a55ddb1e1717f5d6a5\build.zig
error: FileNotFound

I'm unsure exactly why I stopped hitting that error and started hitting the compile error in the generated dependencies.zig. Something cache related I'm sure.

@squeek502 squeek502 added the zig build system std.Build, the build runner, `zig build` subcommand, package management label Oct 11, 2023
@andrewrk andrewrk added this to the 0.12.0 milestone Oct 11, 2023
andrewrk pushed a commit that referenced this issue Oct 11, 2023
…b_path

Fixes a package fetching regression on Windows. Closes #17477
@llogick
Copy link
Contributor

llogick commented Oct 11, 2023

By the way, this can also manifest as this error:

> zig build -Doptimize=ReleaseSafe
warning: FileNotFound: C:\Users\Ryan\AppData\Local\zig\p\1220363c7e27b2d3f39de6ff6e90f9537a0634199860fea237a55ddb1e1717f5d6a5\build.zig
error: FileNotFound

I'm unsure exactly why I stopped hitting that error and started hitting the compile error in the generated dependencies.zig. Something cache related I'm sure.

Greetings,

ZLS' CI just pulled latest zig, but is still failing with FileNotFound,

{
 "zig_exe": "C:\\hostedtoolcache\\windows\\zig\\master\\x64\\zig.exe",
 "lib_dir": "C:\\hostedtoolcache\\windows\\zig\\master\\x64\\lib",
 "std_dir": "C:\\hostedtoolcache\\windows\\zig\\master\\x64\\lib\\std",
 "global_cache_dir": "C:\\Users\\runneradmin\\AppData\\Local\\zig",
 "version": "0.12.0-dev.881+42998e637",
 "target": "x86_64-windows.win10_fe...win10_fe-gnu"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior os-windows regression It worked in a previous version of Zig, but stopped working. zig build system std.Build, the build runner, `zig build` subcommand, package management
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants