E0114: load
E0114 load — the program does not load: an import, a manifest or a file it needs.
A compile-time error of soma check, the checker of the Soma programming language (soma explain E0114).
The rule
use name loads name.cell beside the program, use lib::name loads lib/name.cell, and otherwise an installed package; when none of these exists the program does not load, and soma check stops with E0114. The plain output prints which files it looked for, without the code; soma check --json gives the code E0114 but only the message "the program does not load (details on stderr)". Name the module after its file: here the file is pricing.cell, so the line is use pricing.
A program that triggers it
wrong.cell
use prices
cell Checkout {
face {
signal total(cents: List<Int>) -> Int
}
on total(cents: List<Int>) {
let net = 0
for c in cents { net += c }
return with_vat(net)
}
}What soma check prints:
$ soma check wrong.cell
error: `use prices` — no file prices.cell beside the program, no lib/prices.cell (`use lib::prices`), and no installed package 'prices' (`soma install`)The fix
On line 1, use prices becomes use pricing.
wrong.cell → right.cell
--- wrong.cell
+++ right.cell
@@ -1,3 +1,3 @@
-use prices
+use pricing
cell Checkout {With the fix, soma check accepts the program:
$ soma check right.cell
✓ All checks passed.