Zig Version
0.17.0-dev.1209+c737c2efe
Steps to Reproduce, Observed Behavior, and Expected Behavior
I'm trying to update mr_asset_pipeline to use dependOnDirectory instead of poisonCache. I'm not getting the expected results, the configure script doesn't appear to be rerunning when I add files to the directory I added a dependency on.
To make sure I'm correctly diagnosing the issue, I decided to use --cache-poison=poisoned to see if this would force it to re-run configure and get the expected output.
However, this results in a crash. I'm able to reproduce this by generating a minimal project with zig init and then running zig build --cache-poison=poisoned:
zig build --cache-poison=poisoned
thread 102901 panic: reached unreachable code
/home/mason/zig/master/lib/std/debug.zig:435:14: 0x1156ea9 in assert (std.zig)
if (!ok) unreachable; // assertion failure
^
/home/mason/zig/master/lib/std/Build/Cache.zig:1031:15: 0x1311634 in addPrefixedPathPost (std.zig)
assert(man.manifest_file != null);
^
/home/mason/zig/master/lib/std/zig.zig:1772:51: 0x1f5855b in buildExeSubprocess (std.zig)
keep = man.addPrefixedPathPost(.{
^
/home/mason/zig/master/lib/compiler/Maker.zig:1232:76: 0x1319b48 in configure (Maker.zig)
const configure_exe_path: Path = if (std.zig.buildExeSubprocess(gpa, io, .{
^
/home/mason/zig/master/lib/compiler/Maker.zig:666:22: 0x1349fee in main (Maker.zig)
if (configure(&graph, .{
^
/home/mason/zig/master/lib/std/start.zig:752:88: 0x1350bea in callMain (std.zig)
if (fn_info.param_types[0].? == std.process.Init.Minimal) return wrapMain(root.main(.{
^
/home/mason/zig/master/lib/std/start.zig:217:5: 0x13096f1 in _start (std.zig)
asm volatile (switch (native_arch) {
^
fish: Job 1, '/home/mason/zig/master/build/st...' terminated by signal SIGABRT (Abort)
Additionally, --cache-poison silently ignores incorrect values right now:
$ zig build --cache-poison=foo
$ echo $status
0
### Zig Version
0.17.0-dev.1209+c737c2efe
### Steps to Reproduce, Observed Behavior, and Expected Behavior
I'm trying to update [`mr_asset_pipeline`](https://codeberg.org/Games-by-Mason/mr_asset_pipeline/src/branch/zig-0.17.0) to use `dependOnDirectory` instead of `poisonCache`. I'm not getting the expected results, the configure script doesn't appear to be rerunning when I add files to the directory I added a dependency on.
To make sure I'm correctly diagnosing the issue, I decided to use `--cache-poison=poisoned` to see if this would force it to re-run configure and get the expected output.
However, this results in a crash. I'm able to reproduce this by generating a minimal project with `zig init` and then running `zig build --cache-poison=poisoned`:
```sh
zig build --cache-poison=poisoned
thread 102901 panic: reached unreachable code
/home/mason/zig/master/lib/std/debug.zig:435:14: 0x1156ea9 in assert (std.zig)
if (!ok) unreachable; // assertion failure
^
/home/mason/zig/master/lib/std/Build/Cache.zig:1031:15: 0x1311634 in addPrefixedPathPost (std.zig)
assert(man.manifest_file != null);
^
/home/mason/zig/master/lib/std/zig.zig:1772:51: 0x1f5855b in buildExeSubprocess (std.zig)
keep = man.addPrefixedPathPost(.{
^
/home/mason/zig/master/lib/compiler/Maker.zig:1232:76: 0x1319b48 in configure (Maker.zig)
const configure_exe_path: Path = if (std.zig.buildExeSubprocess(gpa, io, .{
^
/home/mason/zig/master/lib/compiler/Maker.zig:666:22: 0x1349fee in main (Maker.zig)
if (configure(&graph, .{
^
/home/mason/zig/master/lib/std/start.zig:752:88: 0x1350bea in callMain (std.zig)
if (fn_info.param_types[0].? == std.process.Init.Minimal) return wrapMain(root.main(.{
^
/home/mason/zig/master/lib/std/start.zig:217:5: 0x13096f1 in _start (std.zig)
asm volatile (switch (native_arch) {
^
fish: Job 1, '/home/mason/zig/master/build/st...' terminated by signal SIGABRT (Abort)
```
Additionally, `--cache-poison` silently ignores incorrect values right now:
```sh
$ zig build --cache-poison=foo
$ echo $status
0
```