Skip to content

Commit b5bd0aa

Browse files
lavenzgfacebook-github-bot
authored andcommitted
Set default hermes variable to SH stable, remove legacy hermes (#54522)
Summary: As we are moving to SH stable as default, `DEFAULT_HERMES_VARIANT` should be set to SH stable. Note that this will cause fantom tests to be skipped in OSS for now. Changelog: [Internal] Differential Revision: D86885030
1 parent 1859245 commit b5bd0aa

File tree

7 files changed

+13
-27
lines changed

7 files changed

+13
-27
lines changed

packages/react-native/src/private/__tests__/MemoryBaseline-itest.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ declare var performance: Performance;
2929
*/
3030
const MEMORY_LIMITS_KB = {
3131
environmentSetup: {
32-
dev: 1000,
33-
opt: 500,
32+
dev: 1200,
33+
opt: 600,
3434
},
3535
basicSurfaceRender: {
36-
dev: 1200,
37-
opt: 700,
36+
dev: 1700,
37+
opt: 900,
3838
},
3939
};
4040

private/react-native-fantom/runner/formatFantomConfig.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ function formatModesShort(overrides: PartialFantomTestConfig) {
8282

8383
function formatFantomHermesVariant(hermesVariant: HermesVariant): string {
8484
switch (hermesVariant) {
85-
case FantomTestConfigHermesVariant.Hermes:
86-
return 'hermes';
8785
case FantomTestConfigHermesVariant.StaticHermesStable:
8886
return 'shermes 🆕';
8987
case FantomTestConfigHermesVariant.StaticHermesExperimental:

private/react-native-fantom/runner/getFantomTestConfigs.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ export const FantomTestConfigHermesVariant = HermesVariant;
5959
export const DEFAULT_IS_NATIVE_OPTIMIZED: boolean = false;
6060
export const DEFAULT_IS_JS_OPTIMIZED: boolean = false;
6161
export const DEFAULT_IS_JS_BYTECODE: boolean = false;
62-
export const DEFAULT_HERMES_VARIANT: HermesVariant = HermesVariant.Hermes;
62+
export const DEFAULT_HERMES_VARIANT: HermesVariant =
63+
HermesVariant.StaticHermesStable;
6364

6465
export const DEFAULT_FEATURE_FLAGS: FantomTestConfigFeatureFlags = {
6566
common: {},
@@ -147,8 +148,7 @@ export function getOverrides(
147148
* - `fantom_mode`: specifies the level of optimization to compile the test
148149
* with. Valid values are `dev` and `opt`.
149150
* - `fantom_hermes_variant`: specifies the Hermes variant to use to run the
150-
* test. Valid values are `hermes`, `static_hermes_stable` and
151-
* `static_hermes_experimental`.
151+
* test. Valid values are `static_hermes_stable` and `static_hermes_experimental`.
152152
* - `fantom_flags`: specifies the configuration for common and JS-only feature
153153
* flags. They can be specified in the same pragma or in different ones, and
154154
* the format is `<flag_name>:<value>`.
@@ -294,9 +294,6 @@ export default function getFantomTestConfigs(
294294
const hermesVariant = maybeHermesVariant;
295295

296296
switch (hermesVariant) {
297-
case 'hermes':
298-
config.hermesVariant = HermesVariant.Hermes;
299-
break;
300297
case 'static_hermes_stable':
301298
config.hermesVariant = HermesVariant.StaticHermesStable;
302299
break;
@@ -305,7 +302,6 @@ export default function getFantomTestConfigs(
305302
break;
306303
case '*':
307304
configVariations.push([
308-
{hermesVariant: HermesVariant.Hermes},
309305
{hermesVariant: HermesVariant.StaticHermesStable},
310306
{hermesVariant: HermesVariant.StaticHermesExperimental},
311307
]);

private/react-native-fantom/runner/runner.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import {
4343
updateSnapshotsAndGetJestSnapshotResult,
4444
} from './snapshotUtils';
4545
import {
46-
HermesVariant as HermesVariantEnum,
4746
getDebugInfoFromCommandResult,
4847
printConsoleLog,
4948
runCommand,
@@ -264,10 +263,7 @@ module.exports = async function runTest(
264263
continue;
265264
}
266265

267-
if (
268-
EnvironmentOptions.isOSS &&
269-
testConfig.hermesVariant !== HermesVariantEnum.Hermes
270-
) {
266+
if (EnvironmentOptions.isOSS) {
271267
testResultsByConfig.push(
272268
skippedTestResults({
273269
ancestorTitles: [

private/react-native-fantom/runner/utils.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {SourceMapConsumer} from 'source-map';
1818
const BUCK_ISOLATION_DIR = 'react-native-fantom-buck-out';
1919

2020
export enum HermesVariant {
21-
Hermes,
2221
StaticHermesStable, // Static Hermes Stable
2322
// This creates too many combinations and it's not worth the cost for now.
2423
StaticHermesExperimental, // Static Hermes Trunk
@@ -31,8 +30,6 @@ export function getBuckOptionsForHermes(
3130
? ['-c hermes.memory_instrumentation=true']
3231
: [];
3332
switch (variant) {
34-
case HermesVariant.Hermes:
35-
return baseOptions;
3633
case HermesVariant.StaticHermesStable:
3734
return [...baseOptions, '-c hermes.static_hermes=stable'];
3835
case HermesVariant.StaticHermesExperimental:
@@ -42,8 +39,6 @@ export function getBuckOptionsForHermes(
4239

4340
export function getHermesCompilerTarget(variant: HermesVariant): string {
4441
switch (variant) {
45-
case HermesVariant.Hermes:
46-
return '//xplat/hermes/tools/hermesc:hermesc';
4742
case HermesVariant.StaticHermesStable:
4843
return '//xplat/shermes/stable:hermesc';
4944
case HermesVariant.StaticHermesExperimental:

private/react-native-fantom/src/__tests__/__snapshots__/expect-itest.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ exports[`expect toMatchSnapshot() complex types 8`] = `/asd/`;
3535

3636
exports[`expect toMatchSnapshot() complex types 9`] = `
3737
Promise {
38-
"_h": 0,
39-
"_i": 0,
40-
"_j": null,
41-
"_k": null,
38+
"_A": null,
39+
"_x": 0,
40+
"_y": 0,
41+
"_z": null,
4242
}
4343
`;
4444

private/react-native-fantom/src/__tests__/expect-itest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*
77
* @flow strict-local
88
* @format
9+
* @fantom_hermes_variant static_hermes_stable
910
*/
1011

1112
import * as React from 'react';

0 commit comments

Comments
 (0)