Stream: beginners

Topic: ✔ Help running `zig build test`


view this post on Zulip Ian McLerran (May 07 2026 at 15:51):

Hey ya'll, I just pulled the latest version of the roc-lang/roc repo, cd'd to src/, ran nix develop, and then tried running zig build test. However, this produced a whole lot of failures. The output of zig build test was very long, so I haven't pasted it all here, but here is the final summary output:

Build Summary: 105/114 steps succeeded; 7 failed; 3569/3658 tests passed; 11 skipped; 78 failed
test transitive failure
├─ check-type-checker-patterns failure
├─ check-cli-global-stdio failure
└─ tests_summary transitive failure
   ├─ run test eval 1382/1386 passed, 1 failed, 3 skipped
   ├─ run test lsp 152/171 passed, 19 failed
   ├─ run test snapshot_tool_test 15/16 passed, 1 failed
   ├─ run test cli_test 45/50 passed, 5 failed
   └─ run test fx_platform_test 2/58 passed, 52 failed, 4 skipped

This is on a clean copy of main, commit ee0fc49. Am I missing something? I thought nix develop ./src should fully configure my build environment...

view this post on Zulip Ian McLerran (May 07 2026 at 15:53):

Some of the early output of zig build test included a ton of "FileNotFound" errors. I've truncated it a ton, but here is just a snippet of those errors:

$ zig build test
test
└─ check-cli-global-stdio failure
error: Failed to open src/cli/main.zig: error.FileNotFound
test
└─ check-type-checker-patterns failure
error: Failed to open src/check directory: error.FileNotFound
Warning: Failed to open src/eval/interpreter.zig: error.FileNotFound
Warning: Failed to open src/eval/StackValue.zig: error.FileNotFound
Warning: Failed to open directory src/builtins: error.FileNotFound
Build succeeded!
Roc cache not found (nothing to clear)
test
└─ tests_summary
   └─ run test fx_platform_test 2/58 passed, 52 failed, 4 skipped
error: 'fx_platform_test.test.fx platform IO spec tests (interpreter)' failed: [FAIL] test/fx/app.roc (--opt=interpreter): failed to run: error.FileNotFound

[FAIL] test/fx/subdir/app.roc (--opt=interpreter): failed to run: error.FileNotFound

[FAIL] test/fx/stdin_to_stdout.roc (--opt=interpreter): failed to run: error.FileNotFound
...
..
.

view this post on Zulip Ian McLerran (May 07 2026 at 17:07):

Solved: I was running zig build test from src/ instead of the repo root.

view this post on Zulip Notification Bot (May 07 2026 at 17:07):

Ian McLerran has marked this topic as resolved.

view this post on Zulip Hannes (May 08 2026 at 06:05):

You can run nix develop ./src to activate the dev shell from the root of the repo btw :)

view this post on Zulip Ian McLerran (May 08 2026 at 15:54):

Thanks! :D


Last updated: May 23 2026 at 12:51 UTC