-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
- I have reviewed the documentationI have searched existing issuesI am using the latest React Native versionTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
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.
Activity
exclude React/Fabric/ from core
react-native-bot commentedon Apr 4, 2018
Thanks for posting this! It looks like your issue may refer to an older version of React Native. Can you reproduce the issue on the latest release, v0.54?
Thank you for your contributions.
slycoder commentedon Apr 4, 2018
Domo arigato, Mr React-native-bot-o, but isn't v0.55 > v0.54?
hramos commentedon Apr 4, 2018
0.55.0 has some issues and we are asking people to stay on 0.54.x for now, which is why the latest release (github.com/facebook/react-native/releases) is no longer 0.55.
It's alright to ignore the bot for now.
exclude React/Fabric/ from core
exclude React/Fabric/ from core
exclude React/Fabric/ from core
exclude React/Fabric/ from core
exclude React/Fabric/ from core
7 remaining items
shafy commentedon Apr 17, 2018
Oh ok, thanks!
grabbou commentedon Apr 17, 2018
exclude React/Fabric/ from core
YYCoder1963 commentedon May 24, 2018
add "React/Fabric/*" did not work for me, Are there any other solutions??
khorark commentedon May 24, 2018
@lyayun, I have version 0.55.4 and problem solution for me. But 0.55.3 I had problem.
objHua commentedon May 24, 2018
the release to 0.55.4, but there were still problems。

georgecr0ss commentedon Jun 17, 2018
@lyayun have you searched for this flag -DFOLLY_NO_CONFIG ? If it's set remove it
exclude React/Fabric/ from core
exclude React/Fabric/ from core
YVvanessa commentedon Feb 22, 2019
like this👇👇??
but there were still problems😯😯
s.subspec "Core" do |ss|
ss.dependency "yoga", "#{package["version"]}.React"
ss.source_files = "React//*.{c,h,m,mm,S,cpp}"
ss.exclude_files = "/tests/",
"IntegrationTests/",
"React/DevSupport/",
"React/Inspector/",
"ReactCommon/yoga/",
"React/Cxx/",
"React/Fabric/**/",
"React/Fabric/*"