Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50367
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979600
fbshipit-source-id: be36f4c409a0423b3d3ccdf2c28d96c7a3f50201
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50512
Reland of D72389708
This renames the method to be more aligned to the fact that we're using this entrypoint both for internal
and for OSS users.
I've also added a `assertLegacyArchitectureOnlyWhenMinifyEnabled` that will run only for internal builds.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D72552028
fbshipit-source-id: 2594df9ef8056f9931960117770c4b7cddd4e922
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50511
Reland of D72384347
ReactMarker is currently loading the whole `reactnativejni` which we should not be loading in NewArch.
This is resulting in a warning fired for all the NewArch users with `legacyWarningsEnabled`.
I'm cleaning this up by moving it inside `reactnativejni_common`.
Changelog:
[Internal] [Changed] - Move ReactMarker to `reactnativejni_common` as it's used in NewArch also
Reviewed By: javache
Differential Revision: D72552075
fbshipit-source-id: bbc75aada1564f6f54ea70a8dd4f5145d4a3ffaa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50495
Changelog: [internal]
This migrates the last remaining usages of these polyfills to the built-in classes.
Reviewed By: yungsters
Differential Revision: D67828652
fbshipit-source-id: 5ff039d7413aed49d882ff03e722531cdd195488
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50494
Changelog: [internal]
Removes the dependency on the `event-target-shim` npm package now that we're using a custom implementation within `react-native`.
Reviewed By: yungsters
Differential Revision: D67828636
fbshipit-source-id: 8727f8caa2bd4badd7162eb7b993dcc768e74b85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50485
Changelog: [internal]
This cleans up the experiment to test the new implementations of `XMLHttpRequest`, `FileReader` and `WebSocket` using the built-in `EventTarget` definition.
This effectively replaces the legacy implementations with the ones using the built-in `EventTarget` class in stable.
Reviewed By: yungsters
Differential Revision: D68625225
fbshipit-source-id: 7ccefe5d8612baca283146cdbca7f7f1d51b4ffa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50499
We enocuntered an issue internally where the `RCTInstance` was ready before the modules were done registering statically.
When this happens, it can occur that we iterate over an array that is going to be modified.
With this change, we are introducing several changes:
- By default the logs are not outputted, so the array is not going to be populated
- we are making a copy of the array before we start iterating, so even if the original reference is updated, the iteration is safe
- we are not emitting logs if in release mode. This will protect production from this issue. Also, these warns are not going to be useful in production anyway.
## Changelog:
[Internal] - fix crash when RCTInstance is ready while modules are initialized
## Facebook:
This fixes T220205371
Reviewed By: Abbondanzo
Differential Revision: D72512518
fbshipit-source-id: 32e561111d034455a6a778d05af4a96602b74bfb
Summary:
ReactMethod will remain to be supported in the New Architecture, we are unmarking it
changelog: [internal] internal
Reviewed By: shwanton
Differential Revision: D72491698
fbshipit-source-id: 656b36711dcdfc0a776ac05b1f7f431d6416f9dd
Summary:
Changing these object arguments to `$ReadOnly` permits passing in values that are `$ReadOnly` (e.g. `payload` argument to `enqueueNativeEvent`).
Changelog:
[Internal]
Reviewed By: lyahdav
Differential Revision: D72474879
fbshipit-source-id: 27341131724f4f572b78563975774a5b20dee8f8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50489
ParagraphState is shared between ParagraphTextView and ParagraphComponentView, but we only need one copy. We were forgetting to clear this on ParagraphTextView when recyling.
Changelog: [iOS][Fixed] ParagraphState is correctly deallocated when recycling Text
Reviewed By: cipolleschi
Differential Revision: D72454038
fbshipit-source-id: 43afa4eaea183cc66b64d16870c1403debff985a
Summary:
# Changelog: [Internal]
We should avoid allocating multiple of these, since they can get really big.
`RuntimeSamplingProfile` may contain up to 10k of `Sample` for every second of sampling. Every `Sample` may contain up to 500 of call frames, each of which may have a copy of strings like `functionName` and `url`.
> NOTE: The actual logic for deduplicating strings and not allocating too many of them is not part of this diff and will be published separately. Even with deduplication, there is a reason to avoid copying the profile.
Reviewed By: javache
Differential Revision: D72254364
fbshipit-source-id: fa7907fb5cabbd2ac99d3e4e05a93bcb07f7f7c7
Summary:
# Changelog: [Internal]
This was changed in D70402439.
Since these hexadecimal numbers are serialized as strings, we don't need to includes empty bits, this could save us few kilobytes of the trace in json format.
Also, this is the default for Chromium, so we shouldn't probably diverge.
`0x00000001` -> `0x1`
Reviewed By: robhogan
Differential Revision: D72459307
fbshipit-source-id: 5cc4ccbe25cdc16946e745184ad17dfcd51c6449
Summary:
# Changelog: [Internal]
`"ProfileChunk"` trace events can actually be big, depending on the number of the unique nodes reported in a single chunk.
We should avoid copying it for memory and performance reasons.
Reviewed By: robhogan
Differential Revision: D72459306
fbshipit-source-id: db3583c6c6397bb6ee8a0eb33a06a48bc10e82b8
Summary:
This renames the method to be more aligned to the fact that we're using this entrypoint both for internal
and for OSS users.
I've also added a `assertLegacyArchitectureOnlyWhenMinifyEnabled` that will run only for internal builds.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D72389708
fbshipit-source-id: 23830df2f71cc816c7ca178b735a930e794efe47
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50471
ReactMarker is currently loading the whole `reactnativejni` which we should not be loading in NewArch.
This is resulting in a warning fired for all the NewArch users with `legacyWarningsEnabled`.
I'm cleaning this up by moving it inside `reactnativejni_common`.
Changelog:
[Internal] [Changed] - Move ReactMarker to `reactnativejni_common` as it's used in NewArch also
Reviewed By: javache
Differential Revision: D72384347
fbshipit-source-id: 83965c3e4eb7847184856485d1cc1c478b2888d5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50479
In D72273163 the only reference to RN feature flag `throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS` was removed, so this diff removes the feature flag. Also it removes remnants of D69922771 which are no longer needed.
Changelog: [Internal]
Reviewed By: shwanton
Differential Revision: D72427164
fbshipit-source-id: 398583ac14910a396839140c06011efa084fe04d
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:
This PR adds a bunch of OSS libraries to the testing matrix.
We use these OSS libraries internally in our Meta application, so we want to make sure that our changes don't break them.
## Changelog:
[Internal] - Add OSS libraries used internally to the testing matrix
Pull Request resolved: https://github.com/facebook/react-native/pull/50477
Test Plan: GHA - Tested in a sample job firts:
Reviewed By: cortinico
Differential Revision: D72401647
Pulled By: cipolleschi
fbshipit-source-id: c0c2f4b2525b58822c2cc6225fe64210a9513275
Summary:
Use nightlies to test reanimated with RN nightlies
## Changelog:
[Internal] - use reanimated nightlies together with react native nightlies to spot breaking changes
Pull Request resolved: https://github.com/facebook/react-native/pull/50428
Test Plan: GHA - Tested triggering it from a PR in this job: https://github.com/facebook/react-native/actions/runs/14197051228?pr=50428
Reviewed By: cortinico
Differential Revision: D72243345
Pulled By: cipolleschi
fbshipit-source-id: 297ec0073dfc32ec5a5e90630b93867fac0b564f
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:
Pull Request resolved: https://github.com/facebook/react-native/pull/50467
Changelog: [Internal]
Adds a transform that is able to divide properies of interaces, types and classes into sections:
- properties
- properties typed as functions
- methods
ands sorts them alphabetically within the groups.
Reviewed By: huntie
Differential Revision: D72381050
fbshipit-source-id: 20781dc44e19e63cbb5706a02e513fc0e9bb2412
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