summaryrefslogtreecommitdiff
path: root/build/process.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 13:35:31 -0300
committerGabriel Schneider <[email protected]>2026-11-17 13:45:32 -0300
commit7a1c66f1a15911763db42d890e9e8172fe404170 (patch)
tree2604fc13399b96b091af1350bc6b78d6e0a9f89a /build/process.zig
parente5c57a863004914136c4e6b0fa13ed805b3b383d (diff)
downloadpardes-7a1c66f1a15911763db42d890e9e8172fe404170.tar.gz
pardes-7a1c66f1a15911763db42d890e9e8172fe404170.zip
build: the core named once (core.module), the window's pieces made once
build/core.zig's module() makes every core: the shell, the core, the core without the terminal (core-test), pardes-isolate, the static, the bare build's window, the syntax module's (syntax-test) and the 9P test roots; each import and library a core takes is written there once, in the order the fold over core_mods and wireCore gave them, so every compile keeps its inputs. Parts holds what a core is made of, Core the few ways the products differ. Tracy's client and BSD libutil stay where they were (Tracy: the shell and the core; libutil: the shell), now said by a field. Gone: the core_mods fold and its buffers, wireCore and its eleven optional fields, the 9P roots' copies of core_module's import table and link objects. The editor library's and pardes-syntax's import lists are written out in full (editorModule, library.zig); TreeSitter.wire adds the grammars; ShellConfig has defaults, so the library's two literals are one. build/gui.zig's make() builds SDL, gui_c, sketchbook's renderer, HarfBuzz and the renderer's and atlas's tests once, and Window.wire links them into each window shell. One pardes-lspmock (tests and process-test shared it twice from one root); tools.program() makes the eleven uniform runner programs in a line each. The pdf benches (tools.pdfBenches) are made once the core is. Gates: zig build -l and -h byte-identical to the base over the matrix (bare, tui, gui, macos, ReleaseFast, -Dpdf=false, -Dtree-sitter=minimal, musl, -Dtracy), test/lib's configuration byte-identical. Warm rebuild of install addons and core-test shell-test unit-test process-test on the base's cache: tui every compile cached (0 rebuilt), 2339/2486 tests passed with the base's 4 known failures, the same counts as the base; gui one change: SDL3 had -DSDL_DISABLE_STB=1 added once per window shell (twice with -Dplatform=gui), now once, so libSDL3.a's cache path moves and pardes-gui and the shell-test root relink (their argv differ in that one path, nothing else); tests 2398/2545, as the base. Installed bin/pardes, image.so and pdf.so cmp-identical on tui; image.so and pdf.so identical on gui, pardes-gui differs by the relinked SDL3 (size 398,737,210 -> 398,733,114). zig build syntax-test, which did not compile on main, now compiles and passes (40/40). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'build/process.zig')
-rw-r--r--build/process.zig14
1 files changed, 3 insertions, 11 deletions
diff --git a/build/process.zig b/build/process.zig
index 1968aaab..16f9b48b 100644
--- a/build/process.zig
+++ b/build/process.zig
@@ -6,6 +6,8 @@ const std = @import("std");
/// window's own, run in full when asked.
pub fn add(b: *std.Build, opts: struct {
exe: *std.Build.Step.Compile,
+ /// The language server a tty case's `.rs` files speak to (test/lspmock.zig).
+ lspmock: *std.Build.Step.Compile,
/// The addons the build made (image, pdf), which every session loads:
/// each `--addon=<lib>`, linked into its data directory's addons.
addons: []const *std.Build.Step.Compile,
@@ -23,16 +25,6 @@ pub fn add(b: *std.Build, opts: struct {
.link_libc = true,
});
ninep_client.addImport("cloud9", opts.cloud9);
- // The language server a tty case's `.rs` files speak to.
- const lspmock = b.addExecutable(.{
- .name = "pardes-lspmock",
- .root_module = b.createModule(.{
- .target = opts.target,
- .optimize = opts.optimize,
- .root_source_file = b.path("test/lspmock.zig"),
- .link_libc = true,
- }),
- });
const process_test = b.addExecutable(.{
.name = "pardes-process-test",
.root_module = b.createModule(.{
@@ -52,7 +44,7 @@ pub fn add(b: *std.Build, opts: struct {
const run_process_test = b.addRunArtifact(process_test);
run_process_test.addArtifactArg(opts.exe);
for (opts.addons) |a| run_process_test.addPrefixedFileArg("--addon=", a.getEmittedBin());
- run_process_test.addPrefixedFileArg("--lspmock=", lspmock.getEmittedBin());
+ run_process_test.addPrefixedFileArg("--lspmock=", opts.lspmock.getEmittedBin());
run_process_test.addArg(if (opts.gui) "--backend=gui" else "--backend=tui");
run_process_test.addPassthruArgs();
// The tty cases' goldens are test/snapshots/'s, from the build root.