Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50470
This diff introduces a new property called `legacyWarningsEnabled` for `gradle.properties` that
toggles the Legacy Arch warnings for users.
I've also introduced a new `ReactNativeApplicationEntryPoint` that is generated by RNGP. This class
effectively wrap `DefaultNewArchitectureEntryPoint` by setting warnings and also invoking SoLoader.
It will reduce the errors in the user space.
As of now warnigns appear in Logcat, but I'm looking into adding some UI in a subsequent diff.
Changelog:
[Android] [Added] - Add a `legacyWarningsEnabled` property to enable Legacy Warnings on NewArch
Reviewed By: mdvacca
Differential Revision: D72383907
fbshipit-source-id: bcd659a23ec5b468958124f0f6650ff72d01ce81
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50490
Changelog: [internal]
This follows the good practice in Fantom tests.
Reviewed By: javache
Differential Revision: D72454795
fbshipit-source-id: 412ee53f61073c63295a23fd7decd6f19a72bf99
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50484
Changelog: [internal]
This cleans up the `enableUIConsistency` feature flag (shipping the feature) after we verified it was stable and performance in production.
Reviewed By: yungsters
Differential Revision: D72387602
fbshipit-source-id: 11d225d962f7e3a47e858d039b7fd5c70a6cadfd
Summary:
Found this unused class with static code analysis. It is internal and has no OSS usages, so it seems like it can be safely deleted.
## Changelog:
[INTERNAL] - Remove unused com.facebook.react.fabric.mounting.mountitems.SendAccessibilityEvent class
Pull Request resolved: https://github.com/facebook/react-native/pull/50478
Test Plan:
```sh
yarn test-android
yarn android
```
Reviewed By: fabriziocucci
Differential Revision: D72445544
Pulled By: javache
fbshipit-source-id: ebbb035da22111e41b04131596d3ec61d4e1423c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50480
The map in the script has an if in it checking for proper release channel. For feature flags that do not pass this if, they do not have an alternative return, so `map` just maps this to `undefined`. That means there is still an element in this array which gets joined by 2 new lines. As a result every new feature flag will add 2 new lines of white space making these files look rather silly.
Fix is to filter undefined out.
Changelog: [Internal]
Reviewed By: shwanton
Differential Revision: D72427349
fbshipit-source-id: 87e1d63c8854652296ce9160ab7171a948983d54
Summary:
The original diff caused some breakages.
Changelog: Backout [Android][Fixed] Made Task.java nullsafe
Differential Revision: D72433889
fbshipit-source-id: 53f7e730455ccaadde197a0f400fc6e834c1ffdd
Summary:
Image component was missing an override which enables setting accessibility values and properties.
The main issue is the lack of this prevented Image component from being accessed by VoiceOver.
Changelog: [iOS][Fixed] - Fixed accessible prop no-opts on Image components
Reviewed By: joevilches
Differential Revision: D72410952
fbshipit-source-id: 5612205aca1710fe4bfed6132efeb59065ebf0b3
Summary:
Mark concrete classes of shadow node as LegacyArchitecture
These classes won't be included in legacy architecture apks
changelog: [internal] internal
Reviewed By: joevilches, mlord93, Abbondanzo
Differential Revision: D72351188
fbshipit-source-id: 4727cdd1486b2fafb87fe3b512440af3264ad189
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50249
This change introduces a flag to turn off the legacy architecture warning if they become too annoying.
The flag can be set in the Info.plist of the React Native architecture and it is controlled by the key: `RCTLegacyWarningsEnabled`.
* If the key is missing or with a value of `YES`, logs are enabled
* If the key has a value of `NO`, react native will not output any log.
We decided to use the Info.plist file to configure the logs because in that way it will work also with React Native prebuilds.
## Changelog:
[iOS][Added] - Add flag to enable or disable legacy warning.
Reviewed By: cortinico
Differential Revision: D71814001
fbshipit-source-id: b6ae6b032ff7add6bae3d73dba490adeaceffa1f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50244
This change adds warning to React Native whenever a component is loaded using the interop layer.
The warning is emitted only once per component.
## Changelog:
[iOS][Added] - Add warnings when components are loaded using the interop layer.
Reviewed By: cortinico
Differential Revision: D71808323
fbshipit-source-id: ce864f73c7789512d4e5e67368b5aa67f94e0570
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50441
When useFabricInterop is disabled, deleting component descriptors in Component Registry is failing since https://github.com/facebook/react-native/pull/47321 removed the Fabric Interop check from the ComponentDescriptorRegistry.cpp which was added earlier in https://github.com/facebook/react-native/pull/42294
Adding back the logic of Fallback component descriptor and error for the same.
Changelog:
[General][Fixed] Fixing Fabric Interop layer bug defaulting to UnstableLegacyViewManagerAutomaticComponentDescriptor irrespective of feature flags.
Reviewed By: javache
Differential Revision: D72266017
fbshipit-source-id: 1f3093d37dbe2b96ca26aa80c0a59d5c3026e9cf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50440
Making the following changes to definition of `useFabricInterop` feature flag:
1. Changing default value to True for both internal and OSS.
2. Changing expected Release Value to false since aiming at disabling interop finally with new architecture strict mode.
3. Hence changed the `ossReleaseStage` from `canary` to `none`
4. Removing all existing over-rides of `useFabricInterop` to True now that the default is True itself.
5. Adding the over-ride to false for Facebook since that doesn't need the interop as is already in new architecture without interop mode.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D72266336
fbshipit-source-id: ff16c5b9d0f39837706a86bd0d178a66a8f2e920
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50448
In preparation for API snapshot generation and README documentation, move into dedicated dir.
Changelog: [Internal]
Reviewed By: iwoplaza
Differential Revision: D72306094
fbshipit-source-id: 3663f9ba9987a59918bae54cfc5a27555b90a9f9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50355
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made Task.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979582
fbshipit-source-id: f4104e5deb1d0538fe8b4968dc1411036a3e9634
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50361
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979592
fbshipit-source-id: 07f3b74362b85803eec90c0c974a88d061d8e816
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50354
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReconnectingWebSocket.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979606
fbshipit-source-id: d71e26fe37bdf5abbe7b933d0fee25e05d0da87d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50368
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979580
fbshipit-source-id: 0eaeaf327421db47a8499a9b6154fa6d5ab8a4fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50353
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DialogModule.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979604
fbshipit-source-id: 556b2b10ef0879bf7cd4eac6eaf3c9c3cc1c5413
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50351
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979584
fbshipit-source-id: 52e29ac578edcbcd9bd14de4d327564d54f421cf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50352
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made FileReaderModule.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979585
fbshipit-source-id: 3bef5ff48d1d27838d2668367785a85b2b863f05
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50360
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979587
fbshipit-source-id: 50c248def66360f2a063d9eb213cfae5d6787943
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50363
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made BlobProvider.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979597
fbshipit-source-id: a6fba0d83f3558b3bed21de484b59ee6b17bb643
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50350
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979586
fbshipit-source-id: 155fc505d131acc1fa3444692928448b8567cbd5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50362
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made MountingManager.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979607
fbshipit-source-id: 0a41e3a6405500c29ec4710ea3ed57e6705f1b4a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50356
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979593
fbshipit-source-id: 4dbe6ae7f44694b77ebf64170cb71393b532b981
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50348
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made MountItemDispatcher.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979589
fbshipit-source-id: 0133fa6bd56d5595e8397029517b43d0a95b260b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50349
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979596
fbshipit-source-id: a463b916328d4aecb6b8d91c37be170a8f6fb355
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50437
Currently we do have `NativeArray`, `NativeMap` being tightly coupled with the old arch (i.e. everything inside `libreactnativejni.so`).
Those classes however are primitives used also by the New Arch and they should be accessible even without the bridge infra.
I've noticed this dependency while working on the Legacy Arch warnings.
Here I'm refactoring those primitives to live in a separate `libreactnativejni_common` module that can be loaded indipendently.
Changelog:
[Internal] [Changed] - Decouple NativeMap and NativeArray from `reactnativejni`
Reviewed By: javache, mdvacca
Differential Revision: D71635967
fbshipit-source-id: 64b0fc26491977a0e6c5be4688ff91969c81d680
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50436
Changelog: [Internal]
`is_idle` was a confusing concept that I didn't find useful when researching why disconnections happen. Instead, I'd like to know when the last communication with inspector proxy took place.
Reviewed By: hoxyq
Differential Revision: D72251072
fbshipit-source-id: 10f83bde6c8f3ed4b661bcfbef57f86f34039e5d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50435
Changelog: [Internal] when reporting how many cdp messages passed inspector proxy, also report their total size
Reviewed By: hoxyq
Differential Revision: D72245498
fbshipit-source-id: 777274527b7e180c984b11414bec54d0e6f9d27b
Summary:
We should not be adding files inside Jest's __mocks__ folder inside the generated podspec.
This takes care of it.
Context: https://github.com/reactwg/react-native-new-architecture/discussions/282
Changelog:
[Internal] [Changed] - Exclude __mocks__ folder from codegen podspec generation
Reviewed By: fabriziocucci
Differential Revision: D72318736
fbshipit-source-id: 73a8c3f3cd84794ead9e7ce622f7ac4299d943f1
Summary:
Currently markers are ignored in RN apps. Utilizing newly added instant track event type for sytrace so the markers are displayed nicely on the timeline. The time delta decoding will be addressed separately for proper timestamp assignment during backend processing.
## Changelog:
[Internal] [Added] - Support for logging mark events with fbsystrace
Reviewed By: javache
Differential Revision: D72094455
fbshipit-source-id: 4cd8f53ddd0b40dfded8d6d8df367698515588c7
Summary:
Make RCTScreenSize and RCTScreenScale initialize during React Native init.
After this diff, there shouldn't be any sync dispatches to the main queue. So, we can just introduce an error into RCTUnsafeExecuteOnMainQueueSync.
## Note
If people manually dispatch to the main queue like so, react native can still deadlock:
```
dispatch_sync(dispatch_get_main_queue(), ^{});
```
Changelog: [Internal]
Reviewed By: lyahdav
Differential Revision: D72273163
fbshipit-source-id: 6211851b380b4f5cd556f48f4d717a6f53d65d32
Summary:
I'll need to use feature flags in this file. And those are only accessible from c++.
Changelog: [Internal]
Reviewed By: lyahdav
Differential Revision: D72326982
fbshipit-source-id: 4c9dfd0e5baa69d979b12914f289d58be6e123a8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50432
This diff adds lint rule to keep React imports consistent across the react native repo. There is a fix suggestion in case if only React is imported.
Changelog:
[internal]
Reviewed By: NickGerleman
Differential Revision: D72244838
fbshipit-source-id: b783d6320520d76c2e5d5ce5c5b7c2a4548d50fe