Skip to content

tech: Update BigInt to 5.7.0 - #399

Merged
DarthMike merged 2 commits into
developfrom
tech/bump-bigint
Aug 19, 2026
Merged

DarthMike merged 2 commits into
developfrom
tech/bump-bigint

Conversation

@DarthMike

@DarthMike DarthMike commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Supersedes the BigInt half of #386.

Two things break in 5.7.0:

  • It adds Swift 6 strict concurrency, so BigInt/BigUInt declare Sendable themselves and our @unchecked conformances became duplicates. The build had been warning this would happen.
  • It stopped parsing the empty string, breaking BigUInt(hex:)/BigInt(hex:) for a bare "0x" — the test process aborted on a force unwrap. Nodes return "0x" for zero and these initialisers have always read it that way, so the fix substitutes a zero digit rather than changing the contract. Int(hex:) still returns nil for an empty string, as its test already pinned.

Staying on 5.7.0 rather than 6.0.0: that release only carries a WASI _mantissa fix and extra CI runners, and its manifest declares swift-tools-version 6.3 — which would impose a Swift 6.3 floor on every consumer of this library.

Note this does not close #372. That issue asks for the podspec dependency to be bumped, which is a separate change — and CocoaPods only ever published BigInt up to 5.2.0, so the podspec cannot track SPM here regardless.

macOS 435 / Linux 334, 0 failures, lint clean. The first CI run failed on two mainnet ENS tests — a different one per platform, both ensUnknown after ~110s against the public RPC — and re-running the same commit was green.

🤖 Generated with Claude Code

Two things break in 5.7.0, both small.

It adds Swift 6 strict concurrency, so BigInt and BigUInt now declare
Sendable themselves and our @unchecked conformances became duplicates.
The build had been warning that this would happen. Remove them.

It also stopped parsing the empty string, which broke BigUInt(hex:) and
BigInt(hex:) for a bare "0x" — the process aborted on a force unwrap in
HexExtensionsTests. Nodes return "0x" for zero and these initialisers
have always read it that way, so substitute a zero digit rather than
change the contract. Int(hex:) deliberately keeps returning nil for an
empty string, which the tests already pinned.

Stay on 5.7.0 rather than 6.0.0: that release only carries a WASI
_mantissa fix and extra CI runners, and its manifest declares
swift-tools-version 6.3, which would impose a Swift 6.3 floor on everyone
depending on this library.

Co-authored-by: Michał Dąbrowski <michal.dabrowski@elympics.ai>
@DarthMike
DarthMike requested a review from a team as a code owner August 14, 2026 14:58
@DarthMike
DarthMike merged commit 26e0601 into develop Aug 19, 2026
3 checks passed
@DarthMike
DarthMike deleted the tech/bump-bigint branch August 19, 2026 09:22
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.

BigInt version need update

2 participants