diff --git a/build.zig.zon b/build.zig.zon index 23d425b..b109ac5 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -7,7 +7,7 @@ .dependencies = .{ .zig_golden_float = .{ .url = "https://github.com/gHashTag/zig-golden-float/archive/main.tar.gz", - .hash = "golden_float-2.1.0-h7LKhQ3lCgBfkjryIT9MnOTWleMQrdrgOIxQOhxqzTVu", + .hash = "golden_float-2.1.0-h7LKhZMGCwBW0FS_zsli6CWxs9d5pElRE1pFFiy3WRSD", }, }, } diff --git a/src/vsa.zig b/src/vsa.zig index 747da43..357ebb2 100644 --- a/src/vsa.zig +++ b/src/vsa.zig @@ -144,3 +144,17 @@ test { } // φ² + 1/φ² = 3 | TRINITY + +test "every public declaration of this module is analysed" { + // Zig analyses top-level declarations lazily, so `zig build test` over this + // file proved only that the declarations it happened to reference compile. + // A consumer referencing anything else got errors this package's own green + // CI could not see -- gHashTag/trinity#701 hit exactly that: vsa/core.zig + // expects HybridBigInt to carry an `allocator` field and the golden-float + // version pinned here does not. + // + // refAllDeclsRecursive forces the whole public surface through the + // compiler, which is the only version of "this package builds" that means + // anything to somebody outside it. + @import("std").testing.refAllDeclsRecursive(@This()); +}