Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Remove Hermes vendoring once React Native ships a Hermes with Node-API

Abierto
#412 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
android, cpp, react-native, ruby, typescript

Línea de trabajo

Primero consulta version.properties de React Native y comprueba el tag correspondiente de Hermes para API/napi/; después verifica que los artefactos distribuidos para Android y Apple expongan los símbolos y encabezados de Node-API requeridos. Revisa los archivos de CLI, Gradle, C++, podspec, workflow, app, documentación y paquete indicados antes de eliminar las rutas de vendoring. Se considera terminado cuando la aplicación de prueba se compila y supera las pruebas con React Native sin modificaciones, sin REACT_NATIVE_OVERRIDE_HERMES_DIR ni una configuración build-from-source.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Automatable Host 🏡

Tracking the removal of vendor-hermes and everything that hangs off it, gated on React Native shipping a Hermes that carries Node-API.

Why we vendor today

After #372 we no longer patch Hermes — we build it from a pinned commit on the static_h branch, which carries the first-party Node-API implementation under API/napi (target hermesNapi). The pin lives in packages/host/src/node/cli/hermes.ts, and the host calls into it directly (hermes_napi_create_env in packages/host/cpp/CxxNodeApiHostModule.cpp, with the hermes_napi_host struct mirrored in packages/host/cpp/HermesNapiHost.hpp).

React Native's own Hermes doesn't have that code yet, which is the only reason we need REACT_NATIVE_OVERRIDE_HERMES_DIR — and therefore the only reason consumers have to build React Native from source at all.

The gate

React Native doesn't tag every nightly, so read the head of the default branch rather than a release:

  1. packages/react-native/sdks/hermes-engine/version.properties on the default branch of facebook/react-nativeHERMES_VERSION_NAME.
  2. Check whether facebook/hermes at tag hermes-v$HERMES_VERSION_NAME has an API/napi/ directory.

State as of 2026-09-23:

  • HERMES_VERSION_NAME=260318099.0.2 (unchanged since at least 2026-09-14 — nine consecutive checks, 2026-09-14 through 2026-09-23, have all read the same value)
  • API/napi/hermes_napi.h → still 404 at hermes-v260318099.0.2, while API/hermes/hermes.h resolves at the same tag — so the tag is valid and still carries no Node-API. No open PR references this issue. Still nothing to poll for besides re-checking the gate.

That's the cheap signal to poll. Something like:

version=$(curl -fsSL https://raw.githubusercontent.com/facebook/react-native/main/packages/react-native/sdks/hermes-engine/version.properties | sed -n 's/^HERMES_VERSION_NAME=//p')
curl -fsSLo /dev/null "https://raw.githubusercontent.com/facebook/hermes/hermes-v$version/API/napi/hermes_napi.h" && echo "Node-API has landed in RN's Hermes ($version)"

Necessary, but not sufficient

The version check tells us the source has Node-API in it; before dropping anything we still need the shipped artifacts to expose it:

  • the hermes-engine AAR's libhermesvm.so must export hermes_napi_create_env (Hermes has to build the hermesNapi target and keep it visible under its global -fvisibility=hidden, cf. facebook/hermes#2106 — see the pin comment in hermes.ts),
  • the same for the Hermes framework shipped through the podspec on Apple platforms,
  • hermes_napi.h (or an equivalent public header) needs to reach us through prefab / the framework headers, so HermesNapiHost.hpp can include it instead of mirroring the struct,
  • IHermes::getVMRuntimeUnsafe() still has to be reachable from the JSI runtime.

The real acceptance test is the test app building and passing against a stock React Native with no REACT_NATIVE_OVERRIDE_HERMES_DIR set and no build-from-source configuration.

What removal touches

  • packages/host/src/node/cli/hermes.ts — the vendor-hermes command, plus its registration in packages/host/src/node/cli/program.ts (a breaking CLI change, so it wants a major changeset)
  • packages/host/android/build.gradle:7-17 — the REACT_NATIVE_OVERRIDE_HERMES_DIR guard, and packages/host/src/node/gradle.test.ts, which asserts that error
  • packages/host/scripts/patch-hermes.rb and its require_relative in the podspec
  • .github/workflows/check.yml:330-333 — the vendoring step in the Android job
  • apps/test-app/android/gradle.propertiesreact.buildFromSource=true becomes unnecessary
  • packages/host/cpp/HermesNapiHost.hpp — include the real hermes_napi.h instead of mirroring hermes_napi_host, which also removes the "re-diff on every pin bump" hazard
  • docs/ANDROID.md — most of it disappears; Android stops needing a source build (see #411 for its current state)
  • README.md (the supported-versions note), packages/host/README.md, AGENTS.md § Critical Build Dependencies
  • packages/host/package.json — the react-native peer dependency can widen from a single nightly to a real range

Related

  • #177 — prebuilt Node-API Hermes, the interim mitigation if this takes a while
  • #392 — react-native-macos blocked on the same story
  • #188 — the consumer-side Gradle settings helper, which becomes moot along with the source-build requirement
Lenguaje dominante
TypeScript
Estrellas
188
Forks
10
Merge medio
2 d 17 h
PR fusionados (30 d)
3

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstackincubator/react-native-node-api

Todos los issues de callstackincubator/react-native-node-api

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.