Repository navigation
Conversation
2 of 3 tasks
huntie
marked this pull request as ready for review
October 30, 2026 18:35
vzaidman
approved these changes
Nov 3, 2026
|
@vzaidman has imported this pull request. If you are a Meta employee, you can view this in D129345367. |
Collaborator
Author
|
@huntie-bot Pick this to 0.89 when merged. |
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 6, 2026
## Summary The C++ unit tests under `packages/react-native/ReactCommon/**/tests` run only inside Meta, under Buck. Public CI has no build for them, so a change that breaks one passes every GitHub check and fails only after import, as happened with #59686. This adds a `test_react_common_cxx` job to `Test All` that builds and runs them on Linux, reusing the Fantom tester's CMake build, which already compiles every ReactCommon library with folly, Hermes and codegen. **Changes** - Add `private/react-native-fantom/tester/react-common-tests/`: one GoogleTest executable per `tests` directory (38 today), linked against the libraries `fantom_tester` links. Each test case is registered with CTest through `gtest_discover_tests`, so it runs in its own process. - Add `:private:react-native-fantom:testReactCommon`, which builds them and runs `ctest`. GoogleTest 1.18.0 is downloaded like the Fantom tester's other dependencies. - Add the `test_react_common_cxx` job to `test-all.yml`, mirroring `build_fantom_runner` on the same container and runner. It adds no ccache steps: in this container compiles do not go through ccache, and `build_fantom_runner` on `main` reports 0 hits and 0 misses. **Notes** - NOTE: Three Hermes debugger cases in `jsinspector-modern/tests` fail in OSS on macOS and Linux alike, and are excluded by name in the CMake file (see Test Plan). - The job installs clang 18 from apt.llvm.org, since the tests use C++20 features the image's clang 14 lacks: `std::source_location` and parenthesised aggregate initialisation. - Each case runs in its own process because some suites leave global state behind. In `jsinspector-modern/tests`, `TracingTest` fails when run after the other suites in one process, and passes on its own. - The tests compile with `-Wno-error`, since the header-only ReactCommon libraries export `-Werror -Wpedantic` and a few tests call deprecated APIs. - `benchmarks/` directories are left out, as they need Google Benchmark. Changelog: [Internal] ## Test Plan On macOS (Apple clang 21, CMake 3.30.5 from the Android SDK, JDK 17): ``` yarn install ./gradlew :private:react-native-fantom:testReactCommon ``` All 38 test executables build, and 1522 test cases pass, one of which skips itself (`ReactInstanceTest.testRegistersRuntimeSchedulerAsEventLoopControl`: this Hermes build has no `ISetEventLoopControl`). Before the exclusions, 1525 cases ran and these 3 failed, with the same result on macOS and in this job on Linux: - `JsiIntegrationHermesTest.ResolveColumnlessBreakpointAfterEval`: `Debugger.setBreakpointByUrl` returns no `locations`. - `JsiIntegrationHermesTest.ResolveColumnlessBreakpointAfterReload`: the same. - `JsiIntegrationHermesTest.TwoConnectionsDebuggerLifecycle`: the second session gets no `Debugger.scriptParsed` after the first disables `Debugger`. `test_react_common_cxx` on this PR: [passed](https://github.com/react/react-native/actions/runs/41937402196/job/126950417455) in 14m15s, with all 1522 tests passing. Running them takes 30 seconds of that; the rest is the build. <img width="400" alt="image" src="https://github.com/user-attachments/assets/1db09ec6-0d7f-45a4-b2a4-e87128bd3f5e" /> <img width="400" alt="file-bccb81bc0762aa22ac5f3c2165826db4" src="https://github.com/user-attachments/assets/50acc10a-6551-4bde-90f6-7466c72083c2" /> <img width="400" alt="file-49c0f65500ec760461f11925dfbc4059" src="https://github.com/user-attachments/assets/6aeb7b06-b282-4316-a905-365bcc2c9bf5" /> Differential Revision: D129898681 Pull Request resolved: #59802
Collaborator
Author
|
@huntie-bot Rebase for conflicts |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Frame timings and screenshots in the React Native DevTools CDP backend have been on in canary since the flag was added. Enable them by default, matching the DevTools frontend, which no longer gates the Performance panel's frames track behind an experiment.
Why now? / Launch support
I always intended to follow up on this. The canary rollout earlier in the year followed significant hardening of this feature on both platforms, including active use in multiple product teams at Meta across various device classes — have been pretty confident this was prod ready for a while.
For (and Expo SDK 59), I'll have the cycles to support this (docs, any integration issues) through to launch.
Changelog:
[General][Changed] - React Native DevTools: Frame timings and screenshots in the Performance panel are enabled by default
Test Plan
node packages/react-native/scripts/featureflags/index.js --updateregenerated the six flag files; the diff has the same shape as 66b3ae6 ("Promote fuseboxWebSocketEventsEnabled to stable").mainsince promotion to canary — nothing flagged.Sanity check: E2E
With react/react-native-devtools-frontend#288 applied.