-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
0.52.0-rc.0: Yoga Value Conversion Issue preventing build #17274
Comments
Facing the same issue after upgrading to 0.52.0-rc.0. |
I'm seeing this same issue in Xcode 9.2 with |
The same thing happened for me on |
It is not fixed on master either. |
Version 0.52.0 was released with this bug still present. I bet there's going to be an influx of people having this issue now. We really should have resolved this issue before releasing 0.52.0 😬. |
Let's bring in @priteshrnandgaonkar into this discussion as he's the one who worked on the file causing issues. |
b08a912 would be the commit I believe |
I ran RNTester shipped with RC. It built and ran successfully. The messages which are mentioned above are just warnings, those shouldn't be the cause of the problem. Although I will fix those warnings |
@gabrielbull I confirm Xcode build stalled at this exact same line with same error, in Any idea for a workaround? |
Same issue here, it won't build due to this error |
The build fails due to this fatal error. |
Got this too. Mark this issue, expect solutions soon. |
Fix please :(. I'm facing this issue (React 0.52.0 - yoga 0.52.0) |
Same issue. Integrated with existing app, upgraded from 0.50.4 |
Facing the same issues. Getting following error: error: implicit conversionloses integer precision: 'size_type' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
|
Summary: There were warnings of castings and null pointer handling in yoga.cpp. This diff fixes the warnings. The issue was brought up here facebook/react-native#17274 Reviewed By: emilsjolander Differential Revision: D6675111 fbshipit-source-id: 884659fabb05033b4d43d3aa6629e22481d39b7e
Summary: There were warnings of castings and null pointer handling in yoga.cpp. This diff fixes the warnings. The issue was brought up here facebook/react-native#17274 Reviewed By: emilsjolander Differential Revision: D6675111 fbshipit-source-id: 884659fabb05033b4d43d3aa6629e22481d39b7e
How can I incorporate these new changes? |
People! Dev processThis issue was opened before 0.52.0 release, how and why release happened? What was/will be done to not repeat this in future? Technical
They are not "just warnings", they signs of holes in logic or design, inconsistency in type systems or other flawless. But this other story, same as transit yoga to C++... there are so many pitfalls only to allow inlining of methods :-/ I had to say this.
|
Addition to previous: To workaround -Werror settings for yoga (only RN integrated with cocoapods), add this to Podfile:
But I make it only to find #17027 :-( |
Same issue. |
Downgrading to React-Native 0.50 worked for me as a "work-around". edit: 0.51 also works fine. |
Considering I upgraded from RN 0.51, that's not a workaround, that's giving up. 😭 |
@fungilation Haha, you can downgrade to 0.51 as well, this issue is specific to 0.52.0. We'll need to wait for 0.52.1 to update. |
@vovkasm, that's unrelated. I already have this in my Podfile:
|
In my case, I also need to disable The full workaround for this issue if you are using cocoapods:
|
@tonygriv @itinance Make sure your Podfile contains both the tvOS bug workaround: |
@msand, adding this
in podfile helps me, but is it a good solution? |
@tonygriv It complies, but, No. I think the upcoming fix is no good either. They should stick to the same number of bits everywhere, and not cast it, losing precision is guaranteed to cause bugs when someone puts a large enough input. There should be checks for too large inputs, independent of the chosen integer precision. And if 64 bit is allowed somewhere, it should be used everywhere along its read-write dependency graph. |
PR #17722 could also solve. |
Example for podfile
|
Error is still present in 0.52.1. Any updates on an actual solution and not just temporary workarounds? 0.52 has been out for a while now and this issue is causing trouble for quite a few people. |
I came here due to the react-native-maps iOS installation and this manage to do the work. And It works until I clean the project and did pod install again : )
|
@msand will do it right away. |
@grabbou is there any reason why yoga sources are distributed within RN and not just referenced as dependency from it's origin repo? |
The main reason (as far as I am aware) is that at Facebook, everything lives in a single repository and so, all projects depend on "master". When RN gets released in the open source, we have to "lock" its version so that we don't ship master-dependant build onto npm. To do so, one would need to make sure these two get released at the same time. That's been the case of few issues with CC: @emilsjolander you might have a better idea here :) |
The commit has been cherry-picked and will be landing soon. Now, that the original issue has been fixed, I will close this one. For any other, Yoga-specific requests (like this fix being inappropriate or not the most optimal way), please try opening a solution directly on Yoga repository. |
@grabbou Excellent, thank you! |
@grabbou just to be sure - after the fix do I still need hacks in the podfile to be able to compile? |
No - the code should be gone and so, no need to mute the warnings anymore :) |
I installed latest release with And now I'm getting this:
can someone confirm you can compile? |
Ok false alarm, I removed |
Yeah, that was intermediate error - fixed it and that's why next install
did the trick.
…On Fri, 26 Jan 2018 at 13:24 maxkomarychev ***@***.***> wrote:
Ok false alarm, I removed node_modules and installed everything from
scratch. Able to compile now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17274 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACWcxloA3GltTULxqwXyZZhJV0MTjPJ5ks5tOcPzgaJpZM4RHMA_>
.
|
1.$ npm i -g react-native-git-upgrade |
@3degreeszw your steps worked perfectly, thank you for posting it here |
You are a savior @3degreeszw! I had a problem with adding react-native-maps on top of react-native-firebase. |
Downgraded to "react-native": "^0.51.0", it seems stable version, and works fine |
@grabbou The issue I am facing is adding use_framework! in podfile resulting into compile time error. I am getting below errors. I am using react-native 0.54.3 which is latest. Does it mean, yoga is not supported when we use use_framework!? |
Summary: There were warnings of castings and null pointer handling in yoga.cpp. This diff fixes the warnings. The issue was brought up here facebook/react-native#17274 Reviewed By: emilsjolander Differential Revision: D6675111 fbshipit-source-id: 884659fabb05033b4d43d3aa6629e22481d39b7e
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Steps to Reproduce
(Write your steps here:)
Implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'const uint32_t' (aka 'const unsigned int')
line 208 in YGNodePrint.cpp
const uint32_t childCount = node->children.size();
Not sure if this is related but Line 201 and 293 of
Yoga.cpp
are also throwing logic errors ofNull pointer argument in call to memory copy function
Expected Behavior
I expected my app to work. It had hung up at the splash screen with no errors except the yoga logic errors and I assumed the newer version would resolve them.
Actual Behavior
The app is unable to build due to the yoga issue and xCodes says there are two other logic errors in Yoga.
Reproducible Demo
I would imagine this would just show up in any new project; however, any suggested steps to resolve it would be appreciated.
The text was updated successfully, but these errors were encountered: