soma.cell

E0036: runtime_unknown_cell

E0036 runtime_unknown_cell — the runtime section names a cell that does not exist.

A compile-time error of soma check, the checker of the Soma programming language (soma explain E0036).

The rule

A start or connect line in a cell's runtime { } section names an interior cell that the enclosing cell does not declare; the error lists the interior cells that exist. Soma checks these names because the runtime section is run by soma run and a wrong name would otherwise go unnoticed. Use the exact name of a cell declared in the interior { } block.

A program that triggers it

wrong.cell

cell Shop {
    interior {
        cell Orders {
            face {
                signal order_placed(order_id: String, cents: Int)
            }
            on order_placed(order_id: String, cents: Int) {
                print("order {order_id}: {cents} cents")
            }
        }
    }
    runtime {
        start Order
        signal order_placed("ord-1", 4999)
    }
}

What soma check prints:

$ soma check wrong.cell
error: `start Order`: Shop has no interior cell named Order (interior cells: Orders)
  --> wrong.cell:13:9
   |
13 |         start Order
   |         ^
  = code: E0036
✗ 1 error(s), 0 warning(s).

The fix field of soma check --json: `start Order`: Shop has no interior cell named Order (interior cells: Orders)

On line 13, start Order becomes start Orders.

wrong.cell → right.cell

--- wrong.cell
+++ right.cell
@@ -11,5 +11,5 @@
     }
     runtime {
-        start Order
+        start Orders
         signal order_placed("ord-1", 4999)
     }

With the fix, soma check accepts the program:

$ soma check right.cell
✓ All checks passed.