Skip to content

When code cannot run yet

A program that reaches a function the compiler cannot compile yet fails before its first effect:

  • nomi run prints an error at the code the compiler stopped at, with its source line and any hint, such as this call to `skip_odd` is not supported yet, so `fn evens` cannot run, and exits 1. The last hint of every such error says the gap is in Nomi, not the program, and links the issue tracker.
  • nomi check compiles the program the same way without running it and reports the same errors for everything main or a test reaches.
  • nomi test runs every case it can and reports each case it cannot as BLOCKED <file> :: <case> <path>:<line>:<col>: <message>, with any hint indented on the line below. The location is the code the compiler stopped at, in the file that holds it: a module the test imports, or, for a standard library module’s cases, the stdlib file whose function the case reaches. It appends , K blocked to its summary when K is not zero, and exits nonzero when anything failed or was blocked. A program the checker rejects is never blocked: nomi test fails the file with the errors nomi check reports, including an error in another standard library module that a stdlib module’s cases reach.
  • A run stopped by something else (a Go crossing nothing binds, or a VM limit) prints BLOCKED <file> [<function>] <reason> lines instead.

Setting NOMI_DEBUG_LOWERING=1 adds the compiler’s own reason to each of these errors as a hint.