From d720cf44d458e3986d371f4b8b768a97ba489c9c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 20 Nov 2026 15:13:48 -0300 Subject: ninep: a retry of a held Edit write is answered by the listener from its hold, no step: serveFsInner's first lines read fs.edit_hold, which the session's listener sets between steps (9p_io), so a retried write was the session's step that answered it and every replica's step that ran the Edit again (the tape's divergence, and a client's second pipe); the check is EditHold.retried, which the listener calls before serveFs, and the step never reads the hold (fs.edit_hold stays the listener's, as the namespace's doc now says); test "a client runs an Edit a script's write started once, as its session does, when the held write is asked again" (core/replica.zig, a client joined, the write held as the listener holds it, its command answered, the retry as the listener serves it): diverged on the base ("the core called clock where the tape has a done (0), in serve_fs"), passes now; edit_cmd's held-write test retries through EditHold.retried; a user could hit it: a script's Edit with a | < or > command whose write's park is retried (a 9P client's retry while the command runs) under a far or window client: the client diverged and joined again Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- core/Core.zig | 6 ------ core/edit_cmd.zig | 4 ++-- core/fs.zig | 17 +++++++++++++---- core/replica.zig | 25 +++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 12 deletions(-) (limited to 'core') diff --git a/core/Core.zig b/core/Core.zig index ff704bc6..98e2e407 100644 --- a/core/Core.zig +++ b/core/Core.zig @@ -1571,12 +1571,6 @@ fn stepInner(p: *Pardes) void { /// local socket costs microseconds and not a vsync. pub const serveFs = pardes.tape.taped(serveFsInner); fn serveFsInner(p: *Pardes, req: ctlfs.Req) ctlfs.Reply { - // The held write of an Edit whose commands run, asked again by a - // retry of its park: still waiting, or its answer, never run twice. - if (p.fs.edit_hold) |*h| if (h.names(req)) { - if (!h.done) return .{ .tag = req.tag, .status = .again }; - return filesystem.EditHold.answer(&p.fs); - }; defer pardes.panes.File.syncTwins(p); if (!ctlfs.changesPane(p, req)) return ctlfs.handle(p, req); // An address, a limit or the mark flag is nothing drawn: a script's diff --git a/core/edit_cmd.zig b/core/edit_cmd.zig index 9a5c6865..ab4f2b5d 100644 --- a/core/edit_cmd.zig +++ b/core/edit_cmd.zig @@ -533,11 +533,11 @@ test "the held write asked again is parked again, then answered once, and a flus // As 9p_io holds it. p.fs.edit_hold = .{ .asker = @ptrCast(p), .slot = 0, .seq = 1, .tag = 7, .node = ctl, .handle = 0, .written = @intCast(req.data.len) }; // A retry of its park: still waiting, never run a second time. - try testing.expectEqual(tree.Status.again, p.serveFs(req).status); + try testing.expectEqual(tree.Status.again, filesystem.EditHold.retried(&p.fs, req).?.status); try testing.expect(p.pipe.edit_run != null); answer(p, &.{"a\nb\n"}); try testing.expect(p.fs.edit_hold.?.done); - const done = p.serveFs(req); + const done = filesystem.EditHold.retried(&p.fs, req).?; try testing.expectEqual(tree.Status.ok, done.status); try testing.expectEqual(@as(u32, @intCast(req.data.len)), done.written); try testing.expect(p.fs.edit_hold == null); diff --git a/core/fs.zig b/core/fs.zig index eadb7c19..a64487d6 100644 --- a/core/fs.zig +++ b/core/fs.zig @@ -830,6 +830,16 @@ pub const EditHold = struct { return req.op == .write and req.tag == h.tag and req.node == h.node and req.handle == h.handle; } + /// The held write asked again by a retry of its park, as the listener + /// answers it, never a step (no replica holds it): still waiting, or + /// its answer; null for any other request. + pub fn retried(ns: *Namespace, req: tree.Req) ?tree.Reply { + const h = if (ns.edit_hold) |*held| held else return null; + if (!h.names(req)) return null; + if (!h.done) return .{ .tag = req.tag, .status = .again }; + return answer(ns); + } + /// Its answer, the held record let go: the words copied out first. pub fn answer(ns: *Namespace) tree.Reply { const h = ns.edit_hold.?; @@ -852,9 +862,8 @@ pub const Namespace = struct { /// the server's (core/walk.zig): its sockets and the mounts (dumped /// on their own), the log and what a reader or a listener is answered /// with, and the request being served's own flags, set and read in - /// its step. ponytail: `edit_hold`, set by the session's listener - /// between steps and read by the retried write's step, is no - /// replica's (reports/pardes-faults-4.md). + /// its step, and `edit_hold`: the listener's, which answers a retry + /// of the held write from it, no step (`EditHold.retried`). pub const replica = .{ .authority = .{ "socket_path", "tcp_address", "mounts", "node_name", "os_paths", "out", @@ -932,7 +941,7 @@ pub const Namespace = struct { /// commands run off the loop (edit_cmd.zig): the listener holds it. edit_started: bool = false, /// That write, held: answered once `done` (9p_io answerHeld), or - /// asked again by a retry of its park (Pardes.serveFs); a flush or a + /// asked again by a retry of its park (`EditHold.retried`); a flush or a /// hang-up stops the Edit (9p_io watchEdit). edit_hold: ?EditHold = null, /// The words a held Edit write was refused with, kept for its answer. diff --git a/core/replica.zig b/core/replica.zig index ff1e138e..f3269c84 100644 --- a/core/replica.zig +++ b/core/replica.zig @@ -7364,6 +7364,31 @@ test "a client joined while a script's writes to a body are held to go in as one try n.agree(); } +test "a client runs an Edit a script's write started once, as its session does, when the held write is asked again" { + var n = try NinepJoin.init("b\na\n", TestHost.host()); + defer n.deinit(); + try n.join(); + const ctl = n.node(.ctl); + const req: pardes.ctlfs.Req = .{ .tag = 7, .op = .write, .node = ctl, .data = "Edit , | sort\n" }; + // The step alone: its loop's pass would run the command (here, with no + // host to run it, fail it). + const first = try n.serve(req, false); + try std.testing.expectEqual(pardes.ctlfs.Status.ok, first.status); + // The write held as the session's listener holds it (runtime/9p_io.zig). + n.a.core.fs.edit_hold = .{ .asker = @ptrCast(n.a.core), .slot = 0, .seq = 1, .tag = req.tag, .node = ctl, .handle = 0, .written = first.written }; + // Its command answers: the Edit is done. + n.a.apply(.{ .pipe_resp = .{ .id = n.a.core.pipe.edit_run.?.id, .success = true, .outputs = &.{"a\nb\n"} } }); + n.a.seq += 1; + try n.send(try n.a.unit(0, n.a.seq)); + try n.agree(); + // A retry of the held write's park, as the listener serves it: its + // answer from the hold, no step, the Edit not run again by anyone. + const again = pardes.filesystem.EditHold.retried(&n.a.core.fs, req) orelse try n.serve(req, true); + try std.testing.expectEqual(pardes.ctlfs.Status.ok, again.status); + try std.testing.expect(n.a.core.pipe.edit_run == null); + try n.agree(); +} + /// A session with a shell, for a run's 9P state across a join: a host /// whose pty takes the line and whose tty nobody else holds. const RunJoin = struct { -- cgit v1.3 From a2c5ad9cbd458693599831867b509a12b90ef99d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 20 Nov 2026 16:12:55 -0300 Subject: replica: the four process globals a 9P step was said to read, audited: config.tab_now is gone (the core's settings.tab is handed down, reports/pardes-globals.md); fs.last_reads is written by readHost, a tape site's host side (a replay is answered from the tape and never calls it) and read by the session host's watch (file_watch applyEffect, an effect only the session performs), so no replica writes or reads it; syntax.diff_pieces/diff_clock memo paintHunk by the language and the piece's bytes, from which each line's kind follows, and paint no digested state; selection_pipe.next_token: a client's Edit takes a token of its own process's, which differs from its session's, in pipe.edit_run, authority state (not digested) whose token only the session's listener uses (edit_cmd.cancel's stop): test "an Edit's stop token is each process's own (selection_pipe.next_token): a client's differs from its session's, and they agree"; root.zig's allowed_vars reasons hold, unchanged; no product change Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- core/replica.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'core') diff --git a/core/replica.zig b/core/replica.zig index f3269c84..617e1b4f 100644 --- a/core/replica.zig +++ b/core/replica.zig @@ -7389,6 +7389,17 @@ test "a client runs an Edit a script's write started once, as its session does, try n.agree(); } +test "an Edit's stop token is each process's own (selection_pipe.next_token): a client's differs from its session's, and they agree" { + var n = try NinepJoin.init("b\na\n", TestHost.host()); + defer n.deinit(); + try n.join(); + _ = try n.serve(.{ .tag = 1, .op = .write, .node = n.node(.ctl), .data = "Edit , | sort\n" }, false); + const session = n.a.core.pipe.edit_run.?.request.token; + const client = n.late.?.core().pipe.edit_run.?.request.token; + try std.testing.expect(session != client); + try n.agree(); +} + /// A session with a shell, for a run's 9P state across a join: a host /// whose pty takes the line and whose tty nobody else holds. const RunJoin = struct { -- cgit v1.3 From 06f6c72583faf8256190a0ae195a8085e7cd7f32 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 20 Nov 2026 16:12:55 -0300 Subject: build: syntax-test deleted, and a test whose grammar is not built skips: the step rooted the syntax module at core/syntax.zig, where dev/Host.zig's `pardes.Surface` does not resolve (it no longer compiled), and every test it ran (syntax.zig's, named "syntax ...") already runs in core-test (core's test program 904 tests with and without a reference added: the same), so the step and its line in docs/typ/building.typ go; under -Dgrammars=none core-test failed to compile (a handed-grammar test names zig's queries) and then 16 tests failed or crashed, under minimal one (a JSON file's paint): each now returns error.SkipZigTest when the set it needs is not built (syntax.zig's own `if (!full_grammars) return;` passed silently, now skips too; minimal_grammars and full_grammars made pub for Query, Stream and File's tests); core-test: full 874/1031 (157 skipped), minimal 861/1031 (170 skipped), none 835/1031 (196 skipped), none failing; `zig build syntax` (the snapshots) builds and runs Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- build/tools.zig | 13 ++----------- core/File.zig | 1 + core/Query.zig | 2 ++ core/Stream.zig | 2 ++ core/syntax.zig | 47 +++++++++++++++++++++++++++++++---------------- docs/typ/building.typ | 1 - 6 files changed, 38 insertions(+), 28 deletions(-) (limited to 'core') diff --git a/build/tools.zig b/build/tools.zig index a4b41dd7..2ed0e57e 100644 --- a/build/tools.zig +++ b/build/tools.zig @@ -229,8 +229,8 @@ pub fn add(b: *std.Build, c: struct { const fs_bench_step = b.step("fs-bench", "9P filesystem request cost and allocation count (-- [--json] [--reps N])"); fs_bench_step.dependOn(&run_fs_bench.step); - // The syntax module's own tests and snapshots, on the core without - // a terminal: its tests reach the editor's modes (modal.zig). + // The syntax module's snapshots, on the core without a terminal (its + // tests are core-test's, those named "syntax ..."). var syntax_cfg = c.lean; syntax_cfg.root = "core/syntax.zig"; const syntax_module = core.module(b, c.parts, syntax_cfg).root; @@ -239,15 +239,6 @@ pub fn add(b: *std.Build, c: struct { run_syntax.addPassthruArgs(); run_syntax.has_side_effects = true; b.step("syntax", "emit deterministic syntax snapshots (-- --bench: highlighting latency and allocations)").dependOn(&run_syntax.step); - const syntax_test = b.addTest(.{ - .root_module = syntax_module, - .filters = if (c.test_filters.len == 0) &.{"syntax "} else c.test_filters, - }); - const run_syntax_test = b.addRunArtifact(syntax_test); - run_syntax_test.has_side_effects = true; - const syntax_test_step = b.step("syntax-test", "test syntax correctness without building the editor"); - syntax_test_step.dependOn(&run_syntax_test.step); - if (testMatch(b, c.unit_profile, c.test_filters, syntax_test_step)) |check| check.addArtifactArg(syntax_test); // The library as a package that depends on pardes is given it // (`library`): test/consumer's own `zig build test`, over the packages diff --git a/core/File.zig b/core/File.zig index ceb6d03b..8a8c05de 100644 --- a/core/File.zig +++ b/core/File.zig @@ -2312,6 +2312,7 @@ test "a pager's text is a diff when it holds a diff header or a unified hunk" { } test "a long line is painted only around the caret" { + if (comptime !syntax.full_grammars) return error.SkipZigTest; // JSON's const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 24 }); defer p.deinit(); const line = try std.testing.allocator.alloc(u8, 600 << 10); diff --git a/core/Query.zig b/core/Query.zig index ebb44155..663095b0 100644 --- a/core/Query.zig +++ b/core/Query.zig @@ -2390,6 +2390,7 @@ test "Grep: lines of the files under the owner's directory, under their file; Al } test "* seeds line 1 and keeps the keyboard; SPC b b picks a pane, SPC s s a declaration" { + if (comptime !syntax.minimal_grammars) return error.SkipZigTest; const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 48 }); defer p.deinit(); const pane = try p.setTestFile("const alpha = 1;\nfn beta() void {\n _ = alpha;\n}\nfn gamma() void {}\n"); @@ -2624,6 +2625,7 @@ test "a query row's place is its text: the match tinted after it, B3 on it opens } test "the +Preview: the query's hits in its file are its places, the row's one current and selected, coloured as the file is" { + if (comptime !syntax.minimal_grammars) return error.SkipZigTest; var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); const text = "const needle = 1;\nconst hay = 2;\nfn f() void {\n _ = needle;\n}\npub const needle_too = needle;\n"; diff --git a/core/Stream.zig b/core/Stream.zig index 1f4a7405..a04cad46 100644 --- a/core/Stream.zig +++ b/core/Stream.zig @@ -1266,6 +1266,7 @@ test "Stream: the listing of files for Find on a worker, a cap of hits stops the } test "Stream: a big text's declarations are parsed on a worker, never the loop, and the rows of its / regroup under them" { + if (comptime !syntax.minimal_grammars) return error.SkipZigTest; const p = try Pardes.init(testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 40 }); defer p.deinit(); var text: std.ArrayList(u8) = .empty; @@ -1304,6 +1305,7 @@ test "Stream: a big text's declarations are parsed on a worker, never the loop, } test "Stream: a scroll's colours are painted ahead on a worker, so PageDown after PageDown parses nothing on the frame" { + if (comptime !syntax.minimal_grammars) return error.SkipZigTest; const p = try Pardes.init(testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 40 }); defer p.deinit(); var text: std.ArrayList(u8) = .empty; diff --git a/core/syntax.zig b/core/syntax.zig index 19831ec2..00ee497f 100644 --- a/core/syntax.zig +++ b/core/syntax.zig @@ -7,8 +7,10 @@ const regexp = @import("regexp.zig"); const c_heap = @import("c_heap"); const diff = @import("diff.zig"); -const minimal_grammars = config.grammars != .none; -const full_grammars = config.grammars == .full; +/// The grammar sets built (`-Dgrammars`): a test that needs a grammar +/// not built skips. +pub const minimal_grammars = config.grammars != .none; +pub const full_grammars = config.grammars == .full; pub const ts = @import("tree-sitter"); const ts_queries = @import("ts_queries"); @@ -1260,6 +1262,7 @@ test "every vendored textobject and indent query compiles against its grammar" { } test "syntax context nested Zig containers and multiline function signatures" { + if (comptime !minimal_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); @@ -1291,7 +1294,7 @@ test "syntax context nested Zig containers and multiline function signatures" { } test "syntax context Python class and function body excludes first statement" { - if (!full_grammars) return; + if (!full_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); @@ -1304,6 +1307,7 @@ test "syntax context Python class and function body excludes first statement" { } test "syntax context multiline bindings and C++ namespaces preserve declaration starts" { + if (comptime !minimal_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); @@ -1313,7 +1317,7 @@ test "syntax context multiline bindings and C++ namespaces preserve declaration try std.testing.expectEqual(@as(usize, 1), zig_declarations.len); try std.testing.expectEqual(@as(usize, 0), zig_declarations[0].start_line); try std.testing.expectEqual(@as(usize, 1), zig_declarations[0].header_end_line); - if (!minimal_grammars) return; + if (!minimal_grammars) return error.SkipZigTest; const cpp_source = "namespace example {\nstruct Outer {\n int run() {\n return 1;\n }\n};\n}\n"; const cpp_declarations = try contextDeclarations(gpa, "nested.cpp", cpp_source); defer gpa.free(cpp_declarations); @@ -1325,7 +1329,7 @@ test "syntax context multiline bindings and C++ namespaces preserve declaration } test "syntax context Rust modules impls and methods remain nested" { - if (!full_grammars) return; + if (!full_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); @@ -1341,7 +1345,7 @@ test "syntax context Rust modules impls and methods remain nested" { } test "syntax formatted locations color hidden context and preserve multiline source" { - if (!minimal_grammars) return; + if (!minimal_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); @@ -1366,7 +1370,7 @@ test "syntax formatted locations color hidden context and preserve multiline sou } test "syntax formatted locations separate alignment from Markdown indentation" { - if (!full_grammars) return; + if (!full_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); @@ -1382,6 +1386,7 @@ test "syntax formatted locations separate alignment from Markdown indentation" { } test "syntax a results row is coloured by the file its location names" { + if (comptime !minimal_grammars) return error.SkipZigTest; start(std.testing.allocator); defer stop(); const gpa = std.testing.allocator; @@ -1431,7 +1436,7 @@ test "syntax codeAfterLocation takes whole-token locations and nothing else" { } test "syntax default full grammar set highlights Typst source" { - if (!full_grammars) return; + if (!full_grammars) return error.SkipZigTest; start(std.testing.allocator); defer stop(); @@ -1454,7 +1459,7 @@ test "syntax default full grammar set highlights Typst source" { } test "syntax Typst markup constructs paint and raw blocks inject their language" { - if (!full_grammars) return; + if (!full_grammars) return error.SkipZigTest; start(std.testing.allocator); defer stop(); @@ -1498,7 +1503,7 @@ test "syntax Typst markup constructs paint and raw blocks inject their language" } test "syntax markdown highlights markup, injects inline spans and fenced code blocks" { - if (!full_grammars) return; + if (!full_grammars) return error.SkipZigTest; start(std.testing.allocator); defer stop(); @@ -1530,7 +1535,7 @@ test "syntax markdown highlights markup, injects inline spans and fenced code bl } test "syntax inline fast path agrees with full Markdown query" { - if (!full_grammars) return; + if (!full_grammars) return error.SkipZigTest; start(std.testing.allocator); defer stop(); const selected = (try forLang("markdown_inline")).?; @@ -1577,7 +1582,7 @@ test "syntax inline fast path agrees with full Markdown query" { } test "syntax plain Markdown keeps block styles without starting the inline parser" { - if (!full_grammars) return; + if (!full_grammars) return error.SkipZigTest; start(std.testing.allocator); defer stop(); const source = "# Heading\n\nPlain prose.\n\n indented code\n"; @@ -1619,6 +1624,7 @@ test "syntax highlightDiff colors unified diff lines by prefix" { } test "syntax a Zig hunk is coloured as Zig, each side parsed whole" { + if (comptime !minimal_grammars) return error.SkipZigTest; start(std.testing.allocator); defer stop(); const diff_text = @@ -1659,7 +1665,7 @@ test "syntax a Zig hunk is coloured as Zig, each side parsed whole" { } test "syntax a Python hunk is coloured as Python" { - if (!full_grammars) return; + if (!full_grammars) return error.SkipZigTest; start(std.testing.allocator); defer stop(); const diff_text = @@ -1680,6 +1686,7 @@ test "syntax a Python hunk is coloured as Python" { } test "syntax a deleted file's lines are coloured in its language" { + if (comptime !minimal_grammars) return error.SkipZigTest; start(std.testing.allocator); defer stop(); const diff_text = @@ -1715,6 +1722,7 @@ test "syntax a hunk in no known language keeps the line colours" { } test "syntax git diff output in a command pane is told and coloured by its rows" { + if (comptime !minimal_grammars) return error.SkipZigTest; start(std.testing.allocator); defer stop(); // A command pane's rows: its command line, then git's output, with one @@ -1747,6 +1755,7 @@ test "syntax git diff output in a command pane is told and coloured by its rows" } test "syntax a section's small hunks share one parse" { + if (comptime !minimal_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); @@ -1768,6 +1777,7 @@ test "syntax a section's small hunks share one parse" { } test "syntax a hunk painted once is kept, and a long one is parsed in pieces" { + if (comptime !minimal_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); @@ -1856,6 +1866,7 @@ test "syntax query filtering preserves upstream colors" { } test "syntax Zig keyword captures cover both bytes beyond line ten thousand" { + if (comptime !minimal_grammars) return error.SkipZigTest; start(std.testing.allocator); defer stop(); const code = "pub fn main() void {\n if (true) return;\n}\n"; @@ -1873,6 +1884,7 @@ test "syntax Zig keyword captures cover both bytes beyond line ten thousand" { } test "syntax allocator switching clears default-runtime caches" { + if (comptime !minimal_grammars) return error.SkipZigTest; const source = "fn main() void {}"; const initial = try highlightFileRange(std.testing.allocator, "a.zig", source, 0, source.len); std.testing.allocator.free(initial); @@ -1888,7 +1900,7 @@ test "syntax allocator switching clears default-runtime caches" { } test "syntax location context snapshots retain omitted multiline comment scope" { - if (!minimal_grammars) return; + if (!minimal_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); @@ -1914,6 +1926,7 @@ test "syntax location context snapshots retain omitted multiline comment scope" } test "syntax declaration locations clear snapshots without muting ordinary context" { + if (comptime !minimal_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); @@ -1933,7 +1946,7 @@ test "syntax declaration locations clear snapshots without muting ordinary conte } test "syntax stacked addresses do not split multiline source groups" { - if (!minimal_grammars) return; + if (!minimal_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); @@ -2018,7 +2031,7 @@ test "syntax source analysis preserves declarations and injected colors" { } test "tables are the pipe_tables tree-sitter finds" { - if (!full_grammars) return; + if (!full_grammars) return error.SkipZigTest; start(std.testing.allocator); defer stop(); const Tables = @import("Tables.zig"); @@ -2087,6 +2100,7 @@ test "tables are the pipe_tables tree-sitter finds" { } test "a kept tree told its edits parses to the fresh parse's tree, places and all" { + if (comptime !minimal_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; const a = "const std = @import(\"std\");\n\nfn f(x: u32) u32 {\n return x;\n}\n\ntest \"t\" {\n _ = f(1);\n}\n"; const old_tree = parseTree("a.zig", a, null) orelse return error.NoTree; @@ -2126,6 +2140,7 @@ test "a kept tree told its edits parses to the fresh parse's tree, places and al } test "syntax: a grammar handed in at run time colours and walks as the one compiled in" { + if (comptime !minimal_grammars) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); diff --git a/docs/typ/building.typ b/docs/typ/building.typ index d4732fa9..1eb0f9b5 100644 --- a/docs/typ/building.typ +++ b/docs/typ/building.typ @@ -197,7 +197,6 @@ zig build kitty-test kitty graphics conformance of terminal panes, at the zig build kitty-harness kitty graphics through a pane end to end (a fake kitty terminal outside on the tui, the GPU capture on the gui; kitten icat and chafa too when installed) -zig build syntax-test tree-sitter tests without building the editor zig build syntax deterministic per-byte highlighting snapshots zig build lib-test the library, from a package that depends on pardes (test/consumer); unit-test runs it too -- cgit v1.3