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
Use yoga from cocoapods instead of local podspec #26053
Conversation
5bf3446
to
b59443f
Compare
I find that Yoga releases lag behind the master, while React Native use Yoga from the master. I'm afraid that there might be breakages due to the mismatch. We had a case where Buck release delay broke Android CI. |
Hm, @janicduplessis, does it mean we can't debug the layout with Flipper right now, without this PR? |
@grabbou Yea, we can't include the layout plugin because it depends on Yoga from pods and conflicts with the one from RN. |
Waiting for this PR to be merged, I have case when we want to use |
I copied YogaKit files into the project and used it for my project. IMHO, no need to wait for this to be merged.
|
@janicduplessis - I spoke about this internally, and with the Flipper people. I think the biggest risk of moving Yoga out of React Native would be that we would need to ensure that Yoga and React Native are released in lock-step. Instead of moving Yoga out, I have a PR, where i change the Yoga version in the yoga.podspec file to match that of the real yoga. This should solve the flipper issue, since both pods will point to the same version. IMHO, doing this will be a smaller change. What do you think ? |
I'm not sure how cocoapods resolve dependencies but wouldn't that be dangerous since the implementation can diverge for the same version? Are we sure it would resolve to the local podspec included in RN? I'm fine with landing some compromise if it unblocks flipper. Ideally we'd have regular yoga releases whenever important fixes or improvements are made and the version is bumped in RN at the same time, like we do with metro. |
@axemclion I'm getting this error
Adding
in the yoga podspec fixes the issue (taken this from the one in the yoga repo) |
This PR is no longer needed |
Summary
I think yoga is stable enough to be used from cocoapods instead of relying on the internal vendored version. This only affects install with cocoapods.
The main motivation behind this is better interop with other libraries that use yoga also from cocoapods (in my case Flipper). Right now it causes an error because of multiple copies of libyoga.a. By doing this they will share the same copy of yoga.
Changelog
[iOS] [Changed] - Use yoga from cocoapods instead of local podspec
Test Plan
Tested locally in an app and made sure it builds still.
Tested in RNTester