Skip to content

Drop cxxreact dep from performance/cdpmetrics + timeline Package.swift#57446

Closed
javache wants to merge 4 commits into
react:mainfrom
javache:export-D108786497
Closed

Drop cxxreact dep from performance/cdpmetrics + timeline Package.swift#57446
javache wants to merge 4 commits into
react:mainfrom
javache:export-D108786497

Conversation

@javache

@javache javache commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary:
Catch the Swift Package definitions up to BUCK reality: the BUCK targets for react/performance/cdpmetrics and react/performance/timeline are already independent of cxxreact (React-cxxreact/React-cxxreact is not in either of their deps), but Package.swift was still declaring the OSS-side dep. Drop .reactCxxReact from both RNTarget definitions.

iOS/Swift-Package-only change. No code or BUCK changes.

Changelog:
[Internal]

Reviewed By: zeyap

Differential Revision: D108786497

javache and others added 4 commits July 6, 2026 03:09
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:
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]

Differential Revision: D108786501
Summary:
Drop the broad `cxxreact:bridge` dep from `nativemodule/core` in favor of the narrower pieces it actually needs: `cxxreact:tracesection` for `TraceSection.h`, plus the already-present `cxxreact:module`. Removes the redundant `callinvoker:callinvoker` direct dep — `callinvoker` is still reachable transitively through `react/bridging:bridging`.

Also extracts `MoveWrapper` to `react/utils/MoveWrapper.h` (a tiny stdlib-only utility) — it was previously living in `cxxreact:bridge` and is the one source-level dep that prevented the narrowing. The cxxreact copy remains in place (out of scope for this diff) but `JavaTurboModule.cpp` now uses the new location.

Cleanup: drops dead `exclude_patterns` for `CallbackWrapper.h` / `LongLivedObject.h` from `exported_headers` (those files no longer exist) and collapses multi-line glob formatting.

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

Changelog:
[Internal]

Differential Revision: D108786500
Summary:
Catch the Swift Package definitions up to BUCK reality: the BUCK targets for `react/performance/cdpmetrics` and `react/performance/timeline` are already independent of `cxxreact` (`React-cxxreact`/`React-cxxreact` is not in either of their `deps`), but `Package.swift` was still declaring the OSS-side dep. Drop `.reactCxxReact` from both `RNTarget` definitions.

iOS/Swift-Package-only change. No code or BUCK changes.

Changelog:
[Internal]

Reviewed By: zeyap

Differential Revision: D108786497
@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 Jul 6, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Jul 6, 2026
@meta-codesync

meta-codesync Bot commented Jul 6, 2026

Copy link
Copy Markdown

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

@meta-codesync meta-codesync Bot closed this in cd69b25 Jul 6, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 6, 2026
@meta-codesync

meta-codesync Bot commented Jul 6, 2026

Copy link
Copy Markdown

This pull request has been merged in cd69b25.

@javache javache deleted the export-D108786497 branch July 6, 2026 15:01
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. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant