Conversation
Summary of ChangesHello @spiral-ladder, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the build system by adding support for the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for the linker_allow_shlib_undefined option for libraries. The implementation is straightforward and correct. While reviewing, I noticed a small, pre-existing omission in the library parser where the version field was not being handled. I've included a suggestion to address this for completeness.
| } else if (std.mem.eql(u8, field_name, "linker_allow_shlib_undefined")) { | ||
| library.linker_allow_shlib_undefined = try self.parseBool(field_value); | ||
| } |
There was a problem hiding this comment.
While adding support for linker_allow_shlib_undefined, I noticed that the version field for a Library is not being parsed. The Library struct has a version field, and it's used when generating the build.zig file, but it's missing from the parser logic here. This is inconsistent with parseExecutable, which does handle its version field.
This seems like a good opportunity to fix this omission. I've updated the suggestion to include parsing for the version field.
} else if (std.mem.eql(u8, field_name, "version")) {
library.version = try self.parseVersionString(field_value);
} else if (std.mem.eql(u8, field_name, "linker_allow_shlib_undefined")) {
library.linker_allow_shlib_undefined = try self.parseBool(field_value);
}
- #1: Clean stale build.zig.zon (remove deleted exe/test refs, bump to 0.3.0) - #2: Remove @ptrCast for dest_sub_path (Zig coerces comptime strings) - #3: Default modules to public (export to b.modules unless private = true) - #4: @CompileError for unknown option types + validateManifest for unknown top-level fields - #5: resolveImport returns error.ModuleNotFound instead of @Panic - #6: Remove duplicate modules.put (createModule handles it, callers don't) - #7: Add 8 comptime helper tests (toStringSlice, toEnumSlice, isIntType, isFloatType, isKnownField, validateManifest) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
unblocks ChainSafe/zapi#1