From 082db1e0a763530aa49497e2a6635165d3a7f221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Mon, 28 Jul 2025 06:35:49 -0700 Subject: [PATCH] Remove static_hermes_staging variant for Fantom tests (#52861) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52861 Changelog: [internal] We added this mode recently to support all local Hermes variants, but this doubles the number of build type combinations which regresses test execution time and give us little benefit, so we're removing it. Reviewed By: rshest Differential Revision: D79080370 fbshipit-source-id: e1b536427acb98ec01edfd44829e2fef9be9b18d --- .../runner/formatFantomConfig.js | 2 -- .../runner/getFantomTestConfigs.js | 8 ++------ private/react-native-fantom/runner/utils.js | 6 +----- ...omHermesVariantStaticHermesStaging-itest.js | 18 ------------------ 4 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 private/react-native-fantom/src/__tests__/FantomHermesVariantStaticHermesStaging-itest.js diff --git a/private/react-native-fantom/runner/formatFantomConfig.js b/private/react-native-fantom/runner/formatFantomConfig.js index 642a8f647db..02a243f19b5 100644 --- a/private/react-native-fantom/runner/formatFantomConfig.js +++ b/private/react-native-fantom/runner/formatFantomConfig.js @@ -35,8 +35,6 @@ function formatFantomHermesVariant(hermesVariant: HermesVariant): string { return 'hermes'; case FantomTestConfigHermesVariant.StaticHermesStable: return 'shermes 🆕'; - case FantomTestConfigHermesVariant.StaticHermesStaging: - return 'shermes ⏭️'; case FantomTestConfigHermesVariant.StaticHermesExperimental: return 'shermes 🧪'; } diff --git a/private/react-native-fantom/runner/getFantomTestConfigs.js b/private/react-native-fantom/runner/getFantomTestConfigs.js index 2b9ba1e3028..0a92d698598 100644 --- a/private/react-native-fantom/runner/getFantomTestConfigs.js +++ b/private/react-native-fantom/runner/getFantomTestConfigs.js @@ -142,8 +142,8 @@ export function getOverrides( * - `fantom_mode`: specifies the level of optimization to compile the test * with. Valid values are `dev`, `dev-bytecode` and `opt`. * - `fantom_hermes_variant`: specifies the Hermes variant to use to run the - * test. Valid values are `hermes`, `static_hermes_stable`, - * `static_hermes_staging` and `static_hermes_experimental`. + * test. Valid values are `hermes`, `static_hermes_stable` and + * `static_hermes_experimental`. * - `fantom_flags`: specifies the configuration for common and JS-only feature * flags. They can be specified in the same pragma or in different ones, and * the format is `:`. @@ -233,9 +233,6 @@ export default function getFantomTestConfigs( case 'static_hermes_stable': config.hermesVariant = HermesVariant.StaticHermesStable; break; - case 'static_hermes_staging': - config.hermesVariant = HermesVariant.StaticHermesStaging; - break; case 'static_hermes_experimental': config.hermesVariant = HermesVariant.StaticHermesExperimental; break; @@ -243,7 +240,6 @@ export default function getFantomTestConfigs( configVariations.push([ {hermesVariant: HermesVariant.Hermes}, {hermesVariant: HermesVariant.StaticHermesStable}, - {hermesVariant: HermesVariant.StaticHermesStaging}, {hermesVariant: HermesVariant.StaticHermesExperimental}, ]); break; diff --git a/private/react-native-fantom/runner/utils.js b/private/react-native-fantom/runner/utils.js index 22e9a399420..6b41733ce0a 100644 --- a/private/react-native-fantom/runner/utils.js +++ b/private/react-native-fantom/runner/utils.js @@ -20,7 +20,7 @@ const BUCK_ISOLATION_DIR = 'react-native-fantom-buck-out'; export enum HermesVariant { Hermes, StaticHermesStable, // Static Hermes Stable - StaticHermesStaging, // Static Hermes Staging + // This creates too many combinations and it's not worth the cost for now. StaticHermesExperimental, // Static Hermes Trunk } @@ -32,8 +32,6 @@ export function getBuckOptionsForHermes( return []; case HermesVariant.StaticHermesStable: return ['-c hermes.static_hermes=stable']; - case HermesVariant.StaticHermesStaging: - return ['-c hermes.static_hermes=staging']; case HermesVariant.StaticHermesExperimental: return ['-c hermes.static_hermes=trunk']; } @@ -45,8 +43,6 @@ export function getHermesCompilerTarget(variant: HermesVariant): string { return '//xplat/hermes/tools/hermesc:hermesc'; case HermesVariant.StaticHermesStable: return '//xplat/shermes/stable:hermesc'; - case HermesVariant.StaticHermesStaging: - return '//xplat/shermes/staging:hermesc'; case HermesVariant.StaticHermesExperimental: return '//xplat/static_h:hermesc'; } diff --git a/private/react-native-fantom/src/__tests__/FantomHermesVariantStaticHermesStaging-itest.js b/private/react-native-fantom/src/__tests__/FantomHermesVariantStaticHermesStaging-itest.js deleted file mode 100644 index a0ffdb11948..00000000000 --- a/private/react-native-fantom/src/__tests__/FantomHermesVariantStaticHermesStaging-itest.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @fantom_hermes_variant static_hermes_staging - */ - -declare var HermesInternal: $HermesInternalType; - -describe('"@fantom_hermes_variant static_hermes_staging" in docblock', () => { - it('should use Static Hermes', () => { - expect(HermesInternal.getRuntimeProperties?.()['Static Hermes']).toBe(true); - }); -});