Skip to content

Commit 0315ac6

Browse files
committed
fix builds for SwiftPM and address comments on diff
1 parent 6f43ef8 commit 0315ac6

5 files changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/prebuild-ios-core.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
shell: bash
5151
run: |
5252
if [ "${{ inputs.use-hermes-nightly }}" == "true" ]; then
53+
# We are not publishing nightly versions of Hermes V1 yet.
54+
# For now, we can use the latest version of Hermes V1 published on maven and npm.
5355
HERMES_VERSION="latest-v1"
5456
else
5557
HERMES_VERSION=$(sed -n 's/^HERMES_V1_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)

packages/react-native/Package.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ let reactHermes = RNTarget(
222222
excludedPaths: ["inspector-modern/chrome/tests"],
223223
dependencies: [.reactNativeDependencies, .reactCxxReact, .reactJsiExecutor, .reactJsInspector, .reactJsInspectorTracing, .reactPerfLogger, .hermesPrebuilt, .jsi],
224224
defines: [
225-
CXXSetting.define("HERMES_ENABLE_DEBUGGER", to: "1", .when(configuration: BuildConfiguration.debug))
225+
// CXXSetting.define("HERMES_ENABLE_DEBUGGER", to: "1", .when(configuration: BuildConfiguration.debug))
226226
]
227227
)
228228

@@ -390,7 +390,7 @@ let reactRuntime = RNTarget(
390390
excludedPaths: ["tests", "iostests", "platform"],
391391
dependencies: [.reactNativeDependencies, .jsi, .reactJsiExecutor, .reactCxxReact, .reactJsErrorHandler, .reactPerformanceTimeline, .reactUtils, .reactFeatureFlags, .reactJsInspector, .reactJsiTooling, .reactHermes, .reactRuntimeScheduler, .hermesPrebuilt],
392392
defines: [
393-
CXXSetting.define("HERMES_ENABLE_DEBUGGER", to: "1", .when(configuration: BuildConfiguration.debug))
393+
// CXXSetting.define("HERMES_ENABLE_DEBUGGER", to: "1", .when(configuration: BuildConfiguration.debug))
394394
]
395395
)
396396

@@ -924,6 +924,7 @@ extension Target {
924924
.define("NDEBUG", .when(configuration: .release)),
925925
.define("USE_HERMES", to: "1"),
926926
.define("RCT_REMOVE_LEGACY_ARCH", to: "1"),
927+
.define("HERMES_V1_ENABLED", to: "1"),
927928
] + defines + cxxCommonHeaderPaths
928929

929930
return .target(

packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#include <jsi/decorator.h>
1414
#include <jsinspector-modern/InspectorFlags.h>
1515

16+
#include <thread>
17+
1618
#include <hermes/inspector-modern/chrome/HermesRuntimeTargetDelegate.h>
1719

1820
#if defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)

packages/react-native/scripts/ios-prebuild/hermes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ async function getLatestV1VersionFromNPM() /*: Promise<string> */ {
118118
}
119119

120120
const json = await npmResponse.json();
121-
const latestNightly = json.version;
122-
hermesLog(`Using version ${latestNightly}`);
123-
return latestNightly;
121+
const latestV1 = json.version;
122+
hermesLog(`Using version ${latestV1}`);
123+
return latestV1;
124124
}
125125

126126
async function getNightlyVersionFromNPM() /*: Promise<string> */ {

packages/react-native/sdks/hermes-engine/hermes-utils.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def hermes_commit_envvar_defined()
8686
end
8787

8888
def hermes_v1_enabled()
89-
return ENV['RCT_HERMES_V1_ENABLED'] == "1" || !ENV['RCT_HERMES_V1_ENABLED']
89+
return ENV['RCT_HERMES_V1_ENABLED'] == "1" || ENV['RCT_HERMES_V1_ENABLED'] == nil
9090
end
9191

9292
def force_build_from_tag(react_native_path)

0 commit comments

Comments
 (0)