milestone 18: collapse duplicated infrastructure into shared listener core, crud list helper, resource shells, transport race, name and line helpers, ui modules
CI / test (push) Successful in 1m22s
CI / test-aarch64 (push) Successful in 5m6s
CI / frontend (push) Successful in 45s
CI / cross (push) Successful in 7m53s
CI / docker (push) Failing after 1h10m57s

This commit is contained in:
2026-08-07 18:20:30 +02:00
parent c50c6d285a
commit 6f67940995
82 changed files with 3167 additions and 3114 deletions
+5 -13
View File
@@ -1530,20 +1530,12 @@ fn destroySnapshot(gpa: Allocator, snapshot: *matcher.Snapshot) void {
fn collectSample(r: *std.Io.Reader, w: *std.Io.Writer) error{ ReadFailed, WriteFailed }!void {
var considered: usize = 0;
while (considered < parsers.sample_lines) {
const raw = r.takeDelimiter('\n') catch |err| switch (err) {
// The stream is left unmodified here, so the line has to be stepped
// over or this loop never advances.
error.StreamTooLong => {
_ = r.discardDelimiterInclusive('\n') catch |discard_err| switch (discard_err) {
error.EndOfStream => return,
error.ReadFailed => return error.ReadFailed,
};
continue;
},
error.ReadFailed => return error.ReadFailed,
} orelse return;
const event = (try parsers.nextBoundedLine(r, compiler.max_line_len)) orelse return;
const raw = switch (event) {
.long_line => continue,
.line => |line| line,
};
if (raw.len > compiler.max_line_len) continue;
const line = std.mem.trim(u8, raw, &std.ascii.whitespace);
if (line.len == 0) continue;
if (parsers.isComment(line)) continue;