Skip to content

Build and test from a fresh clone on Zig 0.16 - #3

Merged
SMC17 merged 1 commit into
mainfrom
fix/fresh-clone-0.16
Nov 18, 2026
Merged

SMC17 merged 1 commit into
mainfrom
fix/fresh-clone-0.16

Conversation

@SMC17

@SMC17 SMC17 commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Root cause

  1. build.zig.zon declared safetensors and tokenizers as .path deps under deps/, which is gitignored and only populated by scripts/fetch-deps.sh or the CI multi-checkout. On a fresh clone the build runner fails before compiling anything:
    unable to open '<repo>/deps/safetensors-zig': FileNotFound
    error: the following build command failed with exit code 1:
    .zig-cache/o/.../build ... test --summary all
    
  2. Once deps resolved, the default zig build (install) step failed: examples/infer_tinyllama.zig:84 still called the old 5-argument KVCache.init; it now takes a PageManager and a BlockAllocator.

Fix

  • Pin both deps as url + hash GitHub archive entries at the same SHAs fetch-deps.sh used (safetensors-zig@17328a3, tokenizers-zig@558bfbc). Both repos are now public, so the unauthenticated fetch that AGENTS.md said would 404 now works.
  • Remove the now-dead deps/ bootstrap: scripts/fetch-deps.sh, deps/.gitkeep, the deps/* gitignore lines and the CI checkout steps (with the CROSS_REPO_PAT note). AGENTS.md now describes the pins and how to bump one.
  • infer_tinyllama.zig: build the PageManager + BlockAllocator the way the benches do, sized for max_position_embeddings tokens in every layer, which is the capacity the old call asked for.
  • README test counts updated to the measured value.

The 9 skipped tests are the existing thread_pool.zig tests, which need Linux futex and return SkipZigTest on other OSes. They were not changed.

Before / after (fresh clone, Zig 0.16.0, macOS arm64)

Before, zig build test --summary all printed no Build Summary line. It failed in the build runner with the FileNotFound error above.

After, from a second fresh clone of this branch:

zig build test --summary all
Build Summary: 3/3 steps succeeded; 82/91 tests passed (9 skipped)

zig build --summary all
Build Summary: 3/3 steps succeeded

infer-tinyllama compiles but was not run, because it needs TinyLlama weights.

🤖 Generated with Claude Code

build.zig.zon declared safetensors and tokenizers as path deps under the
gitignored deps/ directory, so a fresh clone failed before compiling
anything ("unable to open deps/safetensors-zig: FileNotFound"). Both
upstream repos are now public, so pin them as url+hash archive deps at
the same SHAs scripts/fetch-deps.sh used, and drop the deps/ bootstrap
(script, .gitkeep, gitignore entries, CI multi-checkout).

The default install step also failed: examples/infer_tinyllama.zig still
called the pre-paging KVCache.init signature. Construct the PageManager
and BlockAllocator the way the benches do, sized for
max_position_embeddings tokens per layer.

README test counts updated to the measured 82/91 (9 Linux-only pool
tests skip on macOS).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SMC17
SMC17 merged commit 481f7e3 into main Nov 18, 2026
0 of 2 checks passed
@SMC17
SMC17 deleted the fix/fresh-clone-0.16 branch November 18, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant