Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use_framework RNTester crash #30520

Closed
wants to merge 1 commit into from

Conversation

janicduplessis
Copy link
Contributor

Summary

When building RN Tester with use_frameworks it crashes on launch because of duplicate folly singletons. Seems that it is included twice because of Flipper. From what I understand flipper is not really compatible with use_frameworks so this removes it from that build variant. We also remove hardcoded SONARKIT defines in the xcodeproject, those will be added by the Flipper podspec anyway so it is not needed.

This then exposed a missing double conversion header error in Folly so this fixes the DoubleConversion podspec to add its headers path to the user project.

Changelog

[Internal] [Fixed] - Fix use_framework RNTester crash

Test Plan

Tested RN tester with use frameworks on and off. Also made sure flipper works still when frameworks is false.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. labels Dec 2, 2020
@janicduplessis
Copy link
Contributor Author

cc @alloy

Copy link
Contributor

@alloy alloy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine with me and more in line with the app template:

# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end

Nice cleanups of the Xcode project too.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@janicduplessis janicduplessis deleted the fix-framworks branch December 4, 2020 00:03
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @janicduplessis in 7f16ff8.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Dec 4, 2020
grabbou pushed a commit that referenced this pull request Mar 1, 2021
Summary:
When building RN Tester with use_frameworks it crashes on launch because of duplicate folly singletons. Seems that it is included twice because of Flipper. From what I understand flipper is not really compatible with use_frameworks so this removes it from that build variant. We also remove hardcoded SONARKIT defines in the xcodeproject, those will be added by the Flipper podspec anyway so it is not needed.

This then exposed a missing double conversion header error in Folly so this fixes the DoubleConversion podspec to add its headers path to the user project.

[Internal] [Fixed] - Fix use_framework RNTester crash

Pull Request resolved: #30520

Test Plan: Tested RN tester with use frameworks on and off. Also made sure flipper works still when frameworks is false.

Reviewed By: fkgozali

Differential Revision: D25307973

Pulled By: hramos

fbshipit-source-id: 17b90e871734e32f5982c4fc9c07aeea232f868f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants