From 3e77fdcd57693b337d915873e9919de2e1ec6521 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 17 Nov 2026 14:30:31 -0300 Subject: build: typst found at make time; the deprecated build names replaced docs.add takes typst through b.findProgramLazy: the three renders run the program found at make time, and without typst on PATH the step that renders fails ("program not found") where three addFail steps and the optional renders said so before. findProgram was the configure cache's poison; build() now poisons it itself, with the reason (the environment, the clock and vendor/ are read untracked: REORG decision 20 keeps the configure uncached). Line for a line: lazyDependency -> dependencyLazy (catch for orelse), runAllowFail -> runFallible, b.dupe -> b.graph.dupeString, .ReleaseSafe -> .safe; build.zig through zig fmt. Left: gui.zig's three lazyDependency calls (lines 62-176, which another change rewrites) and std.Build.package_map (no line-for-line replacement: dependencyLazy's error would have to reach build()). Gates: zig build -l and -h byte-identical, whole matrix and test/lib (its configuration too); the configuration gains the find-program step and the typst runs are named run typst (...) instead of by the path found, nothing else changes; --print-configuration-path still a tmp/ path, twice; zig build cheatsheet writes cheatsheet.pdf, and with PATH holding zig alone fails "program not found" while -l succeeds. Warm: install addons, core-test shell-test unit-test process-test on tui, and install addons on gui: 0 compiles not cached, binaries cmp-identical. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- build/library.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build/library.zig') diff --git a/build/library.zig b/build/library.zig index 7d924fab..049b4323 100644 --- a/build/library.zig +++ b/build/library.zig @@ -35,8 +35,8 @@ pub fn build(b: *std.Build) void { // then. Of vaxis it takes the grapheme width, which uucode alone feeds. if (!(b.option(bool, "editor", "also export `pardes-editor`, the text pane as a library (fetches uucode, mvzr and vaxis)") orelse false)) return; const uucode = core.uucodeModule(b, target, optimize) orelse return; - const mvzr = patches.mvzr(b, patches.tool(b), b.lazyDependency("mvzr", .{ .target = target, .optimize = optimize }) orelse return, target, optimize); - const vaxis_dep = b.lazyDependency("vaxis", .{ .target = target, .optimize = optimize, .external_uucode = true }) orelse return; + const mvzr = patches.mvzr(b, patches.tool(b), b.dependencyLazy("mvzr", .{ .target = target, .optimize = optimize }) catch return, target, optimize); + const vaxis_dep = b.dependencyLazy("vaxis", .{ .target = target, .optimize = optimize, .external_uucode = true }) catch return; const width = b.addWriteFiles(); _ = width.addCopyFile(vaxis_dep.path("src/gwidth.zig"), "gwidth.zig"); const vaxis = b.createModule(.{ -- cgit v1.3