Repository navigation
Update onflow/crypto to v0.25.4 in contracts and templates - #621
Merged
Merged
Conversation
onflow/crypto v0.25.3 fails to build with C23 compilers, because it defines bool via typedef, and bool is a keyword in C23. The ubuntu-latest runner image (ubuntu-26.04) uses a GCC that defaults to C23, so lib/go/contracts no longer builds in CI. v0.25.4 guards the definition on __STDC_VERSION__. It requires Go 1.25.1, so the go directive of both modules is raised.
turbolent
requested review from
vishalchangrani
and
a balanced review from Copilot
and removed request for
Copilot
November 17, 2026 20:24
Copilot stopped reviewing on behalf of
turbolent due to an error
November 17, 2026 20:25
Kay-Zee
approved these changes
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI currently fails to build
lib/go/contracts, becausegithub.com/onflow/cryptov0.25.3 definesboolviatypedef, which is an error in C23 ('bool' cannot be defined via 'typedef'). Theubuntu-latestrunner image is nowubuntu-26.04, whose GCC defaults to C23. See the failed run in #620 for an example.onflow/crypto v0.25.4 guards the definition on
__STDC_VERSION__(onflow/crypto#38). It requires Go 1.25.1, so thegodirective oflib/go/contractsandlib/go/templatesis raised from 1.24.0 to 1.25.1. Downstream consumers (flow-go, flow-emulator, flow-cli) already require Go 1.26.0 and onflow/crypto v0.27.2, so this does not change what they build with.lib/go/testalready uses onflow/crypto v0.27.2.Changes
github.com/onflow/cryptofrom v0.25.3 to v0.25.4 (indirect) inlib/go/contractsandlib/go/templates, and rungo mod tidyTesting
CGO_CFLAGS=-std=c23on v0.25.3CGO_CFLAGS=-std=c23,make cipasses inlib/go/contractsandlib/go/templates, andgo test ./...passes inlib/go/test