Make zig-knowledge-graph build: no build.zig existed, and the imports pointed into another repository - #2
Merged
Merged
Conversation
…mports There was no build script at all, the manifest had no fingerprint and an unhashed dependency, and the four imports pointed at files that live in zig-golden-float — which imported this repository's knowledge_graph.zig right back. Dependency pinned to a commit rather than main, because a url-plus-hash against a moving branch invalidates itself on every merge.
Third time this class of mistake in one session — .zig-cache twice, now the local package directory. The habit that prevents it is reading git status before git add -A, not adding patterns after the fact.
Correction to the previous message: these are not artefacts of my local 0.16. CI on 0.15.2 reports the same errors, so they are real.
File.writer takes a buffer since 0.15; the tail of the file would not have reached disk without an explicit flush, so save() would have reported success on a file load() could not read.
Every call site discarded the returned count, so erroring on a short read is the same contract the code already assumed.
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.
This package could not be built or depended on by anybody:
build.zig. Nothing to run..fingerprint, and the dependency was declared by URL with no.hash— the fetch could not even start.knowledge_graph.zig—vsa.zig,hybrid.zig,packed_vsa.zig,packed_trit.zig— name files that are not in this repository. They are in gHashTag/zig-golden-float. That repository'ssrc/vsa/packed_vsa.zigin turn opened with@import("knowledge_graph.zig"), a file that is not there but is here. One directory was split into two repositories and every relative import was left pointing at the sibling that stayed behind, so neither half compiled. The other half is fixed in Export packed_vsa — present, correct, and reachable from nowhere zig-golden-float#99 (merged); this is the near half. Tracked as This package and zig-golden-float each hold half of a split directory, and neither half compiles #1.Changes: a ZON manifest with a fingerprint, a
build.zigexporting the library module and both executables with a per-root test target, the four imports repointed at the dependency, and a workflow that runszig buildandzig build teston 0.15.2.The dependency is pinned to a commit, not to
refs/heads/main. A URL pointing at a branch tarball plus a content hash invalidates itself on every upstream merge — which is exactly how the sibling package's pin came to be three versions stale, breaking at fetch before anything could compile and notice.Local Zig here is 0.16 and reports failures that do not exist on the 0.15.2 target (
std.io.getStdOut,ArrayList.init, thestd.fsreorganisation), so I am letting CI be the instrument rather than editing code that is correct for the version it targets. If CI finds real defects underneath, they get fixed in a follow-up rather than guessed at here.