Граф коммитов

19344 Коммитов

Автор SHA1 Сообщение Дата
Peter Argany 8fe04cfd7e Migrate RCTDevSettings to TM
Summary: As titled. The work to write the spec and make this module compatible were done in D18148890.

Reviewed By: RSNara

Differential Revision: D19442016

fbshipit-source-id: 369bb4247d6590d41ec414f93c79d98d4a6bed88
2020-01-17 17:22:14 -08:00
Héctor Ramos e69ce88ef6 Use Xcode 11.3.0 and iOS 13.3 in tests (#27783)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/27783

Use Xcode 11.3.0 to run tests, using an iPhone 8 simulator running iOS 13.3.

Snapshot tests disabled as they're failing on Circle CI.

Changelog:
[iOS] [Changed] - Use Xcode 11.3 and iOS 13.3 simulator in iOS tests

Reviewed By: PeteTheHeat

Differential Revision: D19411972

fbshipit-source-id: 3ddef9e6fbdbd3c35271732fc6d6d74de099230e
2020-01-17 16:42:56 -08:00
Rajat Gupta 9457efa84c Always update background color and bar style on Android status bar
Summary: Changelog: [Fix] Fix status bar color not updating when navigating between two screens with the same status bar color.

Reviewed By: RSNara

Differential Revision: D19439424

fbshipit-source-id: 44388f1f94c87c12102471d72183bb6c152a46b6
2020-01-17 16:14:57 -08:00
Ramanpreet Nara 44678bbf76 Add @DoNotStrip annotation to getJavaModule
Summary:
For some reason, I think this method is being optimized away, which is really strange considering that it's being used in getModule.

Changelog:
[Internal]

Reviewed By: ejanzer

Differential Revision: D19454855

fbshipit-source-id: 414b4888f7aacf730dd22939e2e2140b94dff4e7
2020-01-17 16:00:01 -08:00
Peter Argany 459c54c407 Refactor RCTTurboModuleManager to take in a CallInvoker
Summary:
In bridgeless mode, `RCTTurboModuleManager` is initialized with a nil bridge. This has mostly worked, since `RCTBridge` doesn't do too many things for TMM (some notifs and perf markers). The one important thing it provides is a `_jsInvoker`.

In bridgeless mode, up until this point `_jsInvoker` has been nil, and turbo modules were not able to call functions on the JS thread. This diff fixes that.

Reviewed By: RSNara

Differential Revision: D19437174

fbshipit-source-id: 86bfc0a47bd9576e7d3203b860e86446eb0b63dd
2020-01-17 15:55:25 -08:00
Samuel Susla dd476d0506 Run rn-native-modules/specs/update_oss to stop tests from failing
Summary:
Changelog: [Internal]

Fix following test failure

```
Date: 2020-01-17 07:18:10.533721
Step JSON: {"name": "Test: Verify OSS NativeModules Specs for iOS are up-to-date.", "continue_after_user_failure": true, "timeout": 3600, "shell": "cd \"$(hg root)/xplat/js\" && NODE_ENV=test scripts/rn-native-modules/specs/update_oss ios", "env": {}}
Command: cd "$(hg root)/xplat/js" && NODE_ENV=test scripts/rn-native-modules/specs/update_oss ios
Exit code: 1
Stdout:
Building OSS NativeModule Specs - platform: ios...
Stderr:
Starting new Buck daemon...
Using additional configuration options from .buckconfig.local, /etc/buckconfig.d/sandcastle
PARSING BUCK FILES: FINISHED IN 5.9s
CREATING ACTION GRAPH: FINISHED IN 0.1s
DOWNLOADED 0 ARTIFACTS, 0.00 BYTES, 0.0% CACHE MISS
BUILDING: FINISHED IN 8.5s (100%) 1/1 JOBS, 1 UPDATED
Top slow rules
    //xplat/js:FBReactNativeSpec-flow-types-ios: 0.1s
BUILD SUCCEEDED
More details at https://our.intern.facebook.com/intern/buck/build/d68bbc08-49cf-4ef5-8eba-51d79bea09ba
Error: Spec files are not up-to-date, please re-run 'js1 build oss-native-modules-specs -p ios'!
    at main.then.updated (/data/sandcastle/boxes/trunk-hg-fbobjc-fbsource/xplat/js/scripts/rn-native-modules/specs/update-specs.js:96:15)
```

I ran `js1 build oss-native-modules-specs -p ios` to fix it.

Reviewed By: PeteTheHeat

Differential Revision: D19450371

fbshipit-source-id: 0957298ad70ad3e8feca96622cd29ed223438961
2020-01-17 11:21:56 -08:00
Nat Mote c40988cc22 Deploy Flow v0.116 to xplat
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D19416307

fbshipit-source-id: 32767f24e5bfeb1912f7dd5527eb8c4db7a08a1a
2020-01-16 14:05:49 -08:00
Ramanpreet Nara ce18521c9e Ensure TurboModuleManager.getModule also queries CxxModuleWrappers
Summary:
We should also call `TurboModuleManager.getLegacyCxxModule('foo')` when we call `TurboModuleManager.getModule('foo')` is called.

This fixes a Marketplace crash. See: D19432594

Changelog:
[Android][Fixed] - Ensure TMM.getModule also queries CxxModuleWrappers

Reviewed By: ejanzer

Differential Revision: D19434549

fbshipit-source-id: cff741cf1587d2a0dbcdc5eb95016c8aa283b727
2020-01-16 13:38:10 -08:00
Jordan Brown 434526e13d Get rid of implicit exact object in PickerExample
Summary:
In order to be sure that 0.62 does not require an exact-by-default codebase, we should get rid of any `{}` occurrences inside of react-native-github. If all the object types in react-native-github are either explicitly exact `{||}` or explicitly inexact `{...}` then those object types will have consistent semantics regardless of the Flow settings in the client codebase.

Changelog: [Internal]

Reviewed By: rickhanlonii

Differential Revision: D19347283

fbshipit-source-id: 4c199bd7f1684b70df1b1c717941d0d477f67117
2020-01-16 12:46:07 -08:00
Riley Dulin 0ee7fb98cc Update the chrome devtools protocol for the inspector
Summary:
Changelog: [Internal] Upgrade Chrome devtools protocol for Hermes

Update to the most recent version of the devtools protocol, r730699.
This just adds a few parameters to the stable API.
They have reasonable defaults that shouldn't break the existing functionality.

Reviewed By: willholen

Differential Revision: D19387559

fbshipit-source-id: 49d9ebf4a1a20f349ea6e46be6d5f36184ba8afb
2020-01-15 16:52:19 -08:00
Riley Dulin 46351cc276 Use the devtools-protocol npm package to generate code
Summary:
Changelog: [Internal]

Before, we were relying on checking out the `devtools-protocol` Github repo at a specific commit and
making special changes to the JSON file.
In order to make it easier to update, use the officially published npm package.

I found the closest package version that was published, but it had two differences:
* `Runtime.getHeapUsage` was either missing (in earlier versions) or experimental (in later versions)
* `isDefault` and `isPageContext` were removed. I'm not sure what these were used for anyway, the comment leads me to believe they're probably not necessary anymore

There were some customizations made previously to annotate `recursive` on some properties. The npm package doesn't set these,
so I wrote some checks to add it back in if it can be detected. This was mostly to handle one special case: `Runtime.StackTrace`.
The workaround seems to be fine for that case.

Reviewed By: willholen

Differential Revision: D19386890

fbshipit-source-id: db0d85f6bc71cba77ee67d85efe2f38376d7cc87
2020-01-15 16:52:18 -08:00
Riley Dulin 4b703e3c1f Remove .flowconfig from hermes/inspector/tools/msggen
Summary:
Changelog: [Internal]

This separate `.flowconfig` file was causing versioning issues.
Delete it so that `msggen` can share the same flowconfig as the rest
of React Native.

Reviewed By: willholen

Differential Revision: D19413710

fbshipit-source-id: 748cb50a3151df1c67ee7176e57e259e48f50be7
2020-01-15 16:52:18 -08:00
Kevin Gozali 58a6a40eac Re-land [RN] iOS - deprecate iOS 9 support by removing runtime checks for 10.0+
Summary:
Re-landing the reverted change:

This removes all callsites that rely on runtime checks to detect the target deployment version. We no longer need to check for iOS 10+ in a few places. Note: for this to compile, the hosting app needs to target iOS 10.0+.

Changelog: [iOS] [Deprecated] - Deprecate iOS 9

Reviewed By: sammy-SC

Differential Revision: D19411136

fbshipit-source-id: ec0a957dc57819f0ee7d138c858209cabe3e5102
2020-01-15 09:23:30 -08:00
Jiawei Lv f11937ef65 Revert D19271321: iOS - deprecate iOS 9 support by removing runtime checks for 10.0+
Differential Revision:
D19271321

Original commit changeset: 424ad7e21612

fbshipit-source-id: 2bd9599e8fb31914dbcbc03f732379d6c8103028
2020-01-14 21:43:08 -08:00
Héctor Ramos 8b735a2c1e Skip testNotUTF8Convertible (correct path) (#27767)
Summary:
Use correct path to testNotUTF8Convertible which is being skipped.

## Changelog

[Internal] - Use correct path to testNotUTF8Convertible which is being skipped.
Pull Request resolved: https://github.com/facebook/react-native/pull/27767

Test Plan: Circle CI

Differential Revision: D19404469

Pulled By: hramos

fbshipit-source-id: 70cf06c90dac74ac7963b9a35a543e11b21ba471
2020-01-14 18:23:49 -08:00
Kevin Gozali d3e81d5832 iOS - deprecate iOS 9 support by removing runtime checks for 10.0+
Summary:
This removes all callsites that rely on runtime checks to detect the target deployment version. We no longer need to check for iOS 10+ in a few places. Note: for this to compile, the hosting app needs to target iOS 10.0+.

Changelog: [iOS] [Deprecated] - Deprecate iOS 9

Reviewed By: hramos

Differential Revision: D19271321

fbshipit-source-id: 424ad7e2161261d148cb436cc20b4c531a4ba5b7
2020-01-14 18:23:49 -08:00
Kevin Gozali 9d36375b66 iOS: mark apple_library()'s to target SDK 10
Summary:
This forces individual rn libraries to target SDK 10+

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D19382542

fbshipit-source-id: f4cdebc82a03578134d1de4c9d8a7923fa128e65
2020-01-14 18:23:49 -08:00
Héctor Ramos ace68f03e8 Use correct location for buck_to_junit (#27766)
Summary:
`test_android`'s Test Collection step fails when it attempts to convert buck's output to the junit-compatible format that Circle CI expects. Executing the script from the `okbuck` location should help here.

## Changelog

[Internal] - Use correct location for buck_to_junit in test_android CI step
Pull Request resolved: https://github.com/facebook/react-native/pull/27766

Test Plan: Circle CI

Differential Revision: D19403837

Pulled By: hramos

fbshipit-source-id: 44e599ab653e7412340c3dcfdc45c5d37bcea1ee
2020-01-14 18:23:48 -08:00
Ramanpreet Nara cd833c3bb0 Make remaining NativeModules TurboModule-compatible
Summary:
This converts all NativeModules excluding the following into TurboModules:

```
// Deleted
"fbsource/fbandroid/java/com/facebook/catalyst/modules/relaynativecache/RelayNativeCacheReaderModule.java"

// Owners of FBC will migrate these by themselves
"fbsource/xplat/fbc-mobile-app/android/app/src/main/java/com/fbc/i18n/FBCi18nAssetsModule.java"
"fbsource/xplat/fbc-mobile-app/android/app/src/main/java/com/fbc/react/CellScanResultsModule.java"
"fbsource/xplat/fbc-mobile-app/android/app/src/main/java/com/fbc/react/WiFiScanResultsModule.java"

// Don't have Buck owners
"fbsource/xplat/js/react-native-fbsdk/android/src/main/java/com/facebook/reactnative/androidsdk/FBAccessTokenModule.java"
"fbsource/xplat/js/react-native-fbsdk/android/src/main/java/com/facebook/reactnative/androidsdk/FBGraphRequestModule.java"
"fbsource/xplat/js/react-native-fbsdk/android/src/main/java/com/facebook/reactnative/androidsdk/FBLoginManagerModule.java"
"fbsource/xplat/js/react-native-fbsdk/android/src/main/java/com/facebook/reactnative/androidsdk/FBShareAPIModule.java"
"fbsource/xplat/intl/oss-fbt/__github__/react-native-fbt-android-native-module/android/src/main/java/com/reactlibrary/FbtAndroidNativeModule.java"
```

This should conclude the Android TurboModule migration.

Changelog:
[Android][Added] - Make remaining NativeModules TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D19383442

fbshipit-source-id: 71beaee087f6436b197a65f0d68527d9964bb6ce
2020-01-14 16:39:54 -08:00
Ramanpreet Nara 4eb389d069 Ensure NativeModules depend on their spec's owners
Summary:
For every untyped NativeModule Java file, we ensure that its owner depends on the owner of its JS spec.

Changelog:
[Internal]

Reviewed By: PeteTheHeat

Differential Revision: D19382937

fbshipit-source-id: 0a1d840bff2f9e8db0f06c910448e9b25415d18c
2020-01-14 16:39:54 -08:00
Héctor Ramos 05f1bb3dd4 Bump Homebrew cache key (#27764)
Summary:
Trivial: bump Circle CI Homebrew cache key to move past cache error in CI builds.

Changelog:
[Internal] - Bump Homebrew cache key on Circle CI

Pull Request resolved: https://github.com/facebook/react-native/pull/27764

Differential Revision: D19401723

Pulled By: hramos

fbshipit-source-id: cec18ea68ac141ab85ad694ac261d98cbf0e4440
2020-01-14 16:36:29 -08:00
Nate Stedman 644eb0a961 Revert D19400656: Revert D19377037: [fb_apple_library][codemod][12/12] Add extension API parameters to libraries
Differential Revision:
D19400656

Original commit changeset: 57deddfd6006

fbshipit-source-id: 5271e9faa002ff64508d8e52d0c60bf7a362ff02
2020-01-14 15:27:31 -08:00
Shubho Sadhu 89823c944b Revert D19377037: Add extension API parameters to libraries
Differential Revision:
D19377037

Original commit changeset: 3026a3400570

fbshipit-source-id: 57deddfd6006c6d171a005f4dd35e1d1df30de64
2020-01-14 14:45:39 -08:00
Héctor Ramos 9fb2ca0b53 Bump Xcode to 11.2.1 (#27434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/27434
Pull Request resolved: https://github.com/facebook/react-native/pull/27295

- Use Xcode version 11.2.1 in both internal and external tests.
- Update snapshot reference images to use iPhone 8 test device.

Xcode 11.3.0 will be available in Sandcastle in the next week or so.

Changelog:

[Internal] - Bump Xcode version used in tests to 11.2.1.
[Internal] - Update iOS Snapshots.

Reviewed By: cs01

Differential Revision: D18849584

fbshipit-source-id: 9e3b92f080a4dc6a15dac0535b7562ff6a5c08a9
2020-01-14 13:30:05 -08:00
Oleksandr Melnykov 7c066ae952 Integrate WebView into Fabric on Android
Summary:
This diff integrates WebView into Fabric on Android.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D19177933

fbshipit-source-id: 0586f2a44201ee867756e000923859a73ec68ab9
2020-01-14 11:36:57 -08:00
David Vacca dbb7eacb42 Add support to render <View> with no fixed size nested within a <Text>
Summary:
This diff fixes the redbox error: Views nested within a <Text> must have a width and height

This error is reproducible when rendering a View with no fixed size, inside a <Text>. e.g.
```
function PlaygroundContent(props: {}) {
  return (
    <View style={styles.container}>
      <Text>
        <View>
          <Image source={fbicon.filled('chevron-down', 10)} />
        </View>
      </Text>
    </View>
  );
}
```

changelog: Add support to render <View> with no fixed size nested within a <Text>

Reviewed By: shergin

Differential Revision: D19387760

fbshipit-source-id: a9cee8410e56a2d362d6b8f993e602719c416925
2020-01-14 09:05:21 -08:00
Ramanpreet Nara 7e3a43c23d Fix NativeJSCHeapCapture
Summary:
In D15393464, we introduced `NativeHeapCapture`, but it had a few problems:
1. It required `JSCHeapCapture` by doing `TurboModuleRegistry.get<Spec>('HeapCapture')`, when it should have done `TurboModuleRegistry.get<Spec>('JSCHeapCapture')`.
2. It had an additional method `captureHeap`, which didn't exist on the Android NativeModule.

This diff corrects those mistakes.

Changelog:
[Both][Fixed] - Fix JSCHeapCapture

Reviewed By: PeteTheHeat

Differential Revision: D19383511

fbshipit-source-id: 30e69afbcdba673f3f32c16bde4f0342568ab97d
2020-01-14 08:03:49 -08:00
Samuel Susla 6bdfd84a45 Move event structs into event emitter namespace
Summary:
In codegen we generate structs that represents events. These structs are later dispatched by generated `EventEmitter`.
They had unpleasant naming, for example `SliderOnValueChangeStruct`. This diff changes the code generated so it becomes `SliderEventEmitter::OnValueChange`, this better expresses the relationship of the two classes.

Changelog: [Internal]

Motivation: Better express relationship between EventEmitter and classes that represent events.

Reviewed By: rickhanlonii, shergin

Differential Revision: D19373850

fbshipit-source-id: a5eea085013dbc119169e2b06ba9f9fe44c7fcd9
2020-01-14 06:39:33 -08:00
Samuel Susla f15b80b675 Migrate Keyframes to Fabric using interop layer
Summary:
Adds Keyframes to interop whitelist of supported components.
In `RCTKeyframesManager.m` we look into subviews in order to find `RCTKeyframesView`, this is because the view returned from paper's `UIManager` is interop itself.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D19309355

fbshipit-source-id: f9b598ee6ad5340a4e4b3914330c70eea9f43926
2020-01-14 06:30:35 -08:00
Samuel Susla fca833e2ae Fix handling of nil event in legacy interop layer's eventInterceptor
Summary:
interop layer doesn't deal with `nil` being sent as event, example https://fburl.com/diffusion/t5zx6xm0.

This later triggers following assertion https://fburl.com/diffusion/dr5xzgic.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D19309356

fbshipit-source-id: 82b3841c337f949ce7ca0b875c98f608edddb599
2020-01-14 06:30:35 -08:00
Samuel Susla 139bf7cffe Add plugin assertion to ensure image component is loaded
Summary:
With plugins being used for components, there is danger that someone will remove buck target as dependency and component in the target won't be available for Fabric.

That's where `plugin_assertion` comes into play. For now I hardcoded a list of components. In the future, this list will be generated from JS components that are used in the app.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D19197548

fbshipit-source-id: 0d31f53b573c343561715a8fb6fc7f0abfdb5b76
2020-01-14 04:05:16 -08:00
Oleksandr Melnykov e848b0036d Use commands instead of setNativeProps for PickerAndroid
Summary:
Fabric doesn't support setNativeProps, so we are using view commands instead.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D18044169

fbshipit-source-id: d5f199b930244d02f174ea8a7ef732e9a8ef2476
2020-01-14 03:57:28 -08:00
Oleksandr Melnykov 1e6e37a3a8 Use commands instead of setNativeProps for AndroidSwipeRefreshLayout
Summary:
As a part of the migration from setNativeProps in Fabric and Paper, we are replacing it by view commands in the RefreshControl component on Android.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D18475450

fbshipit-source-id: ad89547fada3444f725fd9b00e8482cfc8f4d7fc
2020-01-14 03:53:57 -08:00
Oleksandr Melnykov 461d68e656 Use commands instead of setNativeProps for CheckBox
Summary:
As a part of the migration from setNativeProps in Fabric and Paper, we are replacing it by view commands in the Checkbox component on Android.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D18451749

fbshipit-source-id: 49d786ef3383df95b10260ba2b7f68489ad31789
2020-01-14 03:44:25 -08:00
Pascal Hartig d5ba113bb2 clang-format cpp
Summary:
Ran `arc f` against some CPP files to be modified with the next diff
to reduce the churn on it.

## Changelog

[Android] [Changed] - Formatted cpp/h code with clang-format

Reviewed By: javache

Differential Revision: D19371785

fbshipit-source-id: b7f7b92c4cb9ec7f8da728bb577db29cf11fbb39
2020-01-14 01:04:16 -08:00
Nate Stedman 8d57691a60 Add extension API parameters to libraries
Summary: Changelog: [Internal]

Differential Revision: D19377037

fbshipit-source-id: 3026a34005707fb371df60eaacd142988b012751
2020-01-13 23:26:15 -08:00
Christoph Nakazawa 35c6bb9ac0 Only set dimensions if the window attributes change
Differential Revision: D19386339

fbshipit-source-id: b7f14c540ceec40cae0c4eb9fc93f2020a6ee16f
2020-01-13 23:26:14 -08:00
Valentin Shergin 8219db9a4a Fabric: The basic implementation of <TextInput> for iOS
Summary:
This is the partial implementation of Fabric-compatible <TextInput> component on iOS. All features are supported besides those:
 * `focus()`, `blur()`, `clear()` imperative calls;
 * Controlled TextInput as the whole feature in general;
 * Controlling selection from JavaScript side;
 * `autoFocus` prop;
 * KeyboardAccessoryView.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D17400907

fbshipit-source-id: 0ccd0e0923293e5f504d5fae7b7ba9f048f7d259
2020-01-13 23:22:10 -08:00
Valentin Shergin 41557966b5 Fabric: <TextInput> component on iOS: RCTTextInputUtils
Summary:
RCTTextInputUtils contains a bunch of conventions and convenience functions that we use in TextInput.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: JoshuaGross

Differential Revision: D19226658

fbshipit-source-id: df72dcdc052b96b6daef2cc0839235761005d914
2020-01-13 23:22:10 -08:00
Valentin Shergin ce9cf3795a Fabric: <TextInput> component on iOS, the C++ part
Summary:
This is C++ part of the implementation of Fabric-compatible <TextInput> component on iOS.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: JoshuaGross

Differential Revision: D19169987

fbshipit-source-id: e2eac9beac6d1e124b5176b4a23676b8e05490c3
2020-01-13 23:22:09 -08:00
Peter Argany 1fbc6a7c17 Fix animations in OSS debug builds by modifying `Platform.isTesting()` behaviour
Summary:
In D14244606 I "fixed" `Platform.isTesting()` in JS. By fixed, I made it return true when running SSTs.

People in OSS complained about this in discord and [github](https://github.com/facebook/react-native/issues/27010). The problem is that this call returns true whenever an RN project references Detox in the build.gradle file. In practice, this has been really annoying, because it has disabled animations in debug builds, due to D13811035.

The fix is to be more specific, and look for the exact screenshot test activity. I haven't explicitly verified this doesn't trigger from Detox, but it shouldn't. I'll coordinate on the github issue to verify.

Changelog: [Android][Fixed] Fix animations in OSS debug builds by modifying `Platform.isTesting()` behaviour

Reviewed By: TheSavior

Differential Revision: D19384098

fbshipit-source-id: 22c885219f2c00f5dcc3b930b068bfd2ad7e4b8e
2020-01-13 23:22:09 -08:00
Samuel Susla cfbd93ccd5 Fix crash when accessing nullptr imageRequest
Summary:
ImageState if created with default constructor is created with `imageRequest_` being nullptr.
Calling `getObserverCoordinator()` on it was causing a crash.

We create initial state data with `imageRequest` populated.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D19332711

fbshipit-source-id: 0266222551dbfb10b3f86e72a43d5306650fd09b
2020-01-13 23:19:26 -08:00
Joshua Gross 16ada9dfb0 Fix MountingCoordinator stub view tree printer
Summary:
On Android/when printing to logcat, output is truncated to a certain max length; outputting a massive string as a single log item will cause some of it to be truncated. In the case of the mutations list and shadow node description, most of it is truncated.

Easy fix: split into lines and log each line. This isn't necessary on iOS but works fine.

I also removed the conditional and changed to an assert. Most of the time when we're using this block of code, it's because we want to see all mutations; and unless we reintroduce a bug into the core, the assert is never hit and so (before this change) the conditional would never be true and we'd never see this output. It's more generally useful to be able to see this output if the `RN_SHADOW_TREE_INTROSPECTION` macro is defined.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D19378929

fbshipit-source-id: 2f5dffeef7608823ac1ba092090d8c2ab5e965e1
2020-01-13 23:16:14 -08:00
Peter Argany 442dd26873 Fix error in RCTImageLoader in bridgeless mode
Summary:
Bridgeless mode hasn't been able to load random images. I was able to repro this 100% with base64 images. Loading these images hits a particular flow in `RCTImageLoader` which relies on the bridge to access `RCTNetworking`. This diff uses the TM Lookup Delegate as a fallback.

Changelog: [iOS][Internal] Fix error in RCTImageLoader in bridgeless mode

Reviewed By: sammy-SC

Differential Revision: D19331467

fbshipit-source-id: 8239ee258425da4ed8cb9f6dcdcd7f37c162eb19
2020-01-13 22:54:16 -08:00
Peter Argany 12f78f145a Fix crash in RCTBlobManager in bridgeless mode
Summary:
When bridge is nil, RCTBlobManager crashes with `EXC_BAD_ACCESS`.

The fix: instead of using the bridge to find RCTNetworking, use TM lookup delegate.

Changelog: [iOS][Internal] Fix crash in RCTBlobManager in bridgeless mode

Reviewed By: mdvacca

Differential Revision: D19320136

fbshipit-source-id: 49aabb3ce53b2ec620fcc02be1c6c1b44066f440
2020-01-13 22:54:16 -08:00
Peter Argany a6c0f5a120 Fix typo in RCTSurface log
Summary:
title

Changelog: [iOS][Internal] Fix typo in RCTSurface log

Reviewed By: zackargyle, sammy-SC

Differential Revision: D19334748

fbshipit-source-id: 61cc984072d2f109d5ae8bce70688094d9fbe67c
2020-01-13 14:23:54 -08:00
Valentin Shergin 5e6c61e449 Fabric: Fixing incorrect retaining policy for RCTSurfacePreseter (crash in RCTNativeAnimatedModule)
Summary:
This fixing a crash in RCTNativeAnimatedModule caused by accessing an `RCTSurfacePreseter` instance as "Objective-C runtime associated object" which was retained with `OBJC_ASSOCIATION_ASSIGN` policy. The documentation for `OBJC_ASSOCIATION_ASSIGN` says "Specifies a weak reference to the associated object." but it's a lie ( https://stackoverflow.com/questions/16569840/using-objc-setassociatedobject-with-weak-references) ). The policy is actually `ASSIGN` (aka `unsafe-unretained`).
That's why it's crashing.

We change that to `OBJC_ASSOCIATION_RETAIN` to retain the object (which meets the expectation of the interface of the category).

We also should not have over-retaining issues because:
* SurfacePresenter does not retain a Bridge or any object that can retain a Bridge;
* SurfacePresenter is a long-living object, we don't recreate it during bridge reloading or stuff like that.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D19333869

fbshipit-source-id: 1ff03659a880f2742b909c5668c47144719eeee2
2020-01-13 13:36:36 -08:00
SAEED aa0ef15335 Applied missing changes from bumping Gradle wrapper to 6.0.1 (#27639)
Summary:
This PR is related to https://github.com/facebook/react-native/issues/27290.
I just upgraded my project's Gradle wrapper version to 6.0.1 and I realized some files have some differences with the files in react-native `template` folder. so I create this PR to apply differences.
the main difference is in the `gradlew` file. I'm not familiar with Linux shell scripts but it seems there was a syntax error in `case` items syntax. `(` should not be used in declaring case's items. it may has building error in Linux OS.

## Changelog

[Android] [Fixed] - Applied missing changes from bumping Gradle wrapper to 6.0.1
Pull Request resolved: https://github.com/facebook/react-native/pull/27639

Test Plan: I have no Linux OS right now, so I can't directly test these changes, but because the changes have made by running `gradlew wrapper` command, it should not break CI. (I hope :) )

Differential Revision: D19341671

Pulled By: cpojer

fbshipit-source-id: ccfc3c12af3f5468671737e5ba0b1674b4491590
2020-01-13 12:54:08 -08:00
Rick Hanlon 5cd0c8a4d2 Bump detox simulator version to work with latest xcode (#27733)
Summary:
The latest xcode version removed iPhone 6s, so we need to bump to the latest simulator listed that has 3d touch.

## Changelog

[General] [Fix] - Bump e2e simulator version
Pull Request resolved: https://github.com/facebook/react-native/pull/27733

Test Plan: - `yarn build-ios-e2e && yarn test-ios-e2e `

Reviewed By: hramos, sammy-SC

Differential Revision: D19345576

Pulled By: rickhanlonii

fbshipit-source-id: 428cb83ccb899409e972551f18df580174adee91
2020-01-13 11:15:55 -08:00
Dan Abramov 159624d901 React Native sync for revisions 6cff70a...19f6fe1
Summary:
This sync includes the following changes:
- **[19f6fe170](https://github.com/facebook/react/commit/19f6fe170 )**: Revert "Revert "Dispatch commands to both UIManagers from both renderers (#17211)" (#17232)" (#17799) //<Eli White>//
- **[6250462be](https://github.com/facebook/react/commit/6250462be )**: Renamed "ReactDOM-fb" imports to "ReactDOM" in www shims (#17797) //<Brian Vaughn>//
- **[59f21f1b2](https://github.com/facebook/react/commit/59f21f1b2 )**: HostText needs to copy over from current if it is unchanged in persistent  mode (#17538) //<Sebastian Markbåge>//
- **[ccc6100d7](https://github.com/facebook/react/commit/ccc6100d7 )**: Fix comments typos (#17550) //<Nick S. Plekhanov>//
- **[1b9328cd9](https://github.com/facebook/react/commit/1b9328cd9 )**: Null stateNode after unmount (#17666) //<Brian Vaughn>//
- **[897976600](https://github.com/facebook/react/commit/897976600 )**: [ESLint] Allow partial matches for custom Effect Hooks (#17663) //<Dan Abramov>//
- **[72592310a](https://github.com/facebook/react/commit/72592310a )**: Create packages/dom-event-testing-library (#17660) //<Nicolas Gallagher>//
- **[a5e951d4c](https://github.com/facebook/react/commit/a5e951d4c )**: [react-interactions] Event testing library improvements (#17614) //<Nicolas Gallagher>//
- **[7dc974542](https://github.com/facebook/react/commit/7dc974542 )**: [Flight] Chunks API (#17398) //<Sebastian Markbåge>//
- **[9354dd275](https://github.com/facebook/react/commit/9354dd275 )**: Make HostComponent inexact (#17412) //<Eli White>//
- **[4c270375e](https://github.com/facebook/react/commit/4c270375e )**: Favor fallthrough switch instead of case statements for work tags (#17648) //<Sebastian Markbåge>//
- **[6fef7c47a](https://github.com/facebook/react/commit/6fef7c47a )**: Add a regression test for switching from Fragment to a component (#17647) //<Dan Abramov>//
- **[9fe103124](https://github.com/facebook/react/commit/9fe103124 )**: [react-interactions] Rename Flare APIs to deprecated and remove from RN (#17644) //<Dominic Gannaway>//
- **[4b0cdf29a](https://github.com/facebook/react/commit/4b0cdf29a )**: Build FB RN targets only in experimental mode (#17641) //<Dan Abramov>//
- **[7309c5f93](https://github.com/facebook/react/commit/7309c5f93 )**: Use zero-fill right shift instead of Math.floor (#17616) //<伊撒尔>//
- **[3c54df091](https://github.com/facebook/react/commit/3c54df091 )**: Fix missing stacks in WWW warnings (#17638) //<Dan Abramov>//
- **[b66e86d95](https://github.com/facebook/react/commit/b66e86d95 )**: react-refresh@0.7.1 //<Dan Abramov>//
- **[c2d1561c6](https://github.com/facebook/react/commit/c2d1561c6 )**: [Fast Refresh] Support injecting runtime after renderer executes (#17633) //<Dan Abramov>//
- **[f42431abe](https://github.com/facebook/react/commit/f42431abe )**: Revert "Remove renderPhaseUpdates Map (#17484)" (#17623) //<Dan Abramov>//
- **[0b5a26a48](https://github.com/facebook/react/commit/0b5a26a48 )**: Rename toWarnDev -> toErrorDev, toLowPriorityWarnDev -> toWarnDev (#17605) //<Dan Abramov>//
- **[0cf22a56a](https://github.com/facebook/react/commit/0cf22a56a )**: Use console directly instead of warning() modules (#17599) //<Dan Abramov>//
- **[b6c423daa](https://github.com/facebook/react/commit/b6c423daa )**: Use matching test command for equivalence tests (#17604) //<Dan Abramov>//
- **[8a347ed02](https://github.com/facebook/react/commit/8a347ed02 )**: Remove renderPhaseUpdates Map (#17484) //<Sebastian Markbåge>//
- **[be603f5a5](https://github.com/facebook/react/commit/be603f5a5 )**: [react-events] Remove lastNativeEvent in favor of SystemFlags (#17585) //<Dominic Gannaway>//
- **[b15bf3675](https://github.com/facebook/react/commit/b15bf3675 )**: Add component stacks to (almost) all warnings (#17586) //<Dan Abramov>//
- **[2afeebdcc](https://github.com/facebook/react/commit/2afeebdcc )**: [react-interactions] Remove responder root event types + revert commit phase change (#17577) //<Dominic Gannaway>//
- **[9ac42dd07](https://github.com/facebook/react/commit/9ac42dd07 )**: Remove the condition argument from warning() (#17568) //<Laura buns>//
- **[7bf40e1cf](https://github.com/facebook/react/commit/7bf40e1cf )**: Initialize update queue object on mount (#17560) //<Andrew Clark>//
- **[e039e690b](https://github.com/facebook/react/commit/e039e690b )**: Revert Update Queue Refactor //<Andrew Clark>//
- **[b617db3d9](https://github.com/facebook/react/commit/b617db3d9 )**: Refactor Update Queues to Fix Rebasing Bug //<Andrew Clark>//
- **[b43eec7ea](https://github.com/facebook/react/commit/b43eec7ea )**: Replace `wrap-warning-with-env-check` with an eslint plugin (#17540) //<Laura buns>//
- **[acfe4b21b](https://github.com/facebook/react/commit/acfe4b21b )**: [react-interactions] Upgrade passive event listeners to active listeners (#17513) //<Dominic Gannaway>//
- **[5064c7f6a](https://github.com/facebook/react/commit/5064c7f6a )**: Revert Rerender Error Check (#17519) //<Sebastian Markbåge>//
- **[6d105ad3f](https://github.com/facebook/react/commit/6d105ad3f )**: [react-interactions] Move Flare event registration to commit phase (#17518) //<Dominic Gannaway>//
- **[dc18b8b8d](https://github.com/facebook/react/commit/dc18b8b8d )**: Don't group Idle/Offscreen work with other work (#17456) //<Sebastian Markbåge>//
- **[f523b2e0d](https://github.com/facebook/react/commit/f523b2e0d )**: Use fewer global variables in Hooks (#17480) //<Sebastian Markbåge>//
- **[d75323f65](https://github.com/facebook/react/commit/d75323f65 )**: Remove case that only exists for createBatch (#17506) //<Sebastian Markbåge>//
- **[79572e34d](https://github.com/facebook/react/commit/79572e34d )**: Adjust SuspenseList CPU bound heuristic (#17455) //<Sebastian Markbåge>//
- **[969f4b5bb](https://github.com/facebook/react/commit/969f4b5bb )**: Change DevTools hook warning message (#17478) //<Dan Abramov>//
- **[6470e0f16](https://github.com/facebook/react/commit/6470e0f16 )**: [Fresh] Make all errors recoverable (#17438) //<Dan Abramov>//

Changelog:
[General][Changed] - React sync for revisions 6cff70a...19f6fe1

Reviewed By: TheSavior

Differential Revision: D19318286

fbshipit-source-id: acaa5224f7162a274c395a62e54da82199001005
2020-01-09 11:18:06 -08:00