Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35619
Reference https://github.com/reactwg/react-native-releases/discussions/41#discussioncomment-4353534
I'm exposing `ReactAndroid/src/main/jni/react/cxxcomponents` to be consumed via prefab.
It will be available to both: `react_nativemodule_core` and `reactnativejni`
Changelog:
[Internal] [Changed] - Expose ReactAndroid/src/main/jni/react/cxxcomponents via prefab
Reviewed By: cipolleschi
Differential Revision: D41965512
fbshipit-source-id: 3a5a7473267e2e161d9d7fb0e8dfa74593b47b6e
Summary:
This is a two step (1/2) fix to a race that could caused a `DELETE`...`CREATE` mutations being sent over to the fabric mounting layer. Such combination was assumed not possible from the differ, yet it happened at least in the existence of layout animation and when certain commits happen while animation is active.
This race condition could cause a view to get deleted at the end of one UI frame, yet the mount instructions generated from animation in the next frame still need to access the deleted view and caused crashes like T112157805. Note that even though such crash is recorded as `RetryableMountingLayerException` and is a soft crash (which only gets logged but not crash in production), the out-of-order mount instructions could lead to illegal view state and make the surface unusable, like what's shown here:
{F820669000}
The diff fixes this issue by removing the `DELETE` [conflict animation](https://fburl.com/code/5ctckvz3) keyframe, as well as the `CREATE` [immediate mutations](https://fburl.com/code/txyomytd) from the layout animation. The Fabric mounting layer assumes no combination of `DELETE...CREATE` in the same frame from differ + [layout animation overrides](https://fburl.com/code/zn17uqch).
Reviewed By: sammy-SC
Differential Revision: D41895427
fbshipit-source-id: d6df02663ba707af6db4a63a325ac776ca54d18e
Summary:
This diff adds support for String props on C++ Components
changelog: [internal] internal
Reviewed By: genkikondo
Differential Revision: D41784029
fbshipit-source-id: 3065186074e1feca3dd0dd724105f1596146ee1d
Summary:
Previous diff D41486648 is causing crashes and a sev S311353, which is due to usages of an old Android API that only work after level 24 (D36500518 (0fc42fd35c)). ~~This diff updates the implementation to use a compatible API, but with worse runtime complexity.~~
~~https://fburl.com/txd0r89e is a good explanation on the two algorithm to calculate a streaming median value. This diff uses the approach described in https://stackoverflow.com/a/4903642.~~
## Update
Following suggestion from sshic, I preserved the existing algorithm but with a custom comparator approach.
Changelog: [Internal]
Reviewed By: makovkastar
Differential Revision: D41505143
fbshipit-source-id: 494e07fa627b5cf8bad7971fa5de86d270a7412c
Summary:
Delete references of CppComponentRegistry from the internals of React Native Android renderer, since it's not necessary anymore
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D41638890
fbshipit-source-id: c4b08853722874dbb21891817836862225469dd9
Summary:
This diff deletes the first implementation of C++ ViewManagers integrated into the internals of Fabric
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D41638894
fbshipit-source-id: 2e7aebff587e2e57b7f3fbf37a24b04943c74573
Summary:
Changelog:
[Android][Changed] - Include the inspector in all build modes, and only turn it off/on at runtime.
Reviewed By: jpporto
Differential Revision: D40248901
fbshipit-source-id: f13c58f631e4617a6f157df8899e128959af450a
Summary:
In this diff I'm extending component to integrate layout and hierarchy of components
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D41621587
fbshipit-source-id: e31c87676ec3068036fb6e9444bce85934b18b7b
Summary:
We have the expected module name available as part of the codegen schema, so we can remove the need for developers to implement the `getName` method as part of their module implementation.
Note that this method is not actually used when the TurboModules infra is used, as the moduleName from the turbo module manager is passed through to the TurboModule base class instead. Moving the method to codegen will make it easier to remove this method altogether once the old architecture is fully removed.
Changelog: [Android][Added] Support generating `getName` in react-native-codegen for Java TurboModules
Reviewed By: mdvacca
Differential Revision: D41615387
fbshipit-source-id: 6b117645fa39e5e9ab014b21198496a52f6f2ae2
Summary:
changelog: Introduce setNativeProps to Fabric
Add support for `setNativeProps` in Fabric for backwards compatibility. It is still recommended to move away from `setNativeProps` because the API will not work with future features.
We can make step [Migrating off setNativeProps](https://reactnative.dev/docs/new-architecture-library-intro#migrating-off-setnativeprops) in migration guide optional.
Reviewed By: yungsters, mdvacca
Differential Revision: D41521523
fbshipit-source-id: 4d9bbd6304b8c5ee24a36b33039ed33ae1fc21f8
Summary:
Newer versions of Buck (not released open source) support an `oncall` annotation to denote who owns a particular BUCK file. These annotations are useful to support so that if BUCK files are updated with such annotations they don't break.
## Changelog
[Internal] [Changed] - support oncall annotation in BUCK files
Pull Request resolved: https://github.com/facebook/react-native/pull/35562
Test Plan: The `test_buck` CI job validates that the file can be evaluated by open-source Buck. I ran this on a CircleCI fork, and it passed.
Reviewed By: motiz88
Differential Revision: D41731925
Pulled By: cortinico
fbshipit-source-id: 7d0ae164c3e6289d4aa76892658d46bbe4faf99c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35540
We now don't need to generate .mk files anymore, therefore I'm removing
this logic from the codegen. In RN 0.72 users should be fully migrated
to CMake.
Changelog:
[Android] [Removed] - Remove .mk prebuilt file and .mk file generation from codegen
Reviewed By: rshest
Differential Revision: D41654122
fbshipit-source-id: 3a3c01fa8ab4d48460338e1a9ce2ecbd6df25f47
Summary:
Refactor unique -> shared pointer in Component. This will be necessary in the next diffs of the stack
changelog: [intenal] internal
Differential Revision: D41629759
fbshipit-source-id: 335161c350692e25ac3443bd19675a89f9df60c4
Summary:
Consolidates creation of OkHttpClients used by RN panel apps into PanelAppOkHttpClientProvider. This diff adds no functional changes; however, a followup diff will leverage this to add an Interceptor for overriding the network tier.
Changelog:
[Internal] - Enable passing in custom OkHttpClient to NetworkingModule
Reviewed By: rshest
Differential Revision: D41621244
fbshipit-source-id: 8954f9adc6a0cfdf6312678e2dbd6be8ef9aa5ca
Summary:
On main, We download and store `hermes.tar.gz` locally during builds.
If another commit on the Hermes repo lands, Gradle might not re-download the hermes.tar.gz
file.
This commit fixes it by using `useETag` that allows us to use ETag that Github exposes
to understand if the tarball has been updated or not.
Changelog:
[Internal] [Changed] - Ensure local hermes.tar.gz doesn't get stale between subsequent runs.
Reviewed By: javache
Differential Revision: D41652865
fbshipit-source-id: 9f6e02957989acb02f419286c94b05df701c8a04
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35521
Inside RC3 the jscexecutor target was prepared for prefab consumption
but not properly exposed.
This was not caught by the CI as we're not effectively using this target,
but some of our popular libraries do (i.e. Reanimated). I'm exposing it here.
Changelog:
[Internal] [Changed] - Properly expose `jscexecutor` as a prefab target
Reviewed By: javache
Differential Revision: D41648349
fbshipit-source-id: 1a04bc21aa50eece304828ce1d99ae795a51af48
Summary: `dispatchPreallocationInBackground_` is removed and we don't need to use the lambda function anymore.
Reviewed By: javache
Differential Revision: D41574447
fbshipit-source-id: 9c2b8a067fb86b75320b338e3f8c7989315f9b8b
Summary:
Color support for AnimatedInterpolation was incomplete with native drivers, as only rgba type strings were supported. There was also an issue where color props instead a StyleAnimatedNode would never get applied. We were also potentially duplicating color parsing support, which is already centralized in `normalizeColor` / `processColor`.
Changelog: [Android][Added] Enable AnimatedInterpolation to interpolate arbitrary color types.
Reviewed By: mdvacca
Differential Revision: D40571873
fbshipit-source-id: 41857ab0391279c5307bc31b855ea8fbcb4cccd8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35506
In our build we had a mixture of `_` and `-` to separate targets.
Dashes don't play well with Gradle + as we expose them now via Prefab,
let's stick to use only underscores
Changelog:
[Internal] [Changed] - Rename target to don't use dashes
Reviewed By: cipolleschi
Differential Revision: D41578938
fbshipit-source-id: 8aa44aa2dc7bf4822b45e5044532837b989817d2
Summary:
Noticed that we weren't receiving pointer events for nested Text spans when the new pointer events implementation was enabled.
Changelog: [Internal]
Reviewed By: lunaleaps
Differential Revision: D41496672
fbshipit-source-id: 9d0ed83d1bb5f42211ec655328035651f25fa471
Summary:
These experiments have been removed already, but we still have references to them in C++.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D41549465
fbshipit-source-id: 1158fb391b4279ef4eb6ad7123cb8113d7ecccef
Summary: Changelog: [Internal] - Internal usage broke existing behavior, reverting to check if a flag is set.
Reviewed By: javache
Differential Revision: D41502122
fbshipit-source-id: 296bb1578cd63f935e4111bfec8d58f965149640
Summary:
This is the last library that we should expose via Prefab.
Thanks to cipolleschi 's work here moving the file to `/ReactCommon/jsc` folder
we can easily expose it to be consumed by third parties.
Changelog:
[Internal] [Changed] - Expose `jscruntime` to be consumed via Prefab
Reviewed By: cipolleschi
Differential Revision: D41534564
fbshipit-source-id: fb4b2d801def8caf71638dcb74eb87f8230984d4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35482
This change moves the JSCRuntime.h/cpp into a `jsc` folder.
This change is required for several reasons:
1. on iOS, the new `jsi`, `jsidynamic` and `jsc` setup is breaking the `use_frameworks!` with `:linkage => :static` option with the old architecture. So it is a regression.
2. JSCRuntime is required by some libraries and needs to be exposed as a prefab and the current setup makes it hard to achieve.
allow-large-files
## Changelog:
[General][Changed] - Move JSCRuntime into a separate pod/prefab
Reviewed By: cortinico
Differential Revision: D41533778
fbshipit-source-id: 642240c93a6c124280430d4f196049cb67cb130b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35436
Using std::optional as react-native has been using C++17 for quite some time
changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D41415031
fbshipit-source-id: d786647f64b4f90cf75409109830ae0885460c17
Summary:
We have two warnings on MapBuffer which I'd like to resolve as they show up on console every time.
1. We're using a deprecated method receiveCommand, which is actually legit but was missing a propagation of the warning. I'm adding it.
2. We had a null check that that was always not null. That is enforced by the Kotlin type system. I've checked the code and
we're actually always returning non-nulls there or raising exceptions instead.
Changelog:
[Internal] [Changed] - Fix compilation warnings for MapBuffer
Reviewed By: javache
Differential Revision: D41522129
fbshipit-source-id: c2dbb660f95a2ff7dac6e4fcdf476e4058cf730e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35461
This is another library which is adding prefab support as it's needed by
Expo libraries and Reanimated.
Changelog:
[Internal] [Changed] - Allow `reactnativejni` to be consumed via prefab
Reviewed By: cipolleschi
Differential Revision: D41520801
fbshipit-source-id: 91142a5b5051cfba478d93a2475a178eed6fbb29
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35460
Reanimated reported that `react_nativemodule_core` was missing some headers.
Specifically the one from ReactAndroid::react_debug, ReactAndroid::react_render_core, ReactAndroid::glog,
and ReactAndroid::react_render_debug.
I'm adding them here so they get included in the shipped headers for `react_nativemodule_core`
Changelog:
[Internal] [Changed] - Add missing headers to `react_nativemodule_core` prefab module
Reviewed By: cipolleschi
Differential Revision: D41520751
fbshipit-source-id: 4627a2d0f880d4bb3ff2f0e43cd735cf9a3f2f9a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35458
We're adding prefab support for those modules as they're needed by Reanimated
and we're exposing headers for them as well.
Changelog:
[Internal] [Changed] - Add prefab for _uimanager _scheduler and _mounting
Reviewed By: cipolleschi
Differential Revision: D41520606
fbshipit-source-id: 76f3c81705e99057b92cd9b86d0601a2b1410f95