❯ zig build test --watch
test
└─ run test 2/3 passed, 1 failed
error: 'root.test.custom type' failed: /home/wes/Projects/cli-zig/src/root.zig:58:21: 0x10f5dd1 in parseArgs__anon_30471 (test)
return error.UnknownOption;
^
/home/wes/Projects/cli-zig/src/root.zig:148:24: 0x10f6e51 in test.custom type (test)
const result = try Cli.parseArgs(Args, &.{"--list foo,bar,baz"});
^
error: while executing test 'root.test.custom type', the following test command failed:
/home/wes/Projects/cli-zig/.zig-cache/o/2a503f1eb3d0c8bd2baea20f57759aa3/test --seed=0x8ac8acda --cache-dir=/home/wes/Projects/cli-zig/.zig-cache --listen=-
Build Summary: 1/3 steps succeeded; 1 failed; 2/3 tests passed; 1 failed
test transitive failure
└─ run test 2/3 passed, 1 failed
test
└─ run test 2/3 passed, 1 failed
error: 'root.test.custom type' failed: /home/wes/Projects/cli-zig/src/root.zig:58:21: 0x10f5dd1 in parseArgs__anon_30471 (test)
return error.UnknownOption;
^
/home/wes/Projects/cli-zig/src/root.zig:148:24: 0x10f6e51 in test.custom type (test)
const result = try Cli.parseArgs(Args, &.{"--list foo,bar,baz"});
^
error: while executing test 'root.test.custom type', the following test command failed:
/home/wes/Projects/cli-zig/.zig-cache/o/2a503f1eb3d0c8bd2baea20f57759aa3/test --seed=0x8ac8acda --cache-dir=/home/wes/Projects/cli-zig/.zig-cache --listen=-
Build Summary: 1/3 steps succeeded; 1 failed; 2/3 tests passed; 1 failed
test transitive failure
└─ run test 2/3 passed, 1 failed
test
└─ run test 2/3 passed, 1 failed
error: 'root.test.custom type' failed: /home/wes/Projects/cli-zig/src/root.zig:58:21: 0x10f5dd1 in parseArgs__anon_30471 (test)
return error.UnknownOption;
^
/home/wes/Projects/cli-zig/src/root.zig:148:24: 0x10f6e51 in test.custom type (test)
const result = try Cli.parseArgs(Args, &.{"--list foo,bar,baz"});
^
error: while executing test 'root.test.custom type', the following test command failed:
/home/wes/Projects/cli-zig/.zig-cache/o/2a503f1eb3d0c8bd2baea20f57759aa3/test --seed=0x8ac8acda --cache-dir=/home/wes/Projects/cli-zig/.zig-cache --listen=-
Build Summary: 1/3 steps succeeded; 1 failed; 2/3 tests passed; 1 failed
test transitive failure
└─ run test 2/3 passed, 1 failed
test
└─ run test 2/3 passed, 1 failed
error: 'root.test.custom type' failed: /home/wes/Projects/cli-zig/src/root.zig:58:21: 0x10f5dd1 in parseArgs__anon_30471 (test)
return error.UnknownOption;
^
/home/wes/Projects/cli-zig/src/root.zig:148:24: 0x10f6e51 in test.custom type (test)
const result = try Cli.parseArgs(Args, &.{"--list foo,bar,baz"});
^
error: while executing test 'root.test.custom type', the following test command failed:
/home/wes/Projects/cli-zig/.zig-cache/o/2a503f1eb3d0c8bd2baea20f57759aa3/test --seed=0x8ac8acda --cache-dir=/home/wes/Projects/cli-zig/.zig-cache --listen=-
Build Summary: 1/3 steps succeeded; 1 failed; 2/3 tests passed; 1 failed
test transitive failure
└─ run test 2/3 passed, 1 failed
watching 76 directories, 0 processes
When using the
--watchflag and rapidly making changes, it can be difficult to identify new build outputs after several consecutive debounce timeouts:Example
It would be more clear and easier to follow if the terminal was cleared upon debounce timeout. This way, you're only shown the most relevant output. With Ghostty on Linux, I use the following hack in the build runner to accomplish this. Each time the project is rebuilt only the latest result is displayed:
Example
Admittedly, this is a subjective opinion. This sort of thing can be improved by using a custom build runner, but I think it would be a valuable addition to the build system. If this is too subjective, then perhaps a middle-ground where this behavior may be opted into or out of using a flag would work.