Skip to content

fix(rsql): patch vendored ethnum 1.5.2 -> 1.5.3 for rustc 1.96#128

Merged
Congee merged 1 commit into
masterfrom
fix/rsql-ethnum-rustc
Jul 24, 2026
Merged

fix(rsql): patch vendored ethnum 1.5.2 -> 1.5.3 for rustc 1.96#128
Congee merged 1 commit into
masterfrom
fix/rsql-ethnum-rustc

Conversation

@Congee

@Congee Congee commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Problem

Every CI build on master fails compiling rsql on the current nixos-unstable:

error[E0512]: cannot transmute between types of different sizes
  --> ethnum-1.5.2/src/error.rs:16:14
16 |     unsafe { mem::transmute(()) }   // () = 0 bits, TryFromIntError = 8 bits

ethnum <=1.5.2 fabricates a TryFromIntError via mem::transmute(()), relying on the type being zero-sized. rustc 1.96 gave it a field, so the transmute is now a size mismatch. ethnum 1.5.3 replaces the hack with u8::try_from(-1i8).unwrap_err().

This surfaced only after the nixos-unstable channel crossed the rustc bump — PR checks were green because cachix still had the old rsql drv (nix-build-uncached skipped it); once the channel moved, the drv hash changed, cache-missed, and the compile actually ran.

Fix

rsql 0.19.4 is already the latest release, so bump the transitive dep via a Cargo.lock patch (ethnum.patch) and refresh cargoHash.

Verified locally on aarch64-darwin: nix build .#rsql succeeds, rsql --version -> rsql/0.19.4. This PR's own CI is a real cache-miss build (drv hash changed), so it validates x86_64-linux too.

ethnum <=1.5.2 fabricates a TryFromIntError via mem::transmute(()),
relying on it being zero-sized. rustc 1.96 (nixos-unstable) gave the
type a field, so the transmute is now a size mismatch (E0512) and rsql
fails to build. 1.5.3 replaces the hack with u8::try_from(-1i8).unwrap_err().

rsql 0.19.4 is already the latest release, so bump the transitive dep via
a Cargo.lock patch and refresh cargoHash.
@Congee
Congee merged commit fd90afe into master Jul 24, 2026
2 checks passed
@Congee
Congee deleted the fix/rsql-ethnum-rustc branch July 24, 2026 16:13
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.

1 participant