Fix unresolvable jit_arm64 import; export vsa_jit so the compiler looks - #98
Merged
Conversation
The path escaped the module root; the file was in the same directory. Nothing exported vsa_jit, so nothing ever compiled it, so nobody found out.
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.
What was wrong
src/vm/jit_unified.zigimported the ARM64 backend as"../../jit_arm64.zig".From
src/vm/, that path escapes the module root, so it could not resolve onany machine, ever. The file it wants —
jit_arm64.zig— sits in the samedirectory, right next to it.
Why six weeks of green CI never noticed
Nothing exported
vsa_jit. Zig analyses a top-level declaration only whensomething references it, so an unreferenced
@importof an unresolvable pathis not an error — it is simply never looked at. No export, no reference, no
analysis, no error. The build stayed green because the compiler was never
asked the question.
Measured, before and after, with the file compiled directly:
The change
Two lines: the import path, and a
pub const vsa_jitinroot.zigso thecompiler is forced to look from now on. The export is the durable half — the
path fix without it would rot again the same way.
zig buildclean,163/163 tests passed. The one remaining failure on mylocal toolchain is
testing.refAllDeclsRecursive, removed in Zig 0.16; it ispresent at baseline without this change (verified by stash) and CI targets
0.15.2, where it exists.
Not fixed here, but worth knowing
This file exists five times across the fleet: twice in this repository
(
src/vsa_jit.zigandsrc/vm/vsa_jit.zig, byte-identical apart from therelative import paths), once in zig-hdc, once in trinity. The trinity copy is
stale — it still calls the old 2-argument
dotProduct. The zig-hdc copy callsa 3-argument version that exists nowhere. That divergence is the direct
consequence of the duplication, and it is a separate change.