○
Planned This feature is planned but not yet implemented.
Cross-module comptime continuation missing raw AST fields (invocation, item) — emitArgs() injects program/allocator by name but has no mechanism for *const Invocation/*const Item pointers that transform events require
Code
// TEST: Cross-module comptime call site must include all handler fields
//
// When a [comptime|norun] event is in an imported module and its flow
// contains continuations that call other events (e.g. std.io:print.ln),
// the emitted comptime call site must pass ALL fields the handler expects.
//
// KNOWN BUG: Same-file comptime calls pass all five fields:
// .{ .expr = "...", .program = program, .allocator = allocator,
// .invocation = ..., .item = ... }
// But cross-module comptime calls only emit three:
// .{ .expr = "...", .program = program, .allocator = allocator }
// Missing: invocation and item.
//
// This is Bug 1 from the cross-module comptime emission path.
// See also: 210_056 (dispatch fix), 210_058 (return type fix)
// Real-world reproducer: koru-libs/pq/examples/02_sql.kz
~import "$app/comptime_lib"
~import "$std/io"
~[comptime] app.comptime_lib:greet(name: "world")
| ok msg |> std.io:print.ln("{{msg}}")
Imported Files
// Library module with a [comptime|norun] event that has branches.
//
// The flow in input.kz uses a continuation (print.ln) after the | ok branch.
// This forces the emitter to generate a call site for print.ln inside
// the comptime flow — which is where the missing fields bug manifests.
const std = @import("std");
~[comptime|norun] pub event greet { name: []const u8 }
| ok { msg: []const u8 }
~proc greet {
_ = name;
return .{ .ok = .{ .msg = "hello" } };
}