Skip to content

Remove unreliable packagingOptions.pickFirst for libc++_shared.so and libjsc.so #24672

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

Closed
wants to merge 1 commit into from

Conversation

Kudo
Copy link
Contributor

@Kudo Kudo commented May 1, 2019

Summary

packagingOptions.pickFirst is unreliable that we could not specify which library will be used.
If user have other third party libraries, the story is more complicated.
From the framework point of view, it is better to drop the pickFirst.

In jsc-android 241213.1.0, we did two things:

  1. Remove libc++_shared.so in AAR to prevent the conflict with RN.
  2. Build by NDK r17c, which aligned with current RN NDK version.

In this commit, I also revert the pickFirst for JSC.
pickFirst JSC also makes upgrade JSC unreliable.
Currently a lot of user report JSC crash issues, those crash issues may relate to JIT and hard to reproduce in-house.
My plan is to make sure user could choose another JSC build easier,
i.e. only to yarn add 'jsc-android@latest'.
We could then propose some experimented JSC build for user to check
if the build could help them to fix the crash issue.

Changelog

[Android] [Fixed] - Remove unreliable packagingOptions.pickFirst for libc++_shared.so and libjsc.so
NOTE that this may not need to add the changelog, as RN 0.59 does not have pickFirst.
This will also reduce a breaking change for upgrade from RN 0.59 or before.

Test Plan

  1. Build RNTester successful.
  2. Build RN from source (template) successful.

… libjsc.so.

Summary:
  packagingOptions.pickFirst is unreliable that we could not specify
  which library will be choosed.
  If user have other third party libraries, the story is more
  complicated.
  From the framework point of view, it is better to drop the pickFirst.

  In jsc-android 241213.1.0, we did two things:
  1. Remove libc++_shared.so in AAR to prevent the conflict with RN.
  2. Build by NDK r17c, which aligned with current RN NDK version.

  In this commit, I also revert the pickFirst for JSC.
  pickFirst JSC also makes upgrade JSC unreliable.
  Currently a lot of user report JSC crash issues,
  those crash issues may relate to JIT and hard to reproduce in-house.
  My plan is to make sure user could choose another JSC build easier,
  I.e. only to `yarn add 'jsc-android@latest'`.
  We could then propose some experimented JSC build for user to check
  if the build could help them to fix the crash issue.
@pull-bot
Copy link

pull-bot commented May 1, 2019

Warnings
⚠️ 🔒 package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.

Generated by 🚫 dangerJS against cc34db4

@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 May 1, 2019
@Kudo
Copy link
Contributor Author

Kudo commented May 1, 2019

cc @Salakar @cpojer since this reverts #24535 changes. Let me know if you have any concerns.

Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

@Salakar told me he is on board with this change.

cc @willholen since he is working on some gradle related changes at the moment as well.

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.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @Kudo in 509a07b.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: Share 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. Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants