From 55a5f91305df47cd56d7776f4193b6198208e891 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 19 Nov 2026 22:17:29 -0300 Subject: build: the dead and the doubled options go (the start design's step 1, pardes-build-options change 1): `ShellConfig.prebuilt_shaders`, set at build.zig:147 and read nowhere (the `-Dprebuilt-shaders` flag stays: gui.make hands it to sketchbook and the perf identity names it); `tools.add` and `core.assemble` handed the grammar set and -Dtracy beside the `shell_cfg` that holds them (`ShellConfig.tracy` is the checkout's path now, so Parts and the perf identity read it there); `syntax_zig_grammar`, always equal to `syntax_highlighting`; and the four `syntax_*` bools as the one enum they said four ways, `grammars` (`-Dtree-sitter`'s `TreeSitterGrammars`), read by syntax.zig, Output.zig's Build pane and three tests, with abi/wire.zig hashing it as the four words it was hashed as, so `pardes version`'s semantics line did not move on any product (38b5ae573b965550 on tui, gui, the bare build's two, both statics, FreeBSD; d41689a1f97605b8 with -Dtree-sitter=minimal, as on the base); build.zig and build/ 3,005 -> 2,992 lines; every shape configures (12 configurations) and builds as on the base (tui, gui, bare, the macOS library for Linux and aarch64-macos, static on musl and on the window, FreeBSD, -Dtree-sitter=minimal), and the two that fail on the base fail with the same errors (pardes-isolate: core/builtins.zig:510, core/ninep/ctl.zig:1298; -Dtree-sitter=disabled: core/indent.zig:48); tui core-test 848/991 (143 skipped), shell-test 1027/1030, pane-test 183/184, behaviour-test 275/275 (and -- --replay), term-test 15/15, kitty-test 45/45, lib-test, hxlib 538 cases 0 mismatches, process-test 3 of 144 failed (lspcomplete and lspcompletemoved, the base's, and headersweep-restored, on the flaky list: passed alone, 1364 ms), gui unit-test 1625/1629 (the perf check's BaselineHarnessMismatch, the base's); the test names of every suite equal the base's (ledger); load 15-45 on 16 cores Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- core/syntax.zig | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'core/syntax.zig') diff --git a/core/syntax.zig b/core/syntax.zig index f95b745a..36aa8c2b 100644 --- a/core/syntax.zig +++ b/core/syntax.zig @@ -7,10 +7,9 @@ const regexp = @import("regexp.zig"); const c_heap = @import("c_heap"); const diff = @import("diff.zig"); -pub const enabled = config.syntax_highlighting; -const zig_grammar = config.syntax_zig_grammar; -const minimal_grammars = config.syntax_minimal_grammars; -const full_grammars = config.syntax_full_grammars; +pub const enabled = config.grammars != .disabled; +const minimal_grammars = config.grammars == .minimal or config.grammars == .full; +const full_grammars = config.grammars == .full; pub const ts = if (enabled) @import("tree-sitter") else struct { pub const Language = opaque {}; @@ -44,7 +43,7 @@ const Spec = struct { fn grammarSelected(comptime g: grammar_manifest.Grammar) bool { return switch (g.tier) { - .zig => zig_grammar, + .zig => enabled, .minimal => minimal_grammars, .full => full_grammars, }; @@ -2169,7 +2168,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 (!zig_grammar) return error.SkipZigTest; + if (!enabled) return error.SkipZigTest; const gpa = std.testing.allocator; start(gpa); defer stop(); -- cgit v1.3