zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 7b5280b687039faebfcb4d670507d0826f3ecba3 (tree)
parent ba634c44ba7b75ac4397df3a0c3c5f11093553f0
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Wed, 27 May 2026 13:12:36 -0700

build.zig: poison the configure cache appropriately

Until #35473 is implemented we have to re-run configure logic in case of
these things:
* git commit changes
* test-cases on the file system changed
* test-incremental on the file system changed

Diffstat:
Mbuild.zig | 5+++++
Mtest/tests.zig | 8++++++++
2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/build.zig b/build.zig @@ -259,6 +259,11 @@ pub fn build(b: *std.Build) !void { std.debug.print("error: version info cannot be retrieved from git. Zig version must be provided using -Dversion-string\n", .{}); std.process.exit(1); } + + // Ensure git version changes get picked up + // https://codeberg.org/ziglang/zig/issues/35473 + b.graph.poisonCache(); + const version_string = b.fmt("{d}.{d}.{d}", .{ zig_version.major, zig_version.minor, zig_version.patch }); var code: u8 = undefined; diff --git a/test/tests.zig b/test/tests.zig @@ -2901,6 +2901,10 @@ pub fn addCases( var cases = @import("src/Cases.zig").init(gpa, arena, io); + // Ensure changes to these files get picked up + // https://codeberg.org/ziglang/zig/issues/35473 + b.graph.poisonCache(); + var dir = try b.root.openDir(io, "test/cases", .{ .iterate = true }); defer dir.close(io); @@ -2959,6 +2963,10 @@ pub fn addIncrementalTests(b: *std.Build, test_step: *Step, test_filters: []cons }), }); + // Ensure changes to these files get picked up + // https://codeberg.org/ziglang/zig/issues/35473 + b.graph.poisonCache(); + var dir = try b.root.openDir(io, "test/incremental", .{ .iterate = true }); defer dir.close(io);