question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fabric should be excluded from Podspec build

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:22
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

15reactions
shafycommented, Apr 16, 2018

This error still persists for me with 0.55.2. Should it be fixed?

11reactions
slycodercommented, Apr 4, 2018

Domo arigato, Mr React-native-bot-o, but isn’t v0.55 > v0.54?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Integrate Fabric/Crashlytics via CocoaPods - ios
Run the Crashlytics App installer to the point where they give you the build phase script. Copy the script; Undo the installation; Install...
Read more >
Answers on CocoaPods.org
Open Fabric.app, login and select the Answers SDK. ... The Fabric app automatically detects when a project uses CocoaPods and gives you the...
Read more >
Can't build to simulator on Apple Silicon
1) I've tried "pod install" & "pod update" with a Rosetta2 version of Terminal. Both complete without error, but Xcode still can't build....
Read more >
How To Manage Dependencies With CocoaPods
You can manually create a Podfile with a text editor or execute the pod init ... Because we don't specify a version for...
Read more >
Xcode 12, building for iOS Simulator, but linking in object file ...
You can manually add the Excluded Architectures in your pod project's Build Settings , but it will be overwritten when you use pod...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found