fix: bump elixir NIF rustler crate to 0.38 to match hex library - #6078
Merged
Conversation
The Elixir hex `rustler` library was bumped to 0.38.0 in #5949, but the paired Rust crate stayed at 0.37.0. Since the NIF is compiled directly via `use Rustler`, the Elixir library and Rust crate minor versions must match, so the NIF could fail to build or load against the newer library.
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.
Problem
The Elixir hex
rustlerlibrary and the paired Rustrustlercrate drifted out of sync:prqlc/bindings/elixir/mix.exsrequires{:rustler, "~> 0.38.0"}andmix.lockpins0.38.0(bumped by Dependabot in chore: bump rustler from 0.37.3 to 0.38.0 in /prqlc/bindings/elixir #5949)prqlc/bindings/elixir/native/prql/Cargo.tomlstill pinnedrustler = "0.37.0"The NIF is compiled directly from source via
use Rustlerinlib/prql/native.ex(not precompiled), so the Elixirrustlerlibrary and the Rustrustlercrate are tightly coupled and must share a minor version. They were last bumped together in #5407 (0.36 → 0.37); #5949 moved only the Elixir side to 0.38, leaving the Rust crate behind. That mismatch can cause the NIF to fail to build or load against the newer library.Fix
Bump the Rust crate to
rustler = "0.38.0"and regenerateCargo.lock(rustler0.37.0 → 0.38.0,rustler_codegen0.37.3 → 0.38.0, transitivelylibloading0.8.9 → 0.9.0).Verified the native crate compiles against the new version:
cargo build -p prqlsucceeds.Notes
test-elixirCI job builds the NIF and exercises it, which is the effective end-to-end check.rustler0.38 raises the Rust requirement to 1.91, but thetest-msrvjob only verifiesprqlc/prqlc(which doesn't depend onrustler), so the workspace MSRV declaration (1.81) is unaffected. The repo toolchain is 1.96.1.Found during the nightly code-quality sweep.