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 --- core/Query.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/Query.zig') 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"; -- cgit v1.3