Skip to content

Drop cxxreact:bridge dep from runtimescheduler (#57240)#57240

Open
javache wants to merge 3 commits into
react:mainfrom
javache:export-D108786501
Open

Drop cxxreact:bridge dep from runtimescheduler (#57240)#57240
javache wants to merge 3 commits into
react:mainfrom
javache:export-D108786501

Conversation

@javache

@javache javache commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary:

Narrow the runtimescheduler's cxxreact dep. Previously runtimescheduler depended on the full cxxreact:bridge target; it only needs cxxreact:tracesection (for TraceSection.h) plus jserrorhandler:jserrorhandler (for handleJSError, since Phase 1 moved ErrorUtils there) plus jsi directly. Also adds jsi to the explicit dep list — runtimescheduler was previously pulling it in transitively through cxxreact:bridge.

Verified with buck2 uquery 'somepath(...:runtimeschedulerAndroid, ...:bridgeAndroid)' — no path; the edge is gone.

Changelog:
[Internal]

Reviewed By: christophpurrer

Differential Revision: D108786501

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 16, 2026
@meta-codesync

meta-codesync Bot commented Jun 16, 2026

Copy link
Copy Markdown

@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D108786501.

javache added 3 commits June 29, 2026 02:26
Summary:
Split the `react/bridging` headers out of the `ReactCommon` pod's `turbomodule/bridging` subspec into a standalone `React-bridging` podspec, mirroring the existing `React-bridging` SwiftPM target. This makes bridging a dependency-graph leaf so other modules can depend on it without pulling in `ReactCommon` / `React-cxxreact`.

Consumers that previously reached `react/bridging` headers transitively through `ReactCommon` now resolve them through the standalone pod. The CocoaPods header-search-path injection in `update_search_paths` lists `React-bridging` alongside the other core frameworks so the headers resolve everywhere, and pods that link the `LongLivedObject` / `CallbackWrapper` symbols (`React-Fabric`, the nativemodule feature pods, `React-NativeModulesApple`, `React-RCTFBReactNativeSpec`) gain an explicit `React-bridging` dependency. All `ReactCommon/turbomodule/bridging` references in podspecs, the autolinker, the codegen template, and their test snapshots are repointed to `React-bridging`.

Changelog:
[Internal]

Differential Revision: D109868509
Summary:
Move `handleJSError` from `cxxreact/ErrorUtils.h` (header-inline) to `jserrorhandler/ErrorUtils.{h,cpp}` (declared + linked). Inverts the cyclic dep so `jserrorhandler` becomes a standalone leaf and `cxxreact:bridge` can be narrowed out of more consumers in follow-ups.

The old `<cxxreact/ErrorUtils.h>` include path continues to work via a deprecated `#warning` forwarder header that includes the new location. `cxxreact:bridge` now depends on `jserrorhandler:jserrorhandler` so existing consumers of the deprecated path still link cleanly. `jserrorhandler/BUCK` drops its `cxxreact:bridge` dep (and the matching `React-cxxreact` podspec entry).

Changelog:
[Internal]

Differential Revision: D108786498
Summary:
Pull Request resolved: react#57240

Narrow the runtimescheduler's cxxreact dep. Previously runtimescheduler depended on the full `cxxreact:bridge` target; it only needs `cxxreact:tracesection` (for `TraceSection.h`) plus `jserrorhandler:jserrorhandler` (for `handleJSError`, since Phase 1 moved `ErrorUtils` there) plus `jsi` directly. Also adds `jsi` to the explicit dep list — `runtimescheduler` was previously pulling it in transitively through `cxxreact:bridge`.

Verified with `buck2 uquery 'somepath(...:runtimeschedulerAndroid, ...:bridgeAndroid)'` — no path; the edge is gone.

Changelog:
[Internal]

Reviewed By: christophpurrer

Differential Revision: D108786501
@meta-codesync meta-codesync Bot changed the title Drop cxxreact:bridge dep from runtimescheduler Drop cxxreact:bridge dep from runtimescheduler (#57240) Jun 29, 2026
@javache javache force-pushed the export-D108786501 branch from ddc65bb to a735c42 Compare June 29, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant