Stream: compiler development

Topic: exit code 2 on warning


view this post on Zulip Anton (Jan 01 2026 at 10:40):

Do we want to return exit code 2 on warning for both these cases like we used to do with the old compiler?

❯ ./zig-out/bin/roc temp.roc
-- UNUSED VARIABLE -------------------------------

Variable x is not used anywhere in your code.

If you don't need this variable, prefix it with an underscore like _x to suppress this warning.
The unused variable is declared here:
  ┌─ temp.roc:6:5
  │
6 │     x = 5
  │     ^


Found 0 error(s) and 1 warning(s) for temp.roc.
Hello, World!

roc on  main [?] is 📦 v0.0.1 via 🦀 via ↯ v0.15.2
❯ echo $?
0

roc on  main [?] is 📦 v0.0.1 via 🦀 via ↯ v0.15.2
❯ ./zig-out/bin/roc check temp.roc
-- UNUSED VARIABLE -------------------------------

Variable x is not used anywhere in your code.

If you don't need this variable, prefix it with an underscore like _x to suppress this warning.
The unused variable is declared here:
  ┌─ /Users/username/gitrepos/roc5/roc/temp.roc:6:5
  │
6 │     x = 5
  │     ^


Found 0 error(s) and 1 warning(s) in 48.4 ms for temp.roc.

roc on  main [?] is 📦 v0.0.1 via 🦀 via ↯ v0.15.2
❯ echo $?
1

view this post on Zulip Richard Feldman (Jan 01 2026 at 12:02):

yeah that sounds good!


Last updated: Jan 12 2026 at 12:19 UTC