✓
Passing Passing: the compiler rejects this program as expected.
Code
// Transitive gate: the entry module is NOT itself prototype, but it imports a
// module that IS (`app/lib/proto` carries `[prototype]`). A `--release` build
// must still reject it — the gate refuses a prototype module ANYWHERE in the
// import graph, not just the entry file. Drop --release and this runs (a dev
// build allows prototype dependencies).
import std/io
import app/lib/proto
app/lib/proto:greet(name: "world"): msg |> std/io:print.ln(msg)
Supporting Files
// A `[prototype]`-marked library module. It is COMPLETE (no holes) — the
// annotation alone is what a release build refuses; the entry that imports it
// cannot be released while this module carries `[prototype]`.
[prototype]
pub tor greet { name: string } -> string
greet -> name
Actual compiler output
error[KORU029]: imported module 'app.lib.proto' is marked ~[prototype] and cannot be built for release (--release) — a release build rejects any prototype module in the graph; make it release-clean or drop --release
--> /Users/larsde/src/koru/tests/regression/400_RUNTIME_FEATURES/400_164_release_rejects_imported_prototype/lib/proto.k:1:0
|
1 |
| ^
❌ Compiler coordination error: prototype module rejected in release build
(set KORU_BACKEND_TRACE=1 for the backend return trace)Must fail at runtime:
Program must error when executed.
Error output must contain
KORU029Flows
flow ~greet click a branch to expand · @labels scroll to their anchor
greet (name: "world")
Test Configuration
MUST_ERROR
Compiler Flags:
--release