Skip to content

ci: pin Rust 1.90 in the docker builds and commit Cargo.lock - #1

Merged
InventivetalentDev merged 2 commits into
mainfrom
ci/fix-build
Oct 22, 2026
Merged

InventivetalentDev merged 2 commits into
mainfrom
ci/fix-build

Conversation

@InventivetalentDev

@InventivetalentDev InventivetalentDev commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

What

Fixes the CI build so binaries can publish again.

  • Linux builds: the x86_64-unknown-linux-gnu and x86_64-unknown-linux-musl jobs install Rust 1.90.0 inside the napi-rs builder image and build with it (RUSTUP_TOOLCHAIN=1.90.0).
  • Cargo.lock: now committed, and removed from .gitignore, so dependency versions stop drifting between builds.
  • ava: ^6.0.1 → ^6.4.1 (lockfile resolved 6.1.3 before), the first 6.x release whose engines allows Node 24.
  • Binding tests: run on Node 22 and 24 instead of the end-of-life 18 and 20.

Why

CI has failed since April, so 1.0.6 never published. Three separate problems:

  • The nodejs-rust:lts-debian / lts-alpine builder images ship rustc 1.82 / 1.83. With no lockfile, cargo resolves the newest crates, and napi-build 2.6.0 now needs rustc 1.88. rustup update stable inside those images fails with a cross-device rename error, so the fix installs a separately versioned toolchain next to the old one.
  • The Linux jobs run yarn install on the runner's preinstalled Node, now 24. Yarn 1 enforces engines, and ava 6.1.3 only allows Node up to 22.
  • The macOS and Windows build failures from April could not be diagnosed, because those logs have expired. They pass on this branch.

Risk

Low. Only CI and dev dependencies change; the crate source is unchanged. If 1.90.0 can't build a future dependency bump, the Linux jobs fail at build time, before anything publishes.

Testing

  • CI on this branch: all 4 builds, all 6 binding test jobs (Linux gnu, macOS, Windows × Node 22/24), and Publish pass. Publish printed Not a release, skipping publish.
  • Locally: built x86_64-unknown-linux-musl in nodejs-rust:lts-alpine with Rust 1.90.0, then ran yarn test (ava 6.4.1) on node:24-alpine: 13 tests pass. CI has no musl test job, so this is the only check of the musl binary.

Note

AI-assisted.

InventivetalentDev and others added 2 commits October 22, 2026 13:30
The napi-rs builder images ship rustc 1.82 (debian) / 1.83 (alpine).
Without a lockfile cargo resolves the newest crates, which now need
rustc 1.88+ (napi-build 2.6.0), so both linux builds fail. Updating the
image's own stable toolchain fails on overlayfs, so install a pinned
1.90.0 next to it. Commit Cargo.lock so builds stop drifting.

Also test the bindings on Node 22 and 24 instead of the EOL 18 and 20.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Yarn 1 enforces engines, and ava 6.1.3 only allows Node <= 22. The
runners' preinstalled Node (used by the docker build jobs) and the new
Node 24 test jobs both failed at yarn install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@InventivetalentDev
InventivetalentDev marked this pull request as ready for review October 22, 2026 11:40
@InventivetalentDev
InventivetalentDev merged commit 86b72e1 into main Oct 22, 2026
11 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.

1 participant