Repository navigation
Build and test from a fresh clone on Zig 0.16 - #3
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
build.zig.zondeclaredsafetensorsandtokenizersas.pathdeps underdeps/, which is gitignored and only populated byscripts/fetch-deps.shor the CI multi-checkout. On a fresh clone the build runner fails before compiling anything:zig build(install) step failed:examples/infer_tinyllama.zig:84still called the old 5-argumentKVCache.init; it now takes aPageManagerand aBlockAllocator.Fix
url+hashGitHub archive entries at the same SHAsfetch-deps.shused (safetensors-zig@17328a3,tokenizers-zig@558bfbc). Both repos are now public, so the unauthenticated fetch that AGENTS.md said would 404 now works.deps/bootstrap:scripts/fetch-deps.sh,deps/.gitkeep, thedeps/*gitignore lines and the CI checkout steps (with theCROSS_REPO_PATnote). AGENTS.md now describes the pins and how to bump one.infer_tinyllama.zig: build thePageManager+BlockAllocatorthe way the benches do, sized formax_position_embeddingstokens in every layer, which is the capacity the old call asked for.The 9 skipped tests are the existing
thread_pool.zigtests, which need Linux futex and returnSkipZigTeston other OSes. They were not changed.Before / after (fresh clone, Zig 0.16.0, macOS arm64)
Before,
zig build test --summary allprinted no Build Summary line. It failed in the build runner with theFileNotFounderror above.After, from a second fresh clone of this branch:
infer-tinyllamacompiles but was not run, because it needs TinyLlama weights.🤖 Generated with Claude Code