From b05ab2f8d87b904cc4ff4e3e34dc35fd329581f1 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Mon, 11 May 2026 12:55:12 -0700 Subject: [PATCH] Update stale 'Hermes V1' comments (#56757) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56757 Update comments that still say 'Hermes V1' as if it is an opt-in feature. Since Hermes (formerly called Hermes V1) is now the only supported engine: - hermes-engine.podspec: drop 'when using Hermes V1' from hermesc note - PathUtils.kt: rewrite the hermesc path comment to drop the 'opted in to Hermes V1' phrasing - hermes-engine/build.gradle.kts: 'Hermes V1 by default...' -> 'Hermes by default...' ## Changelog: [Internal] - Reviewed By: cortinico Differential Revision: D104649634 fbshipit-source-id: 9b0a05ed013c7ba908c7abe467d5e3c1c3c2f26c --- .../src/main/kotlin/com/facebook/react/utils/PathUtils.kt | 8 +++----- .../react-native/sdks/hermes-engine/hermes-engine.podspec | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PathUtils.kt b/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PathUtils.kt index fc5a9a63a7c..9b8c86d76e8 100644 --- a/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PathUtils.kt +++ b/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PathUtils.kt @@ -123,11 +123,9 @@ private fun detectCliFile( * 1. The path provided by the `hermesCommand` config in the `react` Gradle extension * 2. The file located in `node_modules/react-native/sdks/hermes/build/bin/hermesc`. This will be * used if the user is building Hermes from source. - * 3. The file located in `node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc` where `%OS-BIN%` - * is substituted with the correct OS arch. This will be used if the user is using a precompiled - * hermes-engine package. Or, if the user has opted in to use Hermes V1, the used file will be - * located in `node_modules/hermes-compiler/%OS-BIN%/hermesc` where `%OS-BIN%` is substituted - * with the correct OS arch. + * 3. The file located in `node_modules/hermes-compiler/%OS-BIN%/hermesc` where `%OS-BIN%` is + * substituted with the correct OS arch. This is used when Hermes V1 is consumed as a prebuilt + * package via the `hermes-compiler` npm package. * 4. Fails otherwise */ internal fun detectOSAwareHermesCommand( diff --git a/packages/react-native/sdks/hermes-engine/hermes-engine.podspec b/packages/react-native/sdks/hermes-engine/hermes-engine.podspec index f3af9cd0fb7..6ef12a1f68a 100644 --- a/packages/react-native/sdks/hermes-engine/hermes-engine.podspec +++ b/packages/react-native/sdks/hermes-engine/hermes-engine.podspec @@ -65,7 +65,7 @@ Pod::Spec.new do |spec| end # When using the local prebuilt tarball, it should include hermesc compatible with the used VM. - # In other cases, when using Hermes V1, the prebuilt versioned binaries can be used. + # In other cases, the prebuilt versioned Hermes V1 hermesc binaries from the hermes-compiler npm package can be used. if source_type != HermesEngineSourceType::LOCAL_PREBUILT_TARBALL hermes_compiler_path = File.dirname(Pod::Executable.execute_command('node', ['-p', "require.resolve(\"hermes-compiler\", {paths: [\"#{react_native_path}\"]})", __dir__]).strip