aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-10 11:19:54 +0200
committeruser <user@clank>2026-09-10 11:19:54 +0200
commit16620e7fd9a6780756dc956466c3579e5bb2f384 (patch)
tree4d7031ddfcf5b567accb41cabf4ffb1e8ed9d3ae /web
parentrelease: v0.1.7 paperwork -- formula and PKGBUILD pinned (diff)
downloadslosh-16620e7fd9a6780756dc956466c3579e5bb2f384.tar.gz
slosh-16620e7fd9a6780756dc956466c3579e5bb2f384.tar.xz
slosh-16620e7fd9a6780756dc956466c3579e5bb2f384.zip
build: a vendor bump rebuilds libghostty-vt, everywhere it is consumed
Three stale-build landmines, all found by shipping v0.1.7 -- the first release where new code (GhosttySearch) actually needed the vendor bump of 2026-09-01: - $(VT_LIB) had no prerequisites, so an existing .a *was* the build: the macOS builder compiled pane.c against zig-out headers from before the bump. The vendor manifest is now the prerequisite; a re-vendor rewrites it, so a bump rebuilds the lib and its installed headers. - web/demo had the same guard and also never passed -Dversion-string: upstream's build.zig ran git describe in our repo, and on the tag checkout web/publish builds from, a slosh tag is a fatal version mismatch. Both fixed; both had hidden behind a stale build/vt. - The builder's zig-pkg (excluded from the sync, and left half-empty by a once-interrupted push) is an input, not a cache: it is now synced separately and additively, so a bump's new packages arrive and a partial local tree cannot maim the builder's copy.
Diffstat (limited to 'web')
-rw-r--r--web/demo/Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/web/demo/Makefile b/web/demo/Makefile
index 03d51b4..ac188b3 100644
--- a/web/demo/Makefile
+++ b/web/demo/Makefile
@@ -78,10 +78,20 @@ vendor/.stamp: fetch-vendor
# for SIMD, does not compile for rv64gc -- it emits RVV intrinsics for a vector
# extension this target does not have. The scalar paths are the same code
# without the hand-vectorised fast path, which for a demo VM is free.
-$(VT_LIB):
+# -Dversion-string, as at the top level: the vendored tree has no .git, so
+# upstream's version detection runs `git describe` in *our* repository -- and
+# on a tag checkout (exactly where web/publish builds a release site) it
+# finds a slosh tag, which upstream treats as a fatal mismatch. The manifest
+# prerequisite is the top level's too: a vendor bump must rebuild this lib,
+# or the demo compiles new code against the old headers. Both stayed hidden
+# behind a stale build/vt until v0.1.7 cleared it.
+VT_VERSION := $(shell sed -n 's/^[[:space:]]*\.version = "\([^"]*\)".*/\1/p' $(VT)/build.zig.zon | head -1)
+
+$(VT_LIB): $(VT).vendor.json
$(call say,[ZIG],libghostty-vt $(TARGET))
$(Q)cd $(VT) && PATH="$(dir $(ZIG)):$$PATH" zig build \
-Demit-lib-vt -Dsimd=false -Doptimize=ReleaseFast -Dtarget=$(TARGET) \
+ -Dversion-string=$(VT_VERSION) \
--prefix $(abspath $(VT_OUT)) --cache-dir $(abspath build/vt-cache)
# FORCE, as at the top level: rewritten only when the value actually changes,