✓
Passing Passing: the compiler rejects this program as expected.
Code
// Reaching for `std/net` refuses, and the refusal names where the real surface
// lives.
//
// `std/net` declares a socket vocabulary that koru_std does not implement. The
// shape this pins is that an unimplemented surface fails LOUDLY and carries an
// address — not that it is absent. A program asking for `tcp.listen` is told to
// use Orisha for a server and `koru/curl` for a client.
//
// The refusal is on USE, not on import: a program may import the module and
// still build, so the module can carry its declarations and its teaching.
// 670_002 pins that half.
import std/io
import std/net
std/net:tcp.listen(port: 8080)
| listening l |> std/io:print.ln("listening")
| error e |> std/io:print.ln("error")
Actual compiler output
🎯 Compiler coordination: Passes: 20 (flow-based: elaborate, analysis, emission)
Error: output_emitted.zig:139:21: error: std/net:tcp.listen is not implemented. For an HTTP server use Orisha (~orisha:serve(port:)); for an HTTP client use koru/curl. There is no socket surface in koru_std.
@compileError("std/net:tcp.listen is not implemented. For an HTTP server use Orisha (~orisha:serve(port:)); for an HTTP client use koru/curl. There is no socket surface in koru_std.");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
handler [inlined]: output_emitted.zig:130:43
flow0: output_emitted.zig:95:68
4 reference(s) hidden; use '-freference-trace=6' to see all referencesMust contain:
std/net:tcp.listen is not implementedFlows
flow ~tcp.listen click a branch to expand · @labels scroll to their anchor
tcp.listen (port: 8080)
Test Configuration
MUST_ERROR