✗
Failing This test is currently failing.
Failed: backend
Failure Output
Showing last 10 of 25 lines
Build Summary: 0/3 steps succeeded; 1 failed
install transitive failure
+- install backend transitive failure
+- compile exe backend Debug native 1 errors
error: the following build command failed with exit code 1:
.zig-cache/o/8d507085eb057e36129b79f4fa
... [truncated - 8KB total] Code
// Test: Does ~log.error match the glob pattern log.* ?
//
// This test verifies that invocations can match glob pattern events:
// - ~log.error(...) should match the glob event log.*
// - The transform should run and replace the invocation
//
// The transform replaces the invocation with a simple inline print.
// Glob pattern transform event - matches any log.* invocation
~[comptime|transform]pub tor log.* {
expr: Expression,
item: *const Item,
program: *const Program,
} -> SiteResult
// Transform proc - replaces invocation with inline comment
~proc log.*|zig {
const ast = @import("ast");
const allocator = @import("std").heap.page_allocator;
// Get the flow from the item
const flow = if (item.* == .flow) &item.flow else return .{};
// Create inline code to replace the flow (simple comment, no keywords)
const inline_code_item = ast.Item{
.inline_code = .{
.code = "// glob transform ran",
.location = flow.location,
.module = allocator.dupe(u8, flow.module) catch return .{ .transformed = .{} },
},
};
return .{ .replacement = inline_code_item };
}
// This invocation should match log.* glob pattern
~log.error("Something went wrong")
Flows
flow ~log.error click a branch to expand · @labels scroll to their anchor
log.error ("Something went wrong")