Skip to content

Update onflow/crypto to v0.25.4 in contracts and templates - #621

Merged
turbolent merged 1 commit into
masterfrom
bastian/bump-onflow-crypto
Nov 17, 2026
Merged

turbolent merged 1 commit into
masterfrom
bastian/bump-onflow-crypto

Conversation

@turbolent

Copy link
Copy Markdown
Member

CI currently fails to build lib/go/contracts, because github.com/onflow/crypto v0.25.3 defines bool via typedef, which is an error in C23 ('bool' cannot be defined via 'typedef'). The ubuntu-latest runner image is now ubuntu-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 the go directive of lib/go/contracts and lib/go/templates is 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/test already uses onflow/crypto v0.27.2.

Changes

  • Update github.com/onflow/crypto from v0.25.3 to v0.25.4 (indirect) in lib/go/contracts and lib/go/templates, and run go mod tidy

Testing

  • Reproduced the CI failure locally with CGO_CFLAGS=-std=c23 on v0.25.3
  • With CGO_CFLAGS=-std=c23, make ci passes in lib/go/contracts and lib/go/templates, and go test ./... passes in lib/go/test

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
turbolent requested review from vishalchangrani and a balanced review from Copilot and removed request for Copilot November 17, 2026 20:24
@turbolent
turbolent merged commit bf0ad4d into master Nov 17, 2026
2 of 3 checks passed
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