Repository navigation
fix(android): link error on React Native 0.82–0.85 - #937
Merged
Merged
Conversation
folly::makeGuard needs ScopeGuardImplBase::terminate(), which libreactnative.so only exports from React Native 0.86. Reset the measuring flag with a local RAII struct instead. Fixes #931
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
🚀 This pull request is included in v4.0.0. See Release 4.0.0 for release notes. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Android builds on React Native 0.82–0.85 failed to link
libreact_codegen_TrueSheetSpec.so:TrueSheetContentViewShadowNode.cppusedfolly::makeGuard, which referencesScopeGuardImplBase::terminate(). React Native compiles folly'sScopeGuard.cppinto a staticfolly_runtimethat is linked intolibreactnative.sowithout--whole-archive. The object is only kept when React Native's own code uses it, which started in 0.86 (SCOPE_EXITinEventQueueProcessor.cpp, react/react-native#56537). Before 0.86 the symbol isn't exported. The example apps are on 0.86+, so it was never caught.The measuring flag is now reset by a local RAII struct. Behavior is the same: the folly guard's
terminate()path only ran if the lambda threw, and it can't.Fixes #931
Type of Change
Test Plan
mainllvm-nm:libreactnative.soexportsScopeGuardImplBase::terminate()in 0.86.0, not in 0.82.1. With this changelibreact_codegen_TrueSheetSpec.sono longer imports it.detents={['auto']}: the sheet presents at its content height, grows when rows are added (+300dp for 6 rows of 50dp), and presents at the same height after a dismiss.Not tested on device: iOS and the bare example (build only).
Screenshots / Videos
N/A
Checklist
No changelog entry: the bug came from #838, which is unreleased (v4 betas only).