Repository navigation
refactor: split manifest.zig into focused sub-modules (behavior-preserving) - #543
Conversation
…rving) (#442 follow-up) Turn the ~1600-line src/manifest.zig into a thin barrel that re-exports a new manifest/ sub-package split along cohesive seams. Pure module extraction: no logic, signature, or output changes. Every manifest.<Name> call site is unchanged (same public names re-exported from the barrel). Sub-modules: - manifest/parse.zig game/pack realm struct parsing (Field, StructDecl, parseStructDir, parseStructFile, extractSavePolicy) - manifest/json.zig JSON emission (ManifestData, PackRealm, SCHEMA_VERSION, writeManifestJson + all writers) - manifest/emit.zig orchestration (MANIFEST_FILENAME, PackInput, emitManifestSidecar, writeSidecar) Tests moved verbatim alongside their functions; the barrel pulls every sub-module into analysis so `zig build test` runs them all. The only non-mechanical deltas vs the original are added `pub` qualifiers for cross-module access, `../`-rewritten imports, and module-qualified calls — a normalized set-diff confirms every output-affecting line is verbatim. Mirrors the codegen/scan.zig split in #539. zig build + zig build test green; zig fmt --check clean; manifest JSON writer byte-identical (verified by diff of the moved writer region). Claude-Session: https://claude.ai/code/session_017pW3ifKf9wgxNg4viy6okw
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe manifest generation logic previously contained entirely in src/manifest.zig has been split into three new submodules: parse.zig (AST-based struct/event parsing), json.zig (manifest JSON serialization for game/engine/plugin/pack realms), and emit.zig (sidecar orchestration and file writing). src/manifest.zig now re-exports these submodules' public symbols. ChangesManifest Module Split
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request refactors src/manifest.zig by splitting the single ~1600-line module into a thin barrel file that re-exports focused sub-modules under src/manifest/, specifically parse.zig for struct parsing, json.zig for JSON emission, and emit.zig for orchestration. This behavior-preserving split maintains all original symbol names and integrates the respective tests into the main barrel. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
What
Turn the ~1600-line
src/manifest.ziginto a thin barrel that re-exports a newmanifest/sub-package, split along cohesive seams. Pure module extraction — no logic, signature, or output changes. Mirrors thecodegen/scan.zigsplit in #539.Sections extracted
manifest/parse.zigField,StructDecl,parseStructDir,parseStructFile(+ parse tests)manifest/json.zigSCHEMA_VERSION,ManifestData,PackRealm,writeManifestJson,findRealm(+ writer round-trip tests)manifest/emit.zigMANIFEST_FILENAME,PackInput,emitManifestSidecar,writeSidecar(+ sidecar tests)manifest.zigis now a thin barrel re-exporting the unchanged public surface (MANIFEST_FILENAME,SCHEMA_VERSION,PackInput,emitManifestSidecar) and pulling every sub-module into analysis viatest {}. The only external call sites (root.zig→pack_manifest.PackInput/emitManifestSidecar) are untouched.Behavior preservation
pubqualifiers for cross-module access,../-rewritten import paths, per-file const aliases, and module-qualified calls (parse./json.). No output-affecting line changed.diffof the moved writer region (writeManifestJson…writeFieldObject) is byte-identical apart from the one addedpub.Bar
zig build— greenzig build test— green (golden/build.zig suite byte-identical)zig fmt --check— cleanPure extraction; any latent bug in the moved code is pre-existing and out of scope.
https://claude.ai/code/session_017pW3ifKf9wgxNg4viy6okw
Summary by CodeRabbit
New Features
Bug Fixes