Repository navigation
chore(example): use androidx.collection 1.4.4 on Android [skip ci] - #1233
Merged
Merged
Conversation
androidx.collection 1.4.0 to 1.4.2 loses entries of React Native 0.87's view registry (a MutableIntObjectMap), and the example app resolves 1.4.2 through appcompat. Fabric then drops events and mount instructions for those views. React Native 0.88 depends on 1.4.4 (react/react-native#58389); the dependency can be removed after updating to it.
|
🎉 This PR is included in version 8.30.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Since React Native 0.87, Fabric's view registry on Android (
SurfaceMountingManager) is an androidx.collectionMutableIntObjectMap. androidx.collection 1.4.0 to 1.4.2 can lose entries of these maps after many removals (issuetracker 352560465, fixed in 1.4.3), and the main example app resolves 1.4.2 through appcompat. Fabric then drops events and mount instructions for views whose entry is gone. In the regression runner this shows asUnable to find viewStatesoft exceptions, an occasional case stuck onwaitingbecause itsonLoadnever reached JS (logged: the view was mounted and showing its image, butresolveViewreturned null for its tag), and once a crash inaddViewAt.The example app now depends on androidx.collection 1.4.4, with a comment saying why. React Native 0.88 depends on 1.4.4 itself (react/react-native#58389), so the dependency can be removed after updating React Native. The library doesn't change.
Testing
./gradlew :app:dependencyInsight --dependency androidx.collection:collection: 1.4.2 before, 1.4.4 after.node scripts/verify.mts --android --app main, 6 runs each, countingUnable to find viewStatein logcat: 0 in every run with this change; 29, 33, 5, 25, 3 and 2 without it.