Commit Graph
17 Commits
Author SHA1 Message Date
Nick LefeverandFacebook GitHub Bot 3306c3b962 Improve naming of the hermes variants (#51456)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51456

Going from:
* static_hermes_stable -> static_hermes
* static_hermes_trunk -> static_hermes_experimental

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D74999979

fbshipit-source-id: f20b07af4c7fddc6d162937b4c96f0bf60902dbd
2025-05-19 10:08:10 -07:00
Nick LefeverandFacebook GitHub Bot 01db5aa230 Support running tests with different hermes variants (#51451)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51451

This diff adds the `fantom_hermes_variant` pragma which can be set to:
- `hermes` for the default Hermes runtime used by RN
- `static_hermes` for the stable version of Static Hermes
- `static_hermes_trunk` for the "trunk" version of Static Hermes

Each variant will set up the correct build options for the runner and the correct compiler to use for the bundle.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74959718

fbshipit-source-id: 5d30c8e15ab052eb5686f26632f08ab42b5e68c7
2025-05-19 03:06:53 -07:00
Nick LefeverandFacebook GitHub Bot b1772de409 Make default mode used for benchmarks more obvious (#51446)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51446

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74958927

fbshipit-source-id: 245397c6e9a89a40e5c1260fcd624e5f6b9f7c8d
2025-05-19 03:06:53 -07:00
Tim YungandFacebook GitHub Bot 84de8a075e RN: Delete @oncall Annotations (#51416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51416

Deletes `oncall` annotations from the `facebook/react-native` repository.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D74902524

fbshipit-source-id: 32a6a5b2ff27281792d572f151e2b094d9a79029
2025-05-17 16:18:05 -07:00
Samuel SuslaandFacebook GitHub Bot 0f45d332d4 move Fantom's API to regular functions (#50035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50035

changelog: [internal]

to make it easier to write JSDocs, let's export functions directly from index.js instead of using proxy object.

Reviewed By: rubennorte

Differential Revision: D71200977

fbshipit-source-id: 0b53c0d3f73577c19253537b9e884459a4920643
2025-03-14 11:12:15 -07:00
Rubén NorteandFacebook GitHub Bot 1e38964e91 Clean up enableDOMDocumentAPI feature flag (#49990)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49990

Changelog: [internal]

This cleans up the flag and makes the Document API essentially part of the DOM APIs flag, after we've verified this is stable in a production experiment.

Reviewed By: sammy-SC

Differential Revision: D68772174

fbshipit-source-id: 3b3d0c4369a648faab3dc7caed8eec2c95fa05b3
2025-03-13 05:50:59 -07:00
Nick LefeverandFacebook GitHub Bot ed106640c3 Rename fantom_internal_flags pragma to fantom_react_fb_flags (#49728)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49728

See title.

Resolving https://www.internalfb.com/diff/D70242739?dst_version_fbid=1295747645054627&transaction_fbid=1285615715828636

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D70328653

fbshipit-source-id: c3e7377760f53bc37d1a6f3e25a0053e12d4f66e
2025-02-27 09:50:45 -08:00
Nick LefeverandFacebook GitHub Bot e2642d5567 Add support for setting internal feature flags (#49693)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49693

Allow setting the ReactNativeInternalFeatureFlags from a Fantom test using the `fantom_internal_flags` pragma.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D70242739

fbshipit-source-id: 17a69edbd58b93f8b8060192b9881e62febf9635
2025-02-27 04:16:36 -08:00
Rubén NorteandFacebook GitHub Bot e3141308bb Enable DOM APIs by default in Fantom tests (#49690)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49690

Changelog: [internal]

We're shipping this soon and most tests already using DOM APIs to make assertions, so it's easier if we just "ship" in tests.

Reviewed By: javache, sammy-SC

Differential Revision: D69307129

fbshipit-source-id: 75d0be013703cff7bc2bad5cd16c26bc6471e547
2025-02-26 07:09:15 -08:00
Rubén NorteandFacebook GitHub Bot 591b0ffc0e Add basic benchmarks for rendering views (#49008)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49008

Changelog: [internal]

We're modifying some core APIs in the RN render in following diffs, so this adds a simple benchmark as a safety mechanism to verify those don't regress performance significantly.

Reviewed By: yungsters

Differential Revision: D68772175

fbshipit-source-id: 3bc446e68495dc04590b613297baa00589fb5f8d
2025-01-29 09:39:49 -08:00
Samuel SuslaandFacebook GitHub Bot 84b8e6a531 unify Fantom calling convention to Fantom.foo (#48924)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48924

changelog: [internal]

All other Fantom tests are using Fantom.foo style instead of `foo`. Let's unify codebase on this.

Reviewed By: christophpurrer

Differential Revision: D68552829

fbshipit-source-id: eeefc449b1f33161b3583dd68b08f83455d1a959
2025-01-25 14:58:28 -08:00
Rubén NorteandFacebook GitHub Bot 0736234e90 Use test name as a hint for benchmarks (#48882)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48882

Changelog: [internal]

The current hint for benchmarks is that the test body contains `unstable_benchmark` calls, but some benchmarks that need to use feature flags define their test bodies in a separate file, so the file containing the call to `unstable_benchmark` isn't the `-itest.js` one.

This adds a new hint to opt into optimized builds that uses the name of the test instead of its contents. If it contains `-benchmark` then we consider it a benchmark and do the opt in.

Reviewed By: andrewdacenko

Differential Revision: D68102300

fbshipit-source-id: 4c0909969f76b8a7d563959cccf686aefaef700d
2025-01-23 10:26:47 -08:00
Rubén NorteandFacebook GitHub Bot 8310d651e0 Mark benchmark API as unstable (#48570)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48570

Changelog: [internal]

We're still iterating on this feature and making sure it reports stable results, so marking it as `unstable` to set expectations.

Reviewed By: andrewdacenko

Differential Revision: D67975844

fbshipit-source-id: 41e93cb9cb0c887a96178e4a4d5078d1899b2478
2025-01-09 10:11:18 -08:00
Rubén NorteandFacebook GitHub Bot 3795f0fb66 Add API to run benchmarks in Fantom (#48452)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48452

Changelog: [internal]

Implements a basic API to run benchmarks with Fantom (using `tinybench` under the hood):

```
import {benchmark} from 'react-native/fantom';

benchmark
  .suite('Suite name', {
    // options
  })
  .add(
    'Test name',
    () => {
      // code to benchmark
    },
    {
      beforeAll: () => {},
      beforeEach: () => {},
      afterEach: () => {},
      afterAll: () => {},
    },
  )
  .verify(results => {
    // check results and throw an error if the expectations fail
  });
```

Features:
* Print benchmark results in the console as a table.
* It opts into optimized builds automatically
* Verifies that optimized build is used (unless manually opting out of the check via `disableOptimizedBuildCheck`).
* Supports verification of results (making expectations and making the test fail if the benchmark doesn't meet some expectations).

Reviewed By: rshest

Differential Revision: D66926183

fbshipit-source-id: 61cfa7689ea7684eb870fbbc815b8d236a1871e6
2025-01-06 07:10:28 -08:00
Rubén NorteandFacebook GitHub Bot 3cc67fed36 Add Fantom mode for development with Hermes bytecode (#48178)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48178

Changelog: [internal]

Adds a new mode for Fantom to run tests with dev-mode bytecode. Right now the modes were only dev (development with source code) or opt (optimized bytecode).

Reviewed By: rshest

Differential Revision: D66888986

fbshipit-source-id: 34b2566a65d138790e16f8fb5787fd9c2bcde536
2024-12-09 05:43:27 -08:00
Rubén NorteandFacebook GitHub Bot 4d07fb7662 Use enum for Fantom modes (#48179)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48179

Changelog: [internal]

Migrating this type to an enum, which is safer, because it prevents errors like:

```
// when it's actually 'dev'
if (mode === 'development') {

}
```

Reviewed By: rshest

Differential Revision: D66888985

fbshipit-source-id: 4f3f91fad6ca5256baa2123425b2bad11fe036f9
2024-12-09 05:43:27 -08:00
Rubén NorteandFacebook GitHub Bot 81fbd18410 Move remaining Fantom files to react-native-fantom (#48143)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48143

Changelog: [internal]

Just a small cleanup to move `jest/integration/*` to `packages/react-native-fantom`, so everything related to Fantom (config, runner, runtime, etc.) is in the same directory.

Reviewed By: javache

Differential Revision: D66874763

fbshipit-source-id: 8b87d7320c7704f7ce6cd58761508193784f5ce2
2024-12-06 05:24:31 -08:00