✓
Passing This code compiles and runs correctly.
Code
// A module reached by two doors must still be ONE module.
//
// `orderlib` is a directory module; `orderlib/wid` is a submodule with two
// facets (wid.k contract + wid.kz implementation). The submodule arrives in
// the program twice:
// - enumerated as a dirent of the directory import (seen_stems merges the
// facets, but the canonical path used to be whichever dirent readdir
// surfaced first), and
// - resolved explicitly by index.kz's own `import orderlib/wid`, which picks
// the canonical facet by extension priority (.kz wins over .k).
//
// When those two picks disagreed — overlayfs serves pump.k before pump.kz,
// virtiofs the reverse — the dedup walls keyed on canonical path let both
// copies through and every decl emitted twice: the orisha HttpArena Linux
// image failed with 84 duplicate-member errors. The pin is the compile
// itself: a second `orderlib.wid` ModuleDecl makes emission collide.
import std/io
import app/orderlib
app/orderlib:top(): t |> std/io:print.ln("{{ t:s }}")
Supporting Files
const std = @import("std");
// The directory's own index file-imports its submodule — the same
// self-import shape as orisha/lib/index.k reaching for orisha/pump.
~import app/orderlib/wid
~pub tor top {} -> string
~proc top|zig {
return "top";
}
// Contract facet of the two-facet submodule: wid.k + wid.kz are ONE module.
pub tor ping {} -> string
const std = @import("std");
~proc ping|zig {
return "pong";
}
Actual
top
Must succeed:
Compile and run without errors.
Expected output
top
Flows
flow ~top click a branch to expand · @labels scroll to their anchor
top
Test Configuration
MUST_RUN
koru.json:
{
"paths": {
"std": "../../../../../koru_std",
"app": "{{ ENTRY }}"
}
}