✗
Failing This test is currently failing.
Failed: backend
Failure Output
Showing last 10 of 17 lines
pub const Input = struct {
^~~~~~
referenced by:
handler: backend_output_emitted.zig:1220:74
koru_coordinate: backend_output_emitted.zig:12313:67
6 reference(s) hidden; use '-freference-trace=8' to see all references
error: the following command failed with 1 compilation errors:
/opt/homebrew/Cellar/zig/0.15.2_1/bin/zig build-exe -ODebug --dep backend_output --dep ast --dep ast_json --dep compiler_env --dep ast_functional --dep ast_serializer --dep log --dep emitter_helpers --dep tap_registry --dep runtime_registry --dep tap_transformer --dep template_processor --dep visitor_emitter --dep parser --dep expression_parser --dep comptime_eval --dep emit_build_zig --dep post_transform_weld --dep shape_checker --dep flow_checker --dep ast_transform --dep recurrence_collapse --dep release_gate --dep phantom_semantic_checker --dep auto_discharge_inserter --dep dead_strip --dep purity_analyzer --dep errors --dep type_registry --dep annotation_parser --dep transform_pass_runner --dep codegen_utils --dep continuation_codegen --dep template_utils --dep liquid --dep struct_literal --dep site_hash -Mroot=/Users/larsde/src/koru/tests/regression/400_RUNTIME_FEATURES/430_COORDINATION/430_008_pipeline_profiling/backend.zig -ODebug --dep ast --dep regex_engine --dep log --dep emitter_helpers --dep compiler_env --dep tap_registry --dep annotation_parser --dep type_registry --dep codegen_utils --dep transform_pass_runner --dep parser --dep ast_functional --dep flow_checker --dep ast_transform --dep recurrence_collapse --dep shape_checker --dep release_gate --dep phantom_semantic_checker --dep auto_discharge_inserter --dep dead_strip --dep purity_analyzer --dep visitor_emitter --dep js_emitter --dep cs_emitter --dep emit_build_zig --dep post_transform_weld --dep ast_serializer --dep runtime_registry --dep tap_transformer --dep template_processor --dep expression_parser --dep comptime_eval --dep errors --dep continuation_codegen --dep template_utils --dep liquid --dep struct_literal --dep site_hash --dep ast_printer --dep keyword_registry -Mbackend_output=/Users/larsde/src/koru/tests/regression/400_RUNTIME_FEATURES/430_COORDINATION/430_008_pipeline_profiling/backend_output_emitted.zig -ODebug --dep errors --dep glob_pattern_matcher -Mast=/Users/larsde/src/koru/src/ast.zig -ODebug --dep ast -Mast_json=/Users/larsde/src/koru/src/ast_json.zig -ODebug -Mcompiler_env=/Users/larsde/src/koru/src/compiler_env.zig -ODebug --dep ast -Mast_functional=/Users/larsde/src/koru/src/ast_functional.zig -ODebug --dep ast -Mast_serializer=/Users/larsde/src/koru/src/ast_serializer.zig -ODebug -Mlog=/Users/larsde/src/koru/src/log.zig -ODebug --dep ast --dep errors --dep log --dep compiler_config --dep type_registry --dep codegen_utils --dep annotation_parser --dep struct_literal --dep tap_registry --dep compiler_passes/purity_helpers -Memitter_helpers=/Users/larsde/src/koru/src/emitter_helpers.zig -ODebug --dep ast --dep errors --dep log --dep glob_pattern_matcher -Mtap_registry=/Users/larsde/src/koru/src/tap_registry.zig -ODebug -Mruntime_registry=/Users/larsde/src/koru/src/runtime_registry.zig -ODebug --dep ast --dep log --dep tap_registry --dep emitter_helpers --dep compiler_passes/purity_helpers -Mtap_transformer=/Users/larsde/src/koru/src/tap_transformer.zig -ODebug --dep ast --dep liquid --dep log --dep errors --dep annotation_parser --dep struct_literal --dep codegen_utils -Mtemplate_processor=/Users/larsde/src/koru/src/template_processor.zig -ODebug --dep ast --dep log --dep emitter_helpers --dep tap_registry --dep type_registry --dep annotation_parser --dep codegen_utils --dep file_types --dep comptime_eval --dep struct_literal -Mvisitor_emitter=/Users/larsde/src/koru/src/visitor_emitter.zig -ODebug --dep ast --dep ast_mangle --dep lexer --dep errors --dep log --dep type_registry --dep expression_parser --dep comptime_eval --dep annotation_parser --dep union_collector --dep module_resolver --dep file_types --dep struct_literal -Mparser=/Users/larsde/src/koru/src/parser.zig -ODebug --dep lexer --dep ast -Mexpression_parser=/Users/larsde/src/koru/src/expression_parser.zig -ODebug --dep ast --dep expression_parser -Mcomptime_eval=/Users/larsde/src/koru/src/comptime_eval.zig -ODebug --dep log -Memit_build_zig=/Users/larsde/src/koru/src/emit_build_zig.zig -ODebug --dep ast --dep config --dep module_resolver --dep import_pipeline --dep compiler_requires --dep emit_build_zig --dep log --dep compiler_env --dep canonicalize_names -Mpost_transform_weld=/Users/larsde/src/koru/src/post_transform_weld.zig -ODebug --dep ast --dep errors --dep log --dep phantom_parser --dep type_inference --dep branch_checker --dep type_registry --dep glob_pattern_matcher -Mshape_checker=/Users/larsde/src/koru/src/shape_checker.zig -ODebug --dep ast --dep errors --dep log --dep branch_checker --dep annotation_parser --dep expression_parser --dep phantom_parser --dep struct_literal -Mflow_checker=/Users/larsde/src/koru/src/flow_checker.zig -ODebug --dep ast --dep errors -Mast_transform=/Users/larsde/src/koru/src/ast_transform.zig -ODebug --dep ast -Mrecurrence_collapse=/Users/larsde/src/koru/src/recurrence_collapse.zig -ODebug --dep ast --dep errors -Mrelease_gate=/Users/larsde/src/koru/src/release_gate.zig -ODebug --dep ast --dep errors --dep log --dep phantom_parser --dep ast_functional -Mphantom_semantic_checker=/Users/larsde/src/koru/src/phantom_semantic_checker.zig -ODebug --dep ast --dep ast_functional --dep errors --dep log --dep phantom_parser --dep annotation_parser --dep template_processor -Mauto_discharge_inserter=/Users/larsde/src/koru/src/auto_discharge_inserter.zig -ODebug --dep ast --dep log -Mdead_strip=/Users/larsde/src/koru/src/dead_strip.zig -ODebug --dep ast -Mpurity_analyzer=/Users/larsde/src/koru/src/compiler_passes/purity_analyzer.zig -ODebug -Merrors=/Users/larsde/src/koru/src/errors.zig -ODebug --dep ast --dep log -Mtype_registry=/Users/larsde/src/koru/src/type_registry.zig -ODebug -Mannotation_parser=/Users/larsde/src/koru/src/annotation_parser.zig -ODebug --dep ast --dep log --dep annotation_parser --dep template_utils --dep ast_functional --dep liquid --dep glob_pattern_matcher -Mtransform_pass_runner=/Users/larsde/src/koru/src/transform_pass_runner.zig -ODebug -Mcodegen_utils=/Users/larsde/src/koru/src/codegen_utils.zig -ODebug --dep ast --dep codegen_utils -Mcontinuation_codegen=/Users/larsde/src/koru/src/continuation_codegen.zig -ODebug --dep ast -Mtemplate_utils=/Users/larsde/src/koru/src/template_utils.zig -ODebug -Mliquid=/Users/larsde/src/koru/src/liquid.zig -ODebug --dep liquid -Mstruct_literal=/Users/larsde/src/koru/src/struct_literal.zig -ODebug --dep ast --dep errors -Msite_hash=/Users/larsde/src/koru/src/site_hash.zig -ODebug -Mregex_engine=/Users/larsde/src/koru/src/regex_engine.zig -ODebug --dep ast --dep log --dep file_types --dep annotation_parser --dep struct_literal --dep codegen_utils -Mjs_emitter=/Users/larsde/src/koru/src/js_emitter.zig -ODebug --dep ast --dep log --dep file_types --dep annotation_parser --dep struct_literal --dep codegen_utils --dep emitter_helpers -Mcs_emitter=/Users/larsde/src/koru/src/cs_emitter.zig -ODebug --dep ast -Mast_printer=/Users/larsde/src/koru/src/ast_printer.zig -ODebug --dep ast --dep log --dep annotation_parser -Mkeyword_registry=/Users/larsde/src/koru/src/keyword_registry.zig -ODebug -Mglob_pattern_matcher=/Users/larsde/src/koru/src/glob_pattern_matcher.zig -ODebug -Mcompiler_config=/Users/larsde/src/koru/src/compiler_config.zig -ODebug --dep ast --dep lexe
... [truncated - 10KB total] Code
// Test 430_008: Pipeline Profiling - Time Frontend Pass
//
// Override the elaborate pass to add timing using std/time.
import std/compiler
import std/time
import std/io
// ============================================================================
// TIMED FRONTEND (using stdlib!)
// ============================================================================
std/compiler:elaborate = std/time:now(): start |> std/compiler:elaborate.default(ctx): c |> std/time:report(start, label: "elaborate") -> c
// The actual program
std/io:print.ln("Compiled with timed elaborate!")
Actual
Compiled with timed elaborate!
Expected output
✓ Zig✓ C#Compiled with timed elaborate!
Emitted C# source
static class main_module {
public static void __koru_stdout_write(object s) => global::System.Console.Out.Write(s);
public static void __koru_stderr_write(object s) => global::System.Console.Error.Write(s);
// The mutable handle carrier — `*String`-style resources are
// `new __KoruBox { data = … }` because C# anonymous types are
// read-only: `s.data = …` (std/string append/clear, handle
// mutation generally) needs a settable member. `object`, not
// `dynamic`: the field is storage — every `x.data` read reaches
// it through a dynamic-typed handle (`*T` Input fields, the
// `dynamic` borrow locals below), so the member itself only
// needs to hold the value, and `object` keeps the DLR out of
// the store/load path.
public class __KoruBox { public object data; }
// Textification for `{{ … }}` operands: C# bool ToStrings as
// `True` where Koru prints `true`, and the operand's static type
// is unknown at this boundary — a `(x) is bool` inline test would
// be a compile error on statically-typed operands instead. Generic
// on purpose: `dynamic` boxed every value-type operand — measured
// ~1s/10M elements on 012_threat_scanner — while T specializes to
// the operand's own ToString() with no box.
public static string __koru_str<T>(T v) => v is bool b ? (b ? "true" : "false") : v?.ToString();
public static class std_io_print_impl_event {
public struct Input {
public string expr;
}
public static object handler(Input __koru_input) {
throw new global::System.Exception("std.io:impl has no C# implementation — its body resolves only to a non-cs target (|zig / [comptime]), directly or through a callee");
}
}
public static class koru_start_event {
public struct Input {
}
public struct Output {
public string tag;
public object done;
}
public static Output handler(Input __koru_input) => new Output { tag = "done" };
}
public static class koru_end_event {
public struct Input {
}
public struct Output {
public string tag;
public object done;
}
public static Output handler(Input __koru_input) => new Output { tag = "done" };
}
public static void flow0() {
__koru_stdout_write("Compiled with timed elaborate!" + "\n");
}
public static void flow1() {
main_module.koru_start_event.handler(new koru_start_event.Input { });
}
public static void flow2() {
main_module.koru_end_event.handler(new koru_end_event.Input { });
}
}
static class Program {
static void Main() {
main_module.flow1();
main_module.flow0();
main_module.flow2();
}
}
Flows
subflow ~elaborate click a branch to expand · @labels scroll to their anchor
now
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "Compiled with timed elaborate!")
Test Configuration
MUST_RUN LANGUAGES: zig cs
Post-validation Script:
#!/bin/bash
# Post-validation: Verify elaborate timing output
set -e
if [ ! -f "backend.err" ]; then
echo "❌ FAIL: No backend.err file found"
exit 1
fi
# Check for elaborate timing
if ! grep -q "⏱️ elaborate:" backend.err; then
echo "❌ FAIL: No elaborate timing found"
exit 1
fi
# Extract and display the timing
TIMING=$(grep "⏱️ elaborate:" backend.err)
echo "✅ Elaborate timing found: $TIMING"
exit 0