Skip to content

Conversation

@gballet
Copy link
Contributor

@gballet gballet commented Oct 31, 2025

This is a first attempt, but it's incomplete because it needs some libraries to still be updated.

Copilot AI review requested due to automatic review settings October 31, 2025 17:19
@gballet gballet force-pushed the upgrade-to-0.15.2 branch 2 times, most recently from 711d8ee to 574831b Compare October 31, 2025 17:22
Copy link
Contributor

Copilot AI left a 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.createModule with root_module parameter
  • Removed redundant optimize and target parameters 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 = "",
Copy link

Copilot AI Oct 31, 2025

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.

Copilot uses AI. Check for mistakes.
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 = "",
Copy link

Copilot AI Oct 31, 2025

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.

Suggested change
.hash = "",
.hash = "metrics-0.0.0-cwQkQwQBAAChQwQBAAChQwQBAAChQwQBAAChQwQBAACh", // <-- Replace with actual hash from `zig build`

Copilot uses AI. Check for mistakes.
Comment on lines +206 to +210
.root_module = b.createModule(.{
.root_source_file = b.path("pkgs/state-transition/src/lib.zig"),
.optimize = optimize,
.target = target,
}),
Copy link

Copilot AI Oct 31, 2025

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).

Suggested change
.root_module = b.createModule(.{
.root_source_file = b.path("pkgs/state-transition/src/lib.zig"),
.optimize = optimize,
.target = target,
}),
.root_module = zeam_state_transition,

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants