-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Description
- I have reviewed the documentation
- I have searched existing issues
- I am using the latest React Native version
Version 0.55 of React Native includes an experimental Fabric
library which has some issues building in a Podspec environment. In particular, it is pulled into Core
via the source_files
wildcard and directly includes headers from folly --- however without folly_compiler_flags
being set on the Core
subspec, this causes build breakage.
Environment
OS: macOS High Sierra 10.13.3
Node: 9.6.1
Yarn: 1.5.1
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.0 => 0.55.0
Steps to Reproduce
Create a Pods based project. Here's an example Podfile snippet:
pod 'yoga', path: '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', podspec: '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', podspec: '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', podspec: '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'React', path: '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
'RCTWebSocket',
'RCTGeolocation',
'RCTLinkingIOS',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTImage',
'RCTAnimation',
'RCTActionSheet',
'RCTCameraRoll',
]
Expected Behavior
The project builds.
Actual Behavior
An error is thrown while building complaining that folly/folly-config.h is not found:
In file included from <redacted>/node_modules/react-native/React/Fabric/RCTFabricUIManagerWrapper.mm:10:
In file included from <redacted>/node_modules/react-native/ReactCommon/fabric/FabricUIManager.h:10:
In file included from <redacted>/ios/Pods/Folly/folly/dynamic.h:77:
In file included from <redacted>/ios/Pods/Folly/folly/Range.h:22:
In file included from <redacted>/ios/Pods/Folly/folly/FBString.h:41:
In file included from <redacted>/ios/Pods/Folly/folly/Portability.h:23:
<redacted>/ios/Pods/Folly/folly/portability/Config.h:20:10: fatal error: 'folly/folly-config.h' file not found
#include <folly/folly-config.h>
^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Inspection of the compile command being executed confirms that -DFOLLY_NO_CONFIG
is NOT being set.
Adding
"React/Fabric/*"
to the exclude_files
section of the Core
subspec fixes the issue.