Skip to content

Commit 052447c

Browse files
vmorozgrabbou
authored andcommittedJan 23, 2021
Remove dependency on Folly in TurboModuleUtils.h (#30672)
Summary: The TurboModuleUtils.h includes "folly/Optional.h" which is not used and creates an unnecessary dependency on Folly. In this PR we remove this unnecessary include. It is required for the microsoft/react-native-windows#6804 where we add an experimental support for the C++ TurboModules. While the C++ TurboModules use the same JSI and TurboModule code defined in react-native, we provide a layer that let them to work over the ABI-safe Microsoft.ReactNative.dll boundary. The RNW Nuget distribution with DLL files includes a few source files to create native/turbo modules that work through the ABI-safe API. The TurboModuleUtils.h is one of such files. By removing the dependency on Folly we reduce requirements for the native module code. After this PR is merged we will remove the fork of the TurboModuleUtils.h added in microsoft/react-native-windows#6804. ## Changelog [Internal] [Fixed] - Remove dependency on Folly in TurboModuleUtils.h Pull Request resolved: #30672 Test Plan: The change does not bring any functional changes. It may only affect code compilation where some code may depend on TurboModuleUtils.h when it needs the "folly/Optional.h". The fix is add the `#include <folly/Optional.h>` there explicitly. I had run the iOS tests and they passed: ``` yarn pod install in packages\rn-tester ./scripts/objc-test.sh test ``` Reviewed By: mdvacca Differential Revision: D25758927 Pulled By: fkgozali fbshipit-source-id: 347d8f6bc333a3df67095ea0dc7221c818432fab
1 parent 70ba9ac commit 052447c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed
 

‎ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <cassert>
1111
#include <string>
1212

13-
#include <folly/Optional.h>
1413
#include <jsi/jsi.h>
1514

1615
#include <ReactCommon/CallInvoker.h>

0 commit comments

Comments
 (0)
Please sign in to comment.