Skip to content

ci: pin nightly toolchain to 2026-04-16 for ethnum 1.5.2 compat#6570

Merged
jackye1995 merged 1 commit into
lance-format:mainfrom
LuciferYang:fix-pin-nightly
Apr 19, 2026
Merged

ci: pin nightly toolchain to 2026-04-16 for ethnum 1.5.2 compat#6570
jackye1995 merged 1 commit into
lance-format:mainfrom
LuciferYang:fix-pin-nightly

Conversation

@LuciferYang
Copy link
Copy Markdown
Contributor

@LuciferYang LuciferYang commented Apr 18, 2026

Summary

The linux-build CI job installs unpinned nightly, which broke after 2026-04-17 because ethnum 1.5.2 uses unsafe { mem::transmute(()) } to create TryFromIntError. Newer nightly builds reject this with error[E0512]: cannot transmute between types of different sizes.

Dependency chain: lance-arrowjsonb 0.5.6ethnum 1.5.2

This PR pins nightly-2026-04-16 (last known-good date) in both the toolchain install step and the cargo +nightly invocation.

Root Cause

ethnum-1.5.2/src/error.rs:16:

pub const fn tfie() -> TryFromIntError {
    unsafe { mem::transmute(()) }  // () is 0 bits, TryFromIntError is 8 bits
}

Rust nightly e9e32aca5 (2026-04-17) tightened transmute checks, making this a hard error.

Follow-up

  • Upstream fix needed in nlordell/ethnum-rs to replace the transmute hack
  • Once ethnum publishes a fix and jsonb picks it up, the pin can be removed

Test plan

  • linux-build job passes with pinned nightly

`ethnum 1.5.2` uses `unsafe { mem::transmute(()) }` to create a
`TryFromIntError`, which nightly builds after 2026-04-16 reject
with `error[E0512]` (transmute between types of different sizes).

Pin the nightly toolchain in `linux-build` to `nightly-2026-04-16`
(the last known-good date) until `ethnum` publishes a fix.
@github-actions github-actions Bot added the ci Github Action or Test issues label Apr 18, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@LuciferYang
Copy link
Copy Markdown
Contributor Author

For the medium-term fix, we've submitted an upstream PR to ethnum-rs: nlordell/ethnum-rs#58

The root cause is that ethnum v1.5.2 uses unsafe { mem::transmute(()) } to create a TryFromIntError. Starting with Rust nightly-2026-04-18 on Linux x86_64, TryFromIntError grew from 0 to 1 byte, causing a compile-time E0512 size mismatch error. The fix replaces both transmute hacks (tfie() and pie()) with safe stdlib alternatives.

Once the upstream fix is released, we can unpin the nightly version in this PR.

Copy link
Copy Markdown
Contributor

@jackye1995 jackye1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@jackye1995 jackye1995 merged commit f3206e0 into lance-format:main Apr 19, 2026
19 checks passed
@LuciferYang
Copy link
Copy Markdown
Contributor Author

Thank you @jackye1995 ~

Xuanwo pushed a commit that referenced this pull request May 7, 2026
## Summary

Upgrade transitive dependency `ethnum` from 1.5.2 to 1.5.3 and revert
the nightly toolchain pin from #6570.

Dependency chain: `lance-arrow` → `jsonb 0.5.6` → `ethnum 1.5.3`

## Root Cause

`ethnum 1.5.2` used `unsafe { mem::transmute(()) }` to construct
`TryFromIntError`, which broke on nightly > 2026-04-16 when
`TryFromIntError` grew from 0 to 1 byte on Linux x86_64.

`ethnum 1.5.3`
([nlordell/ethnum-rs#58](nlordell/ethnum-rs#58))
replaced all transmute with safe stdlib operations, so the pin is no
longer needed.

## Test plan

- [x] Verified ethnum 1.5.3 compiles on `nightly-2026-04-18` (the
version that broke 1.5.2) in Docker Linux x86_64
- [x] `linux-build` job should pass with unpinned nightly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Github Action or Test issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants