Repository navigation
macOS test app is blocked on react-native-macos β₯ 0.82 (Hermes static_h build scripts)Β #392
Description
Tracking the Test app (macOS) failure on #372 ("Adopt Hermes' first-party Node-API (static_h)"), and the conditions under which the macOS job can be re-enabled.
Status
The MacOS π» label has been removed from #372, so Test app (macOS) no longer runs there. macOS is knowingly deferred β everything else in that PR (iOS, Android, the Node.js tooling) is unaffected.
Why it fails
#372 vendors Hermes from facebook/hermes static_h (pinned SHA) and lets React Native build it from source via REACT_NATIVE_OVERRIDE_HERMES_DIR. On iOS that's RN 0.88.0-nightly, whose Hermes build scripts match. On macOS the app is scaffolded by scripts/init-macos-test-app.ts against react-native-macos@0.81.8 / react-native@0.81.6, and RN 0.81's Hermes build scripts predate the static_h changes we depend on:
-
[RN] [1] Build Hermescfails immediately. RN 0.81'ssdks/hermes-engine/utils/build-hermesc-xcode.shinvokescmake -S β¦ -B β¦ -DJSI_DIR=β¦with no-DCMAKE_BUILD_TYPE, and wraps it inenv -i, so nothing can be injected from the outside. The pinned Hermes hard-errors in its rootCMakeLists.txt:CMake Error at CMakeLists.txt:46 (message): Please set CMAKE_BUILD_TYPEReproduced locally against the pinned SHA with
react-native-macos@0.81.8'sReactCommon/jsi: configure fails as above, and succeeds once-DCMAKE_BUILD_TYPE=Releaseis added. Upstream RN added that flag in 0.82.0. -
[RN] [2] Build Hermeswould fail next. RN 0.81'sbuild-hermes-xcode.shbuilds--target libhermesand copiesAPI/hermes/hermes.framework. In the pinned Hermes the target ishermesvmand the bundle islib/hermesvm.framework(same rename we handled for Android in Adopt Hermes' first-party Node-API (static_h)Β #372). RNmainwas updated for this; 0.81 was not. -
Likely next: JSI header skew. Adopt Hermes' first-party Node-API (static_h)Β #372 drops the step that copied Hermes' JSI headers into RN's
ReactCommon/jsi, on the grounds that the pinned Hermes and RN 0.87+ agree. RN 0.81 does not, so the host module's use ofIHermes/getVMRuntimeUnsafe()may not compile even once (1) and (2) are past.
Note: the second failed phase in CI ([CP] Copy XCFrameworks for weak-node-api) is most likely collateral β an earlier run with the same Hermesc error reported that phase as passing. Confirm rather than assume once the build gets further.
What gates re-enabling macOS
react-native-macos must ship a release based on React Native β₯ 0.82 (that release carries both the CMAKE_BUILD_TYPE fix and the hermesvm rename). Today latest is 0.81.9, next is 0.81.0, nightly is 0.78.4 β there is no 0.82+ line at all, so bumping the pin within 0.81.x buys nothing.
When that lands:
- Bump
REACT_NATIVE_MACOS_VERSION/REACT_NATIVE_VERSIONinscripts/init-macos-test-app.ts(they are peer-locked; keep them in lockstep). - Re-add the
MacOS π»label to the relevant PR β the job in.github/workflows/check.ymlis already label-gated, so no workflow change is needed. - Expect to work through (3) above: JSI/
IHermescompatibility against the newer react-native-macos.
A local workaround is possible in the meantime (patch react-native-macos's two Hermes scripts from vendor-hermes), but it papers over a gap that keeps widening with every further static_h change, and does nothing about (3). Preferred order is: wait for upstream, then bump.
Related: #372, #391 (captures the raw xcodebuild log so a script phase failure is diagnosable at all).
Activity
kraenhansen commentedon Aug 13, 2026
Extra step once this is unblocked: move macOS onto the prebuilt Hermes archive
Apple platforms no longer build Hermes as part of the app build. A new
prebuilt-hermescommand builds the pinned commit once into an archive, whichscripts/patch-hermes.rbhands to React Native viaHERMES_ENGINE_TARBALL_PATH(branchclaude/hermes-source-build-cache-zk13mc).react-native-macoswas deliberately left on the old source path, since the archive is only produced and exercised for the iOS platforms today:So the re-enabling checklist in the issue body gains a fourth item β and note that item 3 (JSI header skew) is the same constraint that decides whether this works at all, since the archive is compiled against a specific package's
ReactCommon/jsi:react-native-macosβ₯ 0.82 is in place:react_native_package == "react-native-macos"branch frompackages/host/scripts/patch-hermes.rb, and pass--platform macosxfor that package instead (prebuilt-hermesalready takes it;hermes-prebuilt.tsdeliberately keepsmacosxout of the universal XCFramework becausehermes-engine.podspecvendors macOS as a plain framework).Resolve prebuilt Hermes name/Cache prebuilt Hermes/Build prebuilt Hermessteps to thetest-macosjob in.github/workflows/check.yml, mirroringtest-ios. Without them that job pays a full macOS Hermes build on every run.react-native-macos's vendoredhermes-engine.podspecstill honoursHERMES_ENGINE_TARBALL_PATHand expects the samedestroot/layout. The archive is built for whichever React Native package the app resolves, so areact-native-macosarchive gets its own name and never collides with the iOS one β but a podspec that reads the tarball differently would need handling here..github/workflows/hermes-prebuilt.ymlto publish the macOS archive alongside the iOS one, otherwise macOS consumers fall back to building locally.Generated by Claude Code
Use the prebuilt Hermes archive for iOS builds
Use the prebuilt Hermes archive for iOS builds
Use the prebuilt Hermes archive for iOS builds (#441)
Use the prebuilt Hermes archive for iOS builds (#441)
Use the prebuilt Hermes archive for iOS builds (#441)
Use the prebuilt Hermes archive for iOS builds (#441)
Use the prebuilt Hermes archive for iOS builds (#441)