Skip to content

Fix main CI: commit ferric Cargo.lock and pin macOS CMake#374

Merged
kraenhansen merged 2 commits into
mainfrom
kh/fix-main-ci
Jul 17, 2026
Merged

Fix main CI: commit ferric Cargo.lock and pin macOS CMake#374
kraenhansen merged 2 commits into
mainfrom
kh/fix-main-ci

Conversation

@kraenhansen

Copy link
Copy Markdown
Collaborator

Why

main's last green Check run is stale; the world moved on and two things now break CI:

  1. Missing Cargo.lock for ferric-example — CI resolved Rust deps fresh every run, letting napi-derive-backend float to a broken 5.1.2 and failing the bootstrap build. Cherry-picked from Adopt Hermes' first-party Node-API (static_h) #372.
  2. CMake version drift on macOS unit tests — the macos-latest runner now ships CMake 4.2.x, but the project pins CMAKE_VERSION 4.1.2. The unit-tests job never pinned CMake, so macOS picked up the incompatible default.

What

  • Cherry-pick 050464b: commit packages/ferric-example/Cargo.lock (pins napi-derive-backend 5.0.2).
  • Add a macOS-only jwlawson/actions-setup-cmake step to the unit-tests job, mirroring the existing test-macos job.

Test plan

  • CI Check workflow passes on this PR (goal of this branch — watching for failures).

🤖 Generated with Claude Code

kraenhansen and others added 2 commits July 17, 2026 21:49
CI resolved Rust dependencies fresh on every run because Cargo.lock was
gitignored (a leftover from the initial `cargo new --lib` scaffolding in
#43 — the stock library-crate convention). That let `napi-derive-backend`
float to 5.1.2, which expands the `#[napi]` attribute macro into a broken
`ctor` `unify_features` invocation ("expected `(`, found `]`"), failing the
bootstrap build of every CI job that compiles ferric-example.

ferric-example is a `crate-type = ["cdylib"]` that builds a final `.node`
artifact, not a library published to crates.io, so committing Cargo.lock is
the recommended practice — the direct analogue of package-lock.json. The
committed lock pins napi-derive-backend 5.0.2 (last known-good). Verified
with `cargo build --locked`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The macos-latest runner now ships CMake 4.2.x, but the project pins
CMAKE_VERSION 4.1.2 (matching the React Native template and the version
used by the test-macos / Android SDK jobs). The unit-tests job did not
pin CMake, so macOS builds picked up the incompatible runner default.
Install the pinned version via jwlawson/actions-setup-cmake, mirroring
the test-macos job, gated to macOS runners.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCN2h9xbyn4yhxfVZyMzAm
@kraenhansen
kraenhansen merged commit b035b5d into main Jul 17, 2026
15 checks passed
@kraenhansen
kraenhansen deleted the kh/fix-main-ci branch July 17, 2026 20:14
kraenhansen added a commit that referenced this pull request Jul 17, 2026
The weak-node-api-tests job invokes cmake directly on macos-latest with
no version pin, so it picks up the runner's default CMake 4.2.x instead
of the project's pinned 4.1.2 — the same drift that broke the unit-tests
job (#374). This job runs on pushes to main, so leaving it unpinned would
turn main red. Install the pinned version via jwlawson/actions-setup-cmake,
gated to macOS runners, matching the unit-tests and test-macos jobs.


Claude-Session: https://claude.ai/code/session_01UCN2h9xbyn4yhxfVZyMzAm

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kraenhansen added a commit that referenced this pull request Jul 18, 2026
These two jobs build the weak-node-api Apple framework via cmake-rn on
macos-latest but never pinned CMake, so they hit the same 4.2.x
FRAMEWORK-vs-HEADERS-file-set error that broke unit-tests (#374) and
weak-node-api-tests (#375):

  CMake Error: The file set "HEADERS" is incompatible with the
  "FRAMEWORK" target "weak-node-api".

test-ios fails downstream ("Expected an XCFramework at
weak-node-api/build/Release/weak-node-api.xcframework") because the
framework never builds. Both run on pushes to main, so they keep main
red. Pin CMake to the project's 4.1.2 on both, matching the other jobs.

Interim workaround; proper CMakeLists fix tracked in #376.


Claude-Session: https://claude.ai/code/session_01UCN2h9xbyn4yhxfVZyMzAm

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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