Narrow nativemodule/core cxxreact dep to tracesection + module (#57445)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57445

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`.

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]

Reviewed By: zeyap

Differential Revision: D108786500

fbshipit-source-id: aa5340c3c4c6ac4889c6945b5c1d6f02da02269a
This commit is contained in:
Pieter De Baets authored and meta-codesync[bot] committed 2026-07-06 07:43:37 -07:00
1 parent 624f7439a8
commit 703e36210d
3 files changed
+3 -2

No files matched your search

@@ -21,10 +21,11 @@
#include "MessageQueueThread.h"
#include "MethodCall.h"
#include "ModuleRegistry.h"
#include "MoveWrapper.h"
#include "RAMBundleRegistry.h"
#include "TraceSection.h"
#include <react/utils/MoveWrapper.h>
#include <memory>
#include <utility>
@@ -8,11 +8,11 @@
#include <memory>
#include <string>
#include <cxxreact/MoveWrapper.h>
#include <cxxreact/TraceSection.h>
#include <fbjni/fbjni.h>
#include <glog/logging.h>
#include <jsi/jsi.h>
#include <react/utils/MoveWrapper.h>
#include <ReactCommon/TurboModule.h>
#include <ReactCommon/TurboModulePerfLogger.h>