-
Notifications
You must be signed in to change notification settings - Fork 32
attempt repo upgrade to 0.15.2 #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
711d8ee to
574831b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates dependency versions in build.zig.zon and migrates the Zig build system to use the newer b.createModule API pattern for executables, libraries, and tests. This reflects changes in the Zig build system API where root_source_file, optimize, and target are now specified within a root_module configuration.
Key changes:
- Updated four dependency URLs to use specific commit hashes with empty hash fields (ssz, zigcli, xev, metrics, zig_yaml)
- Refactored build artifact creation to use
b.createModulewithroot_moduleparameter - Removed redundant
optimizeandtargetparameters from test definitions that use pre-configured modules
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| build.zig.zon | Updated dependency URLs and cleared hash fields for ssz, zigcli, xev, metrics, and zig_yaml |
| build.zig | Migrated executable, library, and test creation to use b.createModule API; removed redundant parameters from tests using pre-configured modules |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
build.zig.zon
Outdated
| .url = "https://github.com/mitchellh/libxev/archive/94ed6af.tar.gz", | ||
| .hash = "libxev-0.0.0-86vtc-zkEgB7uv1i0Sa6ytJETZQi_lHJrImu9mLb9moi", | ||
| .url = "https://github.com/mitchellh/libxev/archive/9b6634b6229be5f2c8fb22db1f6f652bac5c5040.tar.gz", | ||
| .hash = "", |
Copilot
AI
Oct 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty hash field will require manual hash generation on first build. Consider running zig build to populate the correct hash value before committing, or document that users need to run the build twice on first setup.
build.zig.zon
Outdated
| .url = "https://github.com/karlseguin/metrics.zig/archive/2b584b6209871b7215706028988169599451dc0d.tar.gz", | ||
| .hash = "metrics-0.0.0-W7G4eCG0AQCQXidzvV5kx4l0smr_WCw-8JLIwS_OHYoW", | ||
| .url = "https://github.com/karlseguin/metrics.zig/archive/603954879849c331a26529b88254770089acac8b.tar.gz", | ||
| .hash = "", |
Copilot
AI
Oct 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty hash field will require manual hash generation on first build. Consider running zig build to populate the correct hash value before committing, or document that users need to run the build twice on first setup.
| .hash = "", | |
| .hash = "metrics-0.0.0-cwQkQwQBAAChQwQBAAChQwQBAAChQwQBAAChQwQBAACh", // <-- Replace with actual hash from `zig build` |
| .root_module = b.createModule(.{ | ||
| .root_source_file = b.path("pkgs/state-transition/src/lib.zig"), | ||
| .optimize = optimize, | ||
| .target = target, | ||
| }), |
Copilot
AI
Oct 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The migration from addStaticLibrary to addLibrary with .linkage = .static changes the API pattern. However, optimize and target should not be specified within createModule for library artifacts. These parameters should be set on the library itself or inherited from the module. The module creation here is creating a new anonymous module rather than reusing an existing configured module like zeam_state_transition (defined at line 188-194).
| .root_module = b.createModule(.{ | |
| .root_source_file = b.path("pkgs/state-transition/src/lib.zig"), | |
| .optimize = optimize, | |
| .target = target, | |
| }), | |
| .root_module = zeam_state_transition, |
574831b to
711d8ee
Compare
711d8ee to
92f8da8
Compare
This is a first attempt, but it's incomplete because it needs some libraries to still be updated.