Fix main CI: commit ferric Cargo.lock and pin macOS CMake#374
Merged
Conversation
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
This was referenced Jul 17, 2026
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>
2 tasks
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>
2 tasks
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.
Why
main's last green Check run is stale; the world moved on and two things now break CI:Cargo.lockfor ferric-example — CI resolved Rust deps fresh every run, lettingnapi-derive-backendfloat to a broken5.1.2and failing the bootstrap build. Cherry-picked from Adopt Hermes' first-party Node-API (static_h) #372.macos-latestrunner now ships CMake 4.2.x, but the project pinsCMAKE_VERSION4.1.2. Theunit-testsjob never pinned CMake, so macOS picked up the incompatible default.What
050464b: commitpackages/ferric-example/Cargo.lock(pinsnapi-derive-backend5.0.2).jwlawson/actions-setup-cmakestep to theunit-testsjob, mirroring the existingtest-macosjob.Test plan
🤖 Generated with Claude Code