Skip to content

Commit 703e362

Browse files
javachemeta-codesync[bot]
authored andcommitted
Narrow nativemodule/core cxxreact dep to tracesection + module (#57445)
Summary: Pull Request resolved: #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
1 parent 624f743 commit 703e362

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
#include "MessageQueueThread.h"
2222
#include "MethodCall.h"
2323
#include "ModuleRegistry.h"
24-
#include "MoveWrapper.h"
2524
#include "RAMBundleRegistry.h"
2625
#include "TraceSection.h"
2726

27+
#include <react/utils/MoveWrapper.h>
28+
2829
#include <memory>
2930
#include <utility>
3031

packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
#include <memory>
99
#include <string>
1010

11-
#include <cxxreact/MoveWrapper.h>
1211
#include <cxxreact/TraceSection.h>
1312
#include <fbjni/fbjni.h>
1413
#include <glog/logging.h>
1514
#include <jsi/jsi.h>
15+
#include <react/utils/MoveWrapper.h>
1616

1717
#include <ReactCommon/TurboModule.h>
1818
#include <ReactCommon/TurboModulePerfLogger.h>

packages/react-native/ReactCommon/cxxreact/MoveWrapper.h renamed to packages/react-native/ReactCommon/react/utils/MoveWrapper.h

File renamed without changes.

0 commit comments

Comments
 (0)