Closed as duplicate of#23051
Description
Zig Version
0.14.0-dev.3460+6d29ef0ba
Steps to Reproduce and Observed Behavior
Hello, after #22994 was merged, system package retrieval no longer works with dependencies which were not updated to the new format.
For example you can checkout zigtools/zls@336f468 and run following commands:
$ zig build
# works fine
$ zig build --fetch --global-cache-dir deps/
$ zig build --system deps/p/
/home/bratishkaerik/github.com/zls/build.zig.zon:21:14: error: package not found at 'deps/p//1220102cb2c669d82184fb1dc5380193d37d68b54e8d75b76b2d155b9af7d7e2e76d'
.hash = "1220102cb2c669d82184fb1dc5380193d37d68b54e8d75b76b2d155b9af7d7e2e76d",
^~~~
$ exa --tree -L1 deps/p/
deps/p
├── known_folders-0.0.0-Fy-PJtLDAADGDOwYwMkVydMSTp_aN-nfjCZw6qPQ2ECL
├── lsp_codegen-0.1.0-CMjjo0ZXCQB-rAhPYrlfzzpU0u0u2MeGvUucZ-_g32eg
└── N-V-__8AABhrAQAQLLLGadghhPsdxTgBk9N9aLVOjXW3ay0V
Note that it does not error when you re-fetch this dependency to get hash saved in new format:
.diffz = .{
.url = "https://github.com/ziglibs/diffz/archive/ef45c00d655e5e40faf35afbbde81a1fa5ed7ffb.tar.gz",
- .hash = "1220102cb2c669d82184fb1dc5380193d37d68b54e8d75b76b2d155b9af7d7e2e76d",
+ .hash = "N-V-__8AABhrAQAQLLLGadghhPsdxTgBk9N9aLVOjXW3ay0V",
},
Expected Behavior
To work like it does for regular builds. If they are still allowed for regular builds, I would expect them to work with system mode too.
... or be banned in both scenarios. With current model, to fix system mode you would need to convert every hash of every dependency (direct or transient) anyway.