Make Zig a first-class GitNexus citizen across the CLI and web app#305
Make Zig a first-class GitNexus citizen across the CLI and web app#305zolotukhin wants to merge 1 commit intoabhigyanpatwari:mainfrom
Conversation
|
@zolotukhin is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
c2d0fe2 to
8390116
Compare
cfea68a to
c0529c6
Compare
|
@claude can you review this as senior zig system designer, refer to https://ziglang.org/documentation/master/ for reference, look for nuances and gaps in this repo, check its viability to merge and build out support for ZIg |
|
Claude finished @zander-raycraft's task in 3m 24s —— View job Zig First-Class Support — Senior Zig System Design ReviewTasks
SummaryThe PR introduces solid foundational Zig support — grammar registration, export detection, container parsing, and a fixture file. The architecture mirrors the established pattern used by Rust and Go, and the 🔴 Critical: CLI vs Web Grammar Node Name MismatchThe CLI uses
If the WASM grammar and the npm grammar are out of sync, one of the two ingestion paths will silently produce zero call edges for all Zig files. The WASM grammar provenance ( 🔴 Critical: Web
|
c0529c6 to
4425f6b
Compare
|
Addressed the Claude review issues |
Summary
This PR makes Zig a first-class language in GitNexus across both the CLI and the web app, and it closes the main correctness gaps that showed up during review.
It does four things:
detect-changesdirectly in the CLIWhy this matters
Before this patch, Zig support was incomplete in ways that could silently degrade graph quality:
export fnwere not treated as exportedopaque {}types, and container fields were not modeled well enough for reliable graph navigationThis patch makes Zig repositories much more dependable to analyze, review, and navigate in both shipped entry points.
What changed
Zig ingestion and graph correctness
gitnexusandgitnexus-web@tree-sitter-grammars/tree-sitter-zig@1.1.2source used by the CLI, and documented that provenancepubandexporttest {}blocksopaque {}declarationsHAS_METHODandHAS_PROPERTYNoise reduction and repository hygiene
build.zigandbuild.zig.zonfrom indexing.zigfiles resolve through the standard import path machineryCLI and web product improvements
detect-changesdirectly through the CLI entrypointKey implementation notes
tree-sitter-queries.tsexport-detection.tsast-helpers.tsconst Foo = struct { ... }type-extractors/zig.tsparser-loader.tsCodeReferencesPanel.tsxandcode-highlighting.tsHow I tested it
npm run buildingitnexusnpm run buildingitnexus-webnpx vitest run --maxWorkers 193test files passed,1skipped3616tests passed,20skippednpx vitest run --coverage --maxWorkers 1 test/unit/tree-sitter-queries.test.ts test/unit/zig-web-parity.test.ts test/unit/ingestion-utils.test.ts test/unit/ignore-service.test.ts test/unit/type-env.test.ts test/unit/has-method.test.ts test/unit/parser-loader.test.ts test/unit/repo-manager.test.ts test/unit/tool-cli.test.ts test/unit/cli-index-help.test.ts test/integration/tree-sitter-languages.test.ts test/integration/parsing.test.ts test/integration/filesystem-walker.test.ts test/integration/has-method.test.ts test/integration/query-compilation.test.ts test/integration/cli-e2e.test.ts test/integration/skills-e2e.test.ts17test files passed894tests passed,1skippedFocused coverage highlights from that run:
gitnexus/src/core/ingestion/tree-sitter-queries.ts:100%linesgitnexus-web/src/core/ingestion/tree-sitter-queries.ts:100%linesgitnexus/src/config/ignore-service.ts:98.18%linesgitnexus/src/core/ingestion/export-detection.ts:97.27%linesgitnexus/src/core/tree-sitter/parser-loader.ts:100%linesgitnexus/src/core/ingestion/type-extractors/zig.ts:95.65%linesgitnexus/src/core/ingestion/filesystem-walker.ts:86.56%linesReview issues addressed
export fnhandlingbuild.zigas well asbuild.zig.zon