Files
react-native/scripts
Christoph Purrer d205267a5f Compile out RuntimeScheduler_Legacy under RCT_REMOVE_LEGACY_ARCH (#57116)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/57116

## Changelog:
[General][Breaking] Compile out RuntimeScheduler_Legacy under RCT_REMOVE_LEGACY_ARCH

Guard the legacy RuntimeScheduler implementation behind the `RCT_REMOVE_LEGACY_ARCH` macro instead of deleting it. `RuntimeScheduler_Legacy.h`/`.cpp` remain in the tree, but their contents — along with the feature-flag-based selection between the legacy and modern schedulers in `RuntimeScheduler.cpp`, `NativeMutationObserver.cpp`, and `Task.h` — are wrapped in `#ifndef RCT_REMOVE_LEGACY_ARCH`. When the macro is defined, the legacy code is compiled out and `RuntimeScheduler` unconditionally instantiates `RuntimeScheduler_Modern`; when it is not defined, behavior is unchanged.

The C++ API snapshots are updated to drop the `RuntimeScheduler_Legacy` symbols from the new-arch surface, and the parameterized scheduler test (`RuntimeSchedulerTest`) only runs the modern configuration when the legacy arch is compiled out.

Reviewed By: rubennorte

Differential Revision: D107777881

fbshipit-source-id: 2b50711ab3af182edc45a87fd232d96a0f879837
2026-06-09 09:29:10 -07:00
..