Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50669
Fixes a bug that was introduced while migrating from Java to Kotlin.
Changelog:
[Android][Changed] - Fixed a bug with synchronously fetching resources from Metro.
Reviewed By: cortinico, mdvacca
Differential Revision: D72878362
fbshipit-source-id: feb881fa51f6eaa2cb5c7ba87ac93b7fdc29dc2c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50636
A while ago someone on GitHub reported that box shadow on iOS was causing frame drops when animating a large, pretty blurry shadow: https://github.com/facebook/react-native/issues/49128. This week I finally got around to fixing this!
The slowness was happening since we were using CG to draw this shadow, which is very CPU intensive and, to my knowledge, does not take advantage of GPUs to do anything. Couple that with an animating, large, blurry shadow and we have frame issues. These shadows were taking very long to draw, to get the image of the shadow (which then needs to be copied into some texture 3 times as big, composited, put on the screen etc) took 12-14ms :o, thats very slow.
To fix this I figured out how to get CA's shadow APIs working, which take advantage of the GPU. The enable inset shadows and spread you have to get creative with a mix of `shadowPath` and `mask` with a `CAShapeLayer`, but we got it done! Things are much faster, I am not sure how to time this but using a real device shows no frame drops :D
Changelog: [iOS][Fixed] - Box shadows on iOS are faster
Reviewed By: lenaic
Differential Revision: D72823334
fbshipit-source-id: 460339c9d77e7423ce59a1a9178b6b3ad527e4b0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50665
Changelog: [internal]
Just a stylistic change of the link back to the documentation home.
It also changes the link in the template to make sure it's incorrect so people are forced to edit it when creating new docs.
Reviewed By: lenaic
Differential Revision: D72866823
fbshipit-source-id: fa7be286f996049b3f06e2defa5a8c486d63091b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50663
Changelog: [internal]
Adds additional documentation about pragmas and feature flags for Fantom.
Changes the diagram to mention that feature flags are passed to the Fantom CLI.
Reviewed By: andrewdacenko
Differential Revision: D72865960
fbshipit-source-id: abfd167279195495064f3c4dbdcaff92dd865bcf
Summary:
This PR introduces a rewrite of `DynamicFromMap.java` to Kotlin as requested in https://github.com/facebook/react-native/issues/50513.
## Changelog:
[ANDROID] [CHANGED] - Migrated `DynamicFromMap.java` to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50597
Test Plan:
1. Implement unit tests for `DynamicFromMap.kt` - `DynamicFromMapTests.kt`
2. Ensure the tests pass: `./gradlew test`
3. Run the RN tester app on new & on old architectures
Reviewed By: javache, rshest
Differential Revision: D72853616
Pulled By: cortinico
fbshipit-source-id: 855acdc7fa7810ab9f223b0be7778c028a646de5
Summary:
Backing out https://github.com/facebook/react-native/pull/50244 as it is causing unexpected issues internally.
## Changelog:
[iOS][Changed] - Revert "Add warning when a component is loaded with the interop layer"
Reviewed By: cortinico
Differential Revision: D72857290
fbshipit-source-id: cfae6ccf85a472ae03983349fc7a2620e157865d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50658
The root cause of this is D67857739, confirmed via bisect.
The ReactInstanceIntegrationTest.cpp tests caused some sort of state poisoning. Because of that all tests in the same buck module that ran after, failed. These cpp tests have a retry mechanism where failing tests are retried, and because in that situation the integration tests didn't run, they passed there.
This turned into a total of 24 tests being 50% flaky, as every first attempt failed but every second attempt (in isolation) succeeded.
I did a bit of trial and error with resetting InspectorFlags and ReactNativeFeatureFlags (the latter was already being done before D67857739), and added an extra assertion to the tests to make sure that after that, `dangerouslyDisableFuseboxForTest` still worked in the right (but only the right) contexts.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D72860850
fbshipit-source-id: 959e67ff7a43ccc3c35db108bdb1138d8c27d328
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50660
Changelog: [internal]
This is just a simpler way to test for changes in scroll position.
Reviewed By: andrewdacenko
Differential Revision: D72860138
fbshipit-source-id: a92d430399255a278f5c3c72005a5288d28310ab
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50644
Changelog: [internal]
This improves the documentation for the feature flag system by extending information about 2 areas:
- Codegen
- `print` command in CLI
Reviewed By: lenaic
Differential Revision: D72852768
fbshipit-source-id: 97932ea078595ef54cd437a433072f83bbdff609
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50654
We realized that when calling
```
npx react-native-community/cli codegen --path . --platform all --outputPath /tmp/codegen
```
We were generating in the android folder some files that are Apple-specific.
With this change, we should stop generating the Apple specific files in Android.
## Changelog
[General][Fixed] - Do not generate Apple specific files for Android
Reviewed By: cortinico
Differential Revision: D72859336
fbshipit-source-id: 443c4dca032e8e68c1da9d829d361d5e0ed007a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49887
## Changelog:
[Internal] -
As in the title.
This was the last Java file in the `events-common` module, so now it can be a pure Kotlin one.
NOTE: I opted to make the base method `Event.getEventData` public (instead of previously protected), as based on the usage patterns by the users this seems to make the most sense in this context.
Reviewed By: cortinico
Differential Revision: D70777597
fbshipit-source-id: fdaa52e4400ad8e86a8711daf359eb5a10974d05
Summary:
Static code analysis shows that there are a lot of unresolved KDoc references. This is just another round addressing several of them.
## Changelog:
[INTERNAL] - Fix unresolved KDoc references
Pull Request resolved: https://github.com/facebook/react-native/pull/50640
Test Plan: Verify that the comments link the classes correctly using Android Studio
Reviewed By: cortinico
Differential Revision: D72848152
Pulled By: javache
fbshipit-source-id: e09b1ddad494885ef3090d7f0f62a782eed922c1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50632
Changelog: [internal]
This cleans up the `fixMountingCoordinatorReportedPendingTransactionsOnAndroid` feature flag that is no longer necessary.
Reviewed By: javache
Differential Revision: D72561255
fbshipit-source-id: 0942122832ce40cacc273265e4c95b5fe251dbe6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50643
Changelog: [internal]
Just realized this was missing from the message.
Reviewed By: lenaic
Differential Revision: D72852138
fbshipit-source-id: 27ed4b6e6d8b370cfa34a9878ca9bb0815cb75eb
Summary:
This code is not referenced internally or externally and was part of the DevSplitBundleLoader which was removed in D43597007.
Changelog: [Android][Breaking][Removed] Removed loadSplitBundleFromServer from DevSupportManager interface
Reviewed By: cortinico
Differential Revision: D72790533
fbshipit-source-id: 9e0960af4c528d9019943c89466ab442f34619e1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50545
All usages of Task.call involve a Runnable which returns another Task, which we then extract using `.continueWithTask(Task::getResult)`. Instead inline this behaviour inside `Task.call` to avoid allocation of unnecessary intermediate objects.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D72600051
fbshipit-source-id: 7e7c0c8e1de24b1aeff7addab2eb10272bc73ddb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50546
We do not use this mechanism for exception handing with Tasks, so remove it.
Changelog: [Internal]
Reviewed By: cortinico, fabriziocucci
Differential Revision: D72600053
fbshipit-source-id: f9ae877b05ece66682cb6c291b05257953f5aebb
Summary:
PR is here https://github.com/facebook/react-native/pull/50581
This enables INTERPROCEDURAL_OPTIMIZATION for Hermes in OSS, similar to how we did for libreactnative.so
I also had to bump CMake to 3.30.x to unblock the build failure with `-fuse-ld=gold`
Changelog:
[Internal] [Changed] -
Reviewed By: alanleedev
Differential Revision: D72696879
fbshipit-source-id: e842f6cdf41f6936ef4baeb70e4833a1a0c2d19b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50635
Ships the feature flag introduced by https://github.com/facebook/react-native/pull/50002.
Changelog:
[General][Changed] - Animated components' `ref` will now only reattach when receiving new props if the new props contain different `AnimatedValue` or `AnimatedEvent` instances. (Previously, Animated components' `ref` would always reattach when receiving new props.)
Differential Revision: D72802613
fbshipit-source-id: 4495eb778e3bb9473172c393bd984d93c4ba5f00
Summary:
Deleting ChoreographerCompat as its only method is deprecated and it's unused.
Use Choreographer.FrameCallback instead
changelog: [Android][Breaking] Deleting ChoreographerCompat, Use Choreographer.FrameCallback instead
Reviewed By: alanleedev
Differential Revision: D72817152
fbshipit-source-id: 08624dd07e916116381293cde57a0fdf5452a670
Summary:
ReactModuleWithSpec is deprecated and unused, it was replaced by TurboModule interface.
In this diff I'm removing DoNotStripAny annotation from ReactModuleWithSpec to make sure proguard doesn't retain any reference to it
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D72090838
fbshipit-source-id: 44aa0d6d4b2b592b5b8fea1b9e4578e2df3a9a8e
Summary:
InvalidIteratorException is not used in java, kotlin nor C++. This diff just removes this class
This is not a breaking change due to the lack of usages
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D72090837
fbshipit-source-id: 75aa4a8d2c1abbeb32bd38e5e60cbf7f04be823e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50605
In order to help Proguard to stripping-out bytecode, we need a way to statically enable all Feature Flags used by the New Architecture at build time (e.g. enableBridgelessArchitecture, useTurboModule, etc). The React Native Feature Flag system is mostly implemented in C++ and unfortunately Proguard can’t follow C++ code to understand what feature flags are enabled or disabled at build time.
After analyzing several proposals, we decided to introduce a new internal API called ReactNativeNewArchitectureFeatureFlags, this API will help us detect if an app is using the new architecture at build time.
In order to make this API to work I’ve migrated all usages of new architecture feature flags from ReactNativeFeatureFlags -> ReactNativeNewArchitectureFeatureFlags
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D71988912
fbshipit-source-id: a6d58c5b1f39f85370298a347db228e933c6c743
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50604
ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE asume Fabric and TurboModule interops are disabled, in this diff I'm adding an assertion to validate this at runtime
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D71854550
fbshipit-source-id: a4b3acfe4c3227115300b100be4d6222d5eace8e
Summary:
FrameworkAPI classes are not part of the public API, this diff will remove all FrameworkAPI classes from our public API tracking
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D72805466
fbshipit-source-id: b16791ab854017be681ceabd61b628d2d0ba0c5c