Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/facebook/react-native.git. Pull mirroring updated .
  1. Oct 26, 2021
    • Luna Wei's avatar
      [0.67.0-rc.2] Bump version numbers · a7d3ffee
      Luna Wei authored
      v0.67.0-rc.2
      a7d3ffee
    • Luna Wei's avatar
      Add back Xcode_12_5_M1_post_install_workaround · eede05c9
      Luna Wei authored
      Summary: Changelog: [Internal] Add back Xcode_12_5_M1_post_install_workaround workaround
      
      Reviewed By: sota000
      
      Differential Revision: D31902449
      
      fbshipit-source-id: 5c9d962d0d1a55a9f14186bd7d6d8fe087101f0d
      eede05c9
    • Tuomas Jaakola's avatar
      Load jsc or hermes lib in static method (#30749) · abe9633b
      Tuomas Jaakola authored
      Summary:
      Many have reported about the misguiding error `Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so` even though they don't use Hermes (for example issues https://github.com/facebook/react-native/issues/26075 #25923).
      
      **The current code does not handle errors correctly when loading JSC or Hermes in `ReactInstanceManagerBuilder`**.
      
      **ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java:**
      ```java
      try {
        return new HermesExecutorFactory();
      } catch (UnsatisfiedLinkError hermesE) {
        // We never get here because "new HermesExecutorFactory()" does not throw an exception!
        hermesE.printStackTrace();
        throw jscE;
      }
      ```
      
      In Java, when an exception is thrown in static block, it will be RuntimeException and it can't be caught. For example the exception from `SoLoader.loadLibrary` can't be caught and it will crash the app.
      
      **ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.java:**
      ```java
      static {
        // Exception from this code block will be RuntimeException and it can't be caught!
        SoLoader.loadLibrary("hermes");
        try {
          SoLoader.loadLibrary("hermes-executor-debug");
          mode_ = "Debug";
        } catch (UnsatisfiedLinkError e) {
          SoLoader.loadLibrary("hermes-executor-release");
          mode_ = "Release";
        }
      }
      ```
      
      This PR fixes the code so that the original exception from failed JSC loading is not swallowed. It does not fix the original issue why JSC loading is failing with some devices, but it can be really helpful to know what the real error is. For example Firebase Crashlytics shows wrong stack trace with current code.
      
      I'm sure that this fix could have been written better. It feels wrong to import `JSCExecutor` and `HermesExecutor` in `ReactInstanceManagerBuilder.java`. However, the main point of this PR is to give the idea what is wrong with the current code.
      
      ## Changelog
      
      <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
      https://github.com/facebook/react-native/wiki/Changelog
      -->
      
      [Android] [Fixed] - Fix error handling when loading JSC or Hermes
      
      Pull Request resolved: https://github.com/facebook/react-native/pull/30749
      
      Test Plan:
      * from this PR, modify  `ReactAndroid/src/main/java/com/facebook/react/jscexecutor/JSCExecutor.java` so that JSC loading will fail:
      ```java
      // original
      SoLoader.loadLibrary("jscexecutor");
      // changed
      SoLoader.loadLibrary("jscexecutor-does-not-exist");
      ```
      * Run `rn-tester` app
      * Check from Logcat that the app crashed with correct exception and stacktrace. It should **not** be `java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so`
      
      Tested with Hermes
      
      ```
          SoLoader.loadLibrary("hermes-executor-test");
      ```
      Got this one in logcat
      ```
      09-24 20:12:39.552  6412  6455 E AndroidRuntime: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes-executor-test.so
      ```
      
      Reviewed By: cortinico
      
      Differential Revision: D30346032
      
      Pulled By: sota000
      
      fbshipit-source-id: 09b032a9e471af233b7ac90b571c311952ab6342
      abe9633b
  2. Oct 23, 2021
  3. Oct 19, 2021
  4. Oct 17, 2021
  5. Oct 16, 2021
  6. Oct 15, 2021
    • Pieter De Baets's avatar
      Fix bug with hittesting when skipping views due to overflow · ec31b38e
      Pieter De Baets authored
      Summary:
      Noticed we were sometimes receiving incorrect paths through the view hierarchy. This was largely harmless, as the hover events generated from this would still be correct. We just sometimes send more onExit/onEnter events than necessary.
      
      Changelog: [Internal]
      
      Reviewed By: rshest
      
      Differential Revision: D31434300
      
      fbshipit-source-id: 3888270eaa16edf48f5d894a1e6daeca1ecfed1e
      ec31b38e
    • Nicola Corti's avatar
      Add stale action to close older issues/PR that are more than one year inactive (#32403) · 37efe38e
      Nicola Corti authored
      Summary:
      Pull Request resolved: https://github.com/facebook/react-native/pull/32403
      
      As the title says, we should cleanup issues that are really stale (i.e. more than one year inactive).
      I ended up using actions/stale which is the first party solution for this.
      
      Changelog:
      [Internal] [Changed] - Add stale GitHub action
      
      Reviewed By: hramos
      
      Differential Revision: D31653083
      
      fbshipit-source-id: 48538a571183f9ff28a23e7d1fdd01980581de35
      37efe38e
    • Joshua Gross's avatar
      Stop using RTTI features in Fabric core and components · 6525f9b0
      Joshua Gross authored
      Summary:
      These dynamic_casts aren't really giving us much (they have never fired once in dev! and don't run in prod anyway). They also prevent us from disabling RTTI. So, let's get rid of them.
      
      Changelog: [Internal]
      
      Reviewed By: philIip
      
      Differential Revision: D31634895
      
      fbshipit-source-id: 4a9b259837127feb324f64fa3e9e23eb1cc481a6
      6525f9b0
    • Andrei Shikov's avatar
      Use `Arguments.createArray` instead of `WritableNativeArray` · f7a33e35
      Andrei Shikov authored
      Summary:
      Using `WriteableNativeArray` directly in common code is breaking unit tests on CircleCI.
      
      Changelog:
      [Android][Internal] - Use mock of native array for sending touches
      
      Reviewed By: mdvacca
      
      Differential Revision: D31665842
      
      fbshipit-source-id: 886418ff6a3f07046e8e17d4743060d80c26b288
      f7a33e35
    • Joshua Gross's avatar
      Remove compiler_flags from BUCK modules · b60e229d
      Joshua Gross authored
      Summary:
      Nearly all of these are identical and these compiler_flags are now centralized in rn_defs.bzl. This should have NO CHANGE on build configuration, the flags have just moved for now.
      
      Changelog: [Internal]
      
      Reviewed By: mdvacca
      
      Differential Revision: D31631766
      
      fbshipit-source-id: be40ebeb70ae52b7ded07ca08c4a29f10a0ed925
      b60e229d
    • Joshua Gross's avatar
      Centralize C++ compiler flags in rn_defs.bzl · a75e615a
      Joshua Gross authored
      Summary:
      Centralize C++ compiler flags in rn_defs.bzl.
      
      There is really no reason for these Cxx libraries to specify their own compiler flags: nearly 100% of them are identical, and the copypasta makes it difficult to make repo-wide changes (like upgrading C++ versions, etc).
      
      This is now causing build failures until everything is migrated properly, and there are two flags (enable_rtti and enable_exceptions) that MUST have the same value and can be configured per-module, as needed.
      
      Changelog: [Internal]
      
      Reviewed By: mdvacca
      
      Differential Revision: D31631767
      
      fbshipit-source-id: 84f0441eb0ad09219e97d13babe0707d25f08472
      a75e615a
    • Luna Wei's avatar
      Publish npm, re-order nightly build version · 678f2cb9
      Luna Wei authored
      Summary: Changelog: [Internal] - Reorder nightly versioning to better support ordering
      
      Reviewed By: hramos
      
      Differential Revision: D31643453
      
      fbshipit-source-id: 3f1b82085179b435d6920d9e5ae2350419154920
      678f2cb9
    • Marshall Roch's avatar
      deploy v0.162.0 to xplat · b2e64838
      Marshall Roch authored
      Summary: Changelog: [Internal]
      
      Reviewed By: vrama628
      
      Differential Revision: D31640841
      
      fbshipit-source-id: 783200913d06baca5b1d32d07b8ed5f4ecde7e1e
      b2e64838
  7. Oct 14, 2021
  8. Oct 13, 2021
    • Andrei Shikov's avatar
      Define event category in Event class · 8ba4a2f1
      Andrei Shikov authored
      Summary:
      Propagate event category definition to every event that is using `dispatchModernV2` (gated in production), providing opportunity to override categories of some events if needed. No events are meaningfully affected by this change, as coalesced events (e.g. scroll) are always dispatched as continuous and touch events are handled separately.
      
      Changelog:
      [Internal] Expose event category in Event class
      
      Reviewed By: cortinico
      
      Differential Revision: D31276249
      
      fbshipit-source-id: f9a756b3a5cf5897e17209f3d0aed6a1c16cbd2e
      8ba4a2f1
    • svbutko's avatar
      Bump Kotlin and Gradle versions (#32319) · 9ae33674
      svbutko authored
      Summary:
      Bump Kotlin version to 1.5.31 to include following changes:
      
      https://kotlinlang.org/docs/whatsnew15.html
      https://kotlinlang.org/docs/whatsnew1520.html
      https://kotlinlang.org/docs/whatsnew1530.html
      
      Primarily:
      - Native support for Apple silicon
      - Kotlin/JS IR backend reaches Beta
      - Improved Gradle plugin experience
      - Performance improvements
      
      ## Changelog
      
      <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
      https://github.com/facebook/react-native/wiki/Changelog
      -->
      
      [Android] [Changed] - Bump Kotlin version to 1.5.31
      [Android] [Changed] - Bump Gradle version to 7.2
      
      Pull Request resolved: https://github.com/facebook/react-native/pull/32319
      
      Reviewed By: yungsters
      
      Differential Revision: D31365479
      
      Pulled By: cortinico
      
      fbshipit-source-id: 1ffaef1222a6ada8ebc746267b2a22561c3c770f
      9ae33674
    • Nicola Corti's avatar
      Restrict mavenCentral to exclude react-native older packages · 2f8e52b5
      Nicola Corti authored
      Summary:
      This Diff is restricting the scope of `mavenCentral` to do not
      include react-native packages. This will make us sure we don't pickup older
      versions of react-native.
      This specifically is a problem if you're building on a nightly as the version
      of RN nightly is `0.0.0.xxx` which is lower than then version on maven central.
      More on this here https://github.com/facebook/react-native/pull/32326#issuecomment-933368880
      
      Changelog:
      [Internal] [Changed] - Restrict mavenCentral to exclude react-native older packages
      
      Reviewed By: ShikaSD
      
      Differential Revision: D31571803
      
      fbshipit-source-id: d7ce7e82825cbebda2e4e534565d7ab15dba2624
      2f8e52b5
    • David Vacca's avatar
      Fix link in View.js · 47901463
      David Vacca authored
      Summary:
      https://reactnative.dev/docs/view.html doesn't work, this diff replaces the url for the new link
      
      [Changelog]
      [General][Fixed] - Updated documentation link in `View`.
      
      Reviewed By: yungsters
      
      Differential Revision: D31519836
      
      fbshipit-source-id: c93feee4652caf4ef8390a047599149fc547db48
      47901463
    • Xin Chen's avatar
      Fix issue with setting shadow node state data after scrolling programmatically · 55392f65
      Xin Chen authored
      Summary:
      This issue is found when investigating T101563978 with IOS platform. When animation is off, the x position measurement is off after `scrollToItem` is called.
      
      The android fix is checked in at D31492685 (https://github.com/facebook/react-native/commit/1a9e2d5d5589ce5cee92868ea5bccceb6e161eff). For IOS, the correct state data is updated only for animated cases, but not for instant scroll cases. This diff unified them.
      
      Changelog
      [IOS][Fixed] Fixed an edge case when scroll to item/index is called without animation, the offset position is not updated. This caused the measurement of the position to be wrong.
      
      Reviewed By: sammy-SC
      
      Differential Revision: D31564169
      
      fbshipit-source-id: 89f47d8054afb03c2ace1d595163b160e5bb2036
      55392f65
    • Luna Wei's avatar
      Support fbt for accessibilityValue · 8581661e
      Luna Wei authored
      Summary: Changelog: [Internal] - Change accessibilityValue.text type to allow for Stringish type
      
      Reviewed By: yungsters
      
      Differential Revision: D31577860
      
      fbshipit-source-id: af12505794037a68850a16ce139359e2f8a879e4
      8581661e
    • Lulu Wu's avatar
      Add more logs · 24ac6698
      Lulu Wu authored
      Summary:
      Added more logs to understand what's the root cause for https://fburl.com/logview/kgknonri
      
      ```java.lang.IllegalStateException: Message queue threads already initialized
      	at X.5y2.A0I(:64)
      	at com.facebook.venice.ReactInstance.<init>(:112)
      	at X.PrB.EgB(:33)
      	at X.2pN.run(:4)
      	at X.2pA.execute(:32)
      	at X.2p6.A00(:30)
      	at X.2p6.A08(:2)
      	at X.PrC.EgB(:26)
      	at X.Pr7.run(:4)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
      	at java.lang.Thread.run(Thread.java:919)
      ```
      
      Changelog:
      [Android][Changed] - Add some logs
      
      Reviewed By: RSNara
      
      Differential Revision: D31584264
      
      fbshipit-source-id: 11b8bb2c6c9af2266688e3dae95e09f0160de79a
      24ac6698
  9. Oct 12, 2021
  10. Oct 10, 2021
    • Héctor Ramos's avatar
      Move Docker test to GitHub Actions · 232d02c5
      Héctor Ramos authored
      Summary:
      The test_docker_android job on Circle CI has a simple function: verify the base community RN Android image can be downloaded, and verify that we can use it to build a container with a compiled Android test app.
      
      Since the job is not strictly running a suite of tests, it can be moved to GitHub Actions. It will run on GitHub Actions as a Check on commits to main and pull requests.
      
      As building the test image requires the use of the base React Native Android image, we can skip downloading the base container and go straight to building the test image.
      
      Changelog: [Internal]
      
      Reviewed By: fkgozali
      
      Differential Revision: D31521978
      
      fbshipit-source-id: ca8372a1464054e37f2da28a3ecfbc8f84db0408
      232d02c5