zig

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

commit d1a61e1aabd034ae75b11c4c7637476d1b946735 (tree)
parent c159c3152de4905fba5520540ac073a63a8c6f4a
Author: Motiejus Jakštys <motiejus@jakstys.lt>
Date:   Fri, 20 Feb 2026 10:49:46 +0000

verbose_air: use incremental cache mode to avoid stale results

With .cache_mode = .whole, comp.update() returns immediately on a
cache hit, skipping sema entirely.  The verbose_air_callback never
fires, so the collector returns 0 functions.  This causes spurious
test passes when the C sema also returns 0 functions (e.g. for
unported @export), because 0 == 0 looks like a match.

Switch to .incremental so that sema always runs and the callback
always fires, making test results deterministic across runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Diffstat:
Msrc/verbose_air.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/verbose_air.zig b/src/verbose_air.zig @@ -250,7 +250,7 @@ fn zigCompileAirImpl( .root_mod = root_mod, .emit_bin = .no, .thread_pool = thread_pool, - .cache_mode = .whole, + .cache_mode = .incremental, .verbose_air_callback = .{ .context = @ptrCast(&collector), .call = @ptrCast(&AirCollector.collectFunc),