Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 25 additions & 15 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,29 @@ pub fn build(b: *std.Build) void {
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&run_main_tests.step);

// VSA tests
const vsa_tests = b.addTest(.{
.root_module = b.createModule(.{
.root_source_file = b.path("src/vsa.zig"),
.target = target,
.optimize = optimize,
}),
// src/vsa.zig was migrated to gHashTag/zig-hdc in 42490a22 and the two
// references below were left pointing at the empty space, which is one of
// the reasons this build has failed since March. The module is intact
// there and exports all fourteen symbols this repository asked of the
// file it lost; the package itself could not be depended on until its
// manifest was repaired (zig-hdc#1), which is why the reference could not
// simply be updated at the time.
const zig_hdc_dep = b.dependency("zig_hdc", .{
.target = target,
.optimize = optimize,
});
const run_vsa_tests = b.addRunArtifact(vsa_tests);
test_step.dependOn(&run_vsa_tests.step);
const hdc_vsa = zig_hdc_dep.module("zig-hdc-vsa");

// VSA tests are no longer run from here. addTest requires its root module to
// carry a known target, and a module exported by a dependency does not: it
// takes its target from whatever compiles it. Rebuilding one locally from
// the dependency's source would mean re-declaring that package's own
// imports here and testing somebody else's code from the outside.
//
// They are not lost, which is the part that matters. gHashTag/zig-hdc runs
// `zig build test` over exactly this module in its own CI, on 0.15.2 --
// the version this repository targets -- so the tests execute where the
// code lives and against the compiler that will consume it.

// Queen API tests
const queen_api_tests = b.addTest(.{
Expand Down Expand Up @@ -1145,12 +1158,9 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});

// VSA module for TRI (moved up: needed by tvc_corpus_mod and fluent CLI)
const vsa_tri = b.createModule(.{
.root_source_file = b.path("src/vsa.zig"),
.target = target,
.optimize = optimize,
});
// VSA module for TRI (needed by tvc_corpus_mod and fluent CLI), now the
// migrated module rather than a path to a file that is not here.
const vsa_tri = hdc_vsa;
// TVC Corpus module for TRI (moved up: needed by fluent CLI and hybrid chat)
const tvc_corpus_mod = b.createModule(.{
.root_source_file = b.path("src/tvc/tvc_corpus.zig"),
Expand Down
4 changes: 4 additions & 0 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
.url = "git+https://github.com/raylib-zig/raylib-zig#cd71c85d571027ac8033357f83b124ee051825b3",
.hash = "raylib_zig-5.6.0-dev-KE8REENOBQC-m5nK7M2b5aKSIubJPbPLUYcRhT7aT3RN",
},
.zig_hdc = .{
.url = "https://github.com/gHashTag/zig-hdc/archive/main.tar.gz",
.hash = "zig_hdc-0.1.0-6NS2Eoy7FgAFWrBY3anapf1nXxhm6TvPApY3NHoSW8MG",
},
},
.paths = .{""},
.fingerprint = 0xa9f69745ba7ed82d,
Expand Down
10 changes: 4 additions & 6 deletions tools/build_paths_baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
# relocations and are fixed. These five are not, and each needs a decision
# rather than a guess:
#
# src/vsa.zig
# Migrated to gHashTag/zig-hdc, which still has it and exports all fourteen
# symbols the eleven consumers in src/ need. Blocked on that repository's
# build.zig.zon, which predates the .fingerprint and dependency-.hash
# requirements and so cannot be depended on by zig 0.15.2 as it stands.
# src/vsa.zig was here and is gone from the list: zig-hdc#1 repaired that
# package's manifest so it can be depended on, and build.zig now takes the
# module from the dependency instead of a path to a file this repository no
# longer contains.
#
# src/cli/entrypoint_train.zig
# src/hslm/bpe_train.zig
Expand All @@ -31,5 +30,4 @@
src/cli/entrypoint_train.zig
src/hslm/bpe_train.zig
src/hslm/hslm_benchmark.zig
src/vsa.zig
trinity-nexus/output/lang/zig/full-serve-v1.zig
Loading