From 999bb83fe698e811990c61ab05b56668f2158ab1 Mon Sep 17 00:00:00 2001 From: maru Date: Sun, 19 Oct 2025 06:12:33 +0000 Subject: [PATCH 1/2] Ensure golang input is up-to-date for nix flake The PR introducing the nix flake missed ensuring that the golang input from avalanchego reflected the update for 1.24.9. This change remedies that oversight and ensures that CI will catch it in the future. --- .github/workflows/ci.yaml | 8 ++++++++ ffi/flake.lock | 8 ++++---- ffi/go.mod | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f7c74b6bd..a7ad364c9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -250,6 +250,14 @@ jobs: - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@786fff0690178f1234e4e1fe9b536e94f5433196 #v20 - uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 #v13 + - name: Check golang flake input is up to date + working-directory: ffi + run: | + nix flake lock --update-input golang + if ! git diff --exit-code flake.lock; then + echo "Error: ffi/flake.lock is out of date. Run 'nix flake lock --update-input golang' in the ffi directory and commit the changes." + exit 1 + fi - name: Test build equivalency between Nix and Cargo run: bash -x ./ffi/test-build-equivalency.sh - name: Test Go FFI bindings diff --git a/ffi/flake.lock b/ffi/flake.lock index e95d44ffe..2eda9b50c 100644 --- a/ffi/flake.lock +++ b/ffi/flake.lock @@ -39,17 +39,17 @@ }, "locked": { "dir": "nix/go", - "lastModified": 1760457933, - "narHash": "sha256-/OztRdmXd3cL6ycrzRYAgFkPTv9v5WWlcdtVlERaRKI=", + "lastModified": 1760973838, + "narHash": "sha256-UnngvRB45lUeWwot7cvB0MaedaQEQmcw+q8Y6WbeGtE=", "owner": "ava-labs", "repo": "avalanchego", - "rev": "edf67505fee7c95837c2220467de86fea0efc860", + "rev": "f10757d594eedf0f016bc1400739788c542f005f", "type": "github" }, "original": { "dir": "nix/go", "owner": "ava-labs", - "ref": "edf67505fee7c95837c2220467de86fea0efc860", + "ref": "f10757d594eedf0f016bc1400739788c542f005f", "repo": "avalanchego", "type": "github" } diff --git a/ffi/go.mod b/ffi/go.mod index be46486ab..9bab12492 100644 --- a/ffi/go.mod +++ b/ffi/go.mod @@ -4,7 +4,7 @@ go 1.24 // Changes to the toolchain version should be replicated in: // - ffi/go.mod (here) -// - ffi/flake.nix (update golang.url to a version of avalanchego's nix/go/flake.nix that uses the desired version) +// - ffi/flake.nix (update golang.url to a version of avalanchego's nix/go/flake.nix that uses the desired version and run `nix flake update --update-input golang`) // - ffi/tests/eth/go.mod // - ffi/tests/firewood/go.mod toolchain go1.24.9 From 81c105e62fe7003231c161b2c414bc8827f29e78 Mon Sep 17 00:00:00 2001 From: maru Date: Sun, 19 Oct 2025 06:36:44 +0000 Subject: [PATCH 2/2] fixup: Update to use the non-deprecated flake update syntax --- .github/workflows/ci.yaml | 4 ++-- ffi/go.mod | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a7ad364c9..0e554cf59 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -253,9 +253,9 @@ jobs: - name: Check golang flake input is up to date working-directory: ffi run: | - nix flake lock --update-input golang + nix flake update golang if ! git diff --exit-code flake.lock; then - echo "Error: ffi/flake.lock is out of date. Run 'nix flake lock --update-input golang' in the ffi directory and commit the changes." + echo "Error: ffi/flake.lock is out of date. Run 'nix flake update golang' in the ffi directory and commit the changes." exit 1 fi - name: Test build equivalency between Nix and Cargo diff --git a/ffi/go.mod b/ffi/go.mod index 9bab12492..9eaa265c2 100644 --- a/ffi/go.mod +++ b/ffi/go.mod @@ -4,7 +4,7 @@ go 1.24 // Changes to the toolchain version should be replicated in: // - ffi/go.mod (here) -// - ffi/flake.nix (update golang.url to a version of avalanchego's nix/go/flake.nix that uses the desired version and run `nix flake update --update-input golang`) +// - ffi/flake.nix (update golang.url to a version of avalanchego's nix/go/flake.nix that uses the desired version and run `nix flake update golang`) // - ffi/tests/eth/go.mod // - ffi/tests/firewood/go.mod toolchain go1.24.9