Summary:
Changed gradle repo list to have consistent priority. mavenLocal is top priority because it requires manual setup, also won't conflict with other repos.
Pull Request resolved: https://github.com/facebook/react-native/pull/22041
Differential Revision: D12871549
Pulled By: hramos
fbshipit-source-id: c86730fde956dca77174c6454fdcb005a5eec8a9
Summary:
When we use product flavor (e.g. develop/production) with Android Gradle Plugin 3.2,
javascript bundle is not copied due to that merged asset path point to incorrect location.
related #21408
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
_Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!_
-->
Pull Request resolved: https://github.com/facebook/react-native/pull/21782
Differential Revision: D12854056
Pulled By: hramos
fbshipit-source-id: d1e6a395e762cc4a4f133977d54d0f469fa66b8c
Summary: Adds copyright headers to all files that are missing them.
Reviewed By: hramos
Differential Revision: D12837494
fbshipit-source-id: 6330a18919676dec9ff2c03b7c9329ed9127d930
Summary: This function sometimes causes an "Unable to find node on an unmounted component" crash during pagination for reasons that still need to be investigated; in the meanwhile, wrap this in a try-catch block to mitigate the crash.
Reviewed By: sahrens
Differential Revision: D12829971
fbshipit-source-id: bc9fe5b9b8c03430ff890bfbb27c39aa270c9eb7
Summary:
Fix the lazily LaodedView to avoid weird naming issues
This makes more sense. i would like to not have this suffix Manager at all in play, but it is possible that some of the names should be tweaked for that. Since TurboModule is coming we should probably not invest in that removal.
Reviewed By: dshahidehpour
Differential Revision: D12831482
fbshipit-source-id: 1cc557cf0bdfaca35032f75823b2facb778dc3ac
Summary:
This PR bumps also fbjs-scripts to latest version. Benefit is smaller node_modules and less deps to download as newer version doesn't depend on babel6 anymore.
Pull Request resolved: https://github.com/facebook/react-native/pull/21880
Differential Revision: D12832002
Pulled By: hramos
fbshipit-source-id: fa801aeb70a2f22be6f9c05cd6d981d0af0a0da9
Summary:
This diff introduces a new integration concept (called RuntimeExecutor) which consolidates `Runtime` and the dispatching mechanism.
As simple as that:
`using RuntimeExecutor = std::function<void(std::function<void(facebook::jsi::Runtime &runtime)> &&callback)>;`
Reviewed By: fkgozali
Differential Revision: D12816746
fbshipit-source-id: 9e27ef16b98af861d494fe50c7e50bd0536e6aaf
Summary:
Adds the displayName prop to `View` and `Text` components. Because these now use `React.forwardRef`, they were showing as `Component` instead of their actual names.
Thanks to ljharb for helping to pinpoint the source of the issue!
Fixes#21937
Pull Request resolved: https://github.com/facebook/react-native/pull/21950
Differential Revision: D12827060
Pulled By: TheSavior
fbshipit-source-id: d812cae14d53ad821ab5873e737db63ad1a989e3
Summary: The annotation ReactModuleList that was processed by ReactModuleSpecProcessor.java does not use ViewManagers. Removing this method from the annotation so that there is no confusion on how view managers are added to individual packages.
Reviewed By: achen1
Differential Revision: D9115363
fbshipit-source-id: 43d12e09b0e9b8e1732533f9a4456327778a0eaf
Summary:
Fixes#20302 (For iOS)
Note:
------
1. Checked the changes did not break CocoaPods integration.
2. The change for glog copying header into exported/ is to prevent build break for folly.
`folly/detail/Demangle.h` will try to use libstdc++'s demangle.h. Unfortunately, glog also has a demangle.h in source code. So I copy exported headers and only search headers in exported/ folder during build.
Pull Request resolved: https://github.com/facebook/react-native/pull/21976
Reviewed By: hramos
Differential Revision: D12818131
Pulled By: fkgozali
fbshipit-source-id: b3c637d09d1b3adde0ea15c82eb56e28f846885b
Summary:
Fixes#20302 (For Android)
Note:
------
1. New folly will have build break for a gcc-4.9 and gcc-4.9 seems to be deprecated for latest folly.
As we only use partial folly implementations, I just fixed the build break part.
To support building RN on Windows, the patches are written by gradle ReplaceTokens.
2. The change for glog copying header into exported/ is to prevent build break for folly.
`folly/detail/Demangle.h` will try to use libstdc++'s demangle.h. Unfortunately, glog also has a demangle.h in source code. So I copy exported headers and only search headers in exported/ folder during build.
Pull Request resolved: https://github.com/facebook/react-native/pull/21977
Reviewed By: hramos
Differential Revision: D12818133
Pulled By: fkgozali
fbshipit-source-id: 2c1f6f012663204581a86141d0c9ed0eb9d8c698
Summary:
Makes the delta bundle data structures more consistent.
The changes are as follows:
* There are now two types of JSON bundles that can be downloaded from the delta endpoint. Base bundles (`Bundle` type), and Delta bundles (`DeltaBundle` type).
* The `reset` boolean is renamed to `base`.
* `pre` and `post` properties are now strings.
* Only `Bundle` can define `pre` and `post` properties.
* The `delta` property is renamed to `modules`.
* Deleted modules are now listed inside of the `deleted` property, which is only defined by `DeltaBundle`.
Reviewed By: mjesun
Differential Revision: D10446831
fbshipit-source-id: 40e229a2811d48950f0bad8dd341ece189089e9b
Summary:
This was a specific check that was prone to break at some point. That time has come. Removing it as it is not providing any useful signal.
Pull Request resolved: https://github.com/facebook/react-native/pull/21998
Differential Revision: D12823839
Pulled By: hramos
fbshipit-source-id: e870670d7803af78c4559052613ea364ce1478df
Summary: Split up InitializeCore into a bunch of modules. The idea here is to make it easier for apps to just get the initialization logic they want and leave behind what they don't; for example, if you don't want the Map/Set polyfills, instead of requiring InitializeCore you can require the modules you want from it.
Reviewed By: yungsters
Differential Revision: D10842564
fbshipit-source-id: 3b12d54fddea8c4ee75886022338c214987a015c
Summary:
We were not accounting for shutdown properly when counting
jsi Objects at shutdown.
Reviewed By: danzimm
Differential Revision: D10451732
fbshipit-source-id: 7f0eb357aa3a011b7b2a97e44c22549e06e311c5
Summary: This should catch errors with people redefining component lifecycle methods or other class members. We have this for object properties already but must not have updated the config for classes.
Reviewed By: helouree
Differential Revision: D11540725
fbshipit-source-id: d56091170aecf31bbd50ef3c76fc3970ca45466d
Summary:
While debugging internally, we have found that modules are almost always registered
with their "RK" or "RCT" prefixes dropped.
However, if a view is named `RCTFooView` and needs `RCTFooViewManager` to render natively, it will almost never find it because `RCT` was dropped from the key to the ViewManager instance.
In the event you look for a `ViewManager` and don't find it, this strips any "React" prefixes from your key and tries ones more time.
Reviewed By: spredolac
Differential Revision: D10734005
fbshipit-source-id: 2bfa6f19830f14f09af2fe7dc7e44b7e26e0ac3f
Summary:
This diff updates all `xplat/js` to use the latest version of `jest`.
This version provides performance improvements and fixes to make some tests less flaky
Reviewed By: mjesun
Differential Revision: D10466639
fbshipit-source-id: faa769dac1475c61e00bcd76ed30760b176a2898
Summary: Instead of having a single point at the top of InitializeCore, let's just create a subspan for it. Initially I just wanted to use this point to track JS start time, but it'll be useful to see how long initializeCore takes, too.
Reviewed By: alexeylang
Differential Revision: D10521595
fbshipit-source-id: 3025c34ffab39b79efc966f0c0eb6f502c91c550
Summary:
Fix build errors when path to $NODE_BINARY contains spaces:
error: Can't find '/Path/With Spaces/To/node' binary to build React Native bundle
Why would $NODE_BINARY contain spaces? In my case, I am using sentry-cli which wraps the NODE_BINARY in it's own executable. The local path to the project, and thus the $NODE_BINARY, contains a space on my GoCD build agent.
'/Users/go/Library/Application Support/Go Agent/pipelines/my-ios-app/node_modules/sentry/cli/sentry-cli
See https://github.com/getsentry/react-native-sentry/issues/484https://github.com/getsentry/react-native-sentry/issues/389
Pull Request resolved: https://github.com/facebook/react-native/pull/21383
Differential Revision: D10851141
Pulled By: yungsters
fbshipit-source-id: f46853ac8b57957864e0d1a76b8513403223fccb
Summary:
This functionality was removed here: 636d01bbd0
This is just a step of cleanup
Reviewed By: yungsters
Differential Revision: D10515512
fbshipit-source-id: 6d24cc9c53c71924a82c67a4058585ee978de2d9
Summary: Alternative to D10499861. If an app does not have an exception handler, context.handleException will still hard crash. Since this error is just saying that we're reusing an unexpected RootView, it might be safe to continue execution. Let's remove the exception for now while we investigate further
Reviewed By: mmmulani
Differential Revision: D10560413
fbshipit-source-id: 6c08a16cd250a019d2aef5afcaf3ba61534d29f7
Summary:
This is a bandaid fix to address a crash with a stack trace involving
```
com.facebook.react.uimanager.IllegalViewOperationException: Trying to add a root view with an explicit id already set. React Native uses the id field to track react tags and will overwrite this field. If that is fine, explicitly overwrite the id field to View.NO_ID before calling addRootView.
0+com.facebook.react.uimanager.NativeViewHierarchyManager.addRootViewGroup(NativeViewHierarchyManager.java:546) [inlined]
1+com.facebook.react.uimanager.NativeViewHierarchyManager.addRootView(NativeViewHierarchyManager.java:538) [inlined]
2+com.facebook.react.uimanager.UIViewOperationQueue.addRootView(UIViewOperationQueue.java:678) [inlined]
3+com.facebook.react.uimanager.UIImplementation.registerRootView(UIImplementation.java:216) [inlined]
4+com.facebook.react.uimanager.UIManagerModule.addRootView(UIManagerModule.java:355)
5+com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1032)
6+com.facebook.react.ReactInstanceManager.attachRootView(ReactInstanceManager.java:726) [inlined]
7+com.facebook.react.ReactRootView.attachToReactInstanceManager(ReactRootView.java:524)
8+com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:377)
```
This crash seems to be happening because the root view's id is set to a non NO_ID value, but further up in the stack trace, UIManager.addRootView() is called which always sets the root view's id to NO_ID. It's not clear how this error is happening, but in this code path it's expected that addRootView should always ensure that the id is always reset. In order to avoid crashing for this, let's remove the exception and log the issue instead.
In the future, we should not be overloading the android view id field with these types of react native implementation details. The react tag should be stored as a view tag instead.
Reviewed By: mmmulani
Differential Revision: D10499861
fbshipit-source-id: 4dffedab4e7a34eee7f64bb43ec8209699521c73
Summary: I did a bit more refactoring to NetworkOverlay.
Reviewed By: TheSavior
Differential Revision: D10476158
fbshipit-source-id: da26251f8dfd12dd592da3ae5367efa37ec07669
Summary:
This class contains metrics about RN bridge startup that was being sent via FBAnalytics.
This diff refactors out any timespans being collected into a separate method. This refactor is NOT ENOUGH to format the data into a format QPL accepts. I still need to refactor these timespans into _start and _end points for QPL points to work correctly. This diff is a starting point.
Reviewed By: ejanzer
Differential Revision: D10466982
fbshipit-source-id: 4bc1159c4e53328f2252a8c606c8d6ff8d657489
Summary: Adding perf marker point to the beginning of InitializeCore.
Reviewed By: TheSavior
Differential Revision: D10496350
fbshipit-source-id: 56c77414e0c31cf918377e95e3b0c236a5672e35
Summary:
This was deleted as part of 774cd73663
I forgot that we normally keep the getter at the bottom of the module with an invariant so that people get clearer messages when they upgrade.
Reviewed By: yungsters
Differential Revision: D10475667
fbshipit-source-id: fcc527cd8117a506096a910a602272e092b8672d