Commit Graph
29792 Commits
Author SHA1 Message Date
Samuel SuslaandFacebook GitHub Bot 81e368e1d3 introduce ShadowNode::IdentityTrait (#41603)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41603

changelog: [internal]

`ShadowNode::IdentityTrait` was already a thing. Let's make it available in ConcreteComponentDescriptor.

Reviewed By: rshest

Differential Revision: D51471666

fbshipit-source-id: 7919a9b7238d766ee3913a5ab239bf254fab0996
2023-11-22 04:33:02 -08:00
Samuel SuslaandFacebook GitHub Bot 91d4b1bd80 pass RawProps by rvalue (#41604)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41604

changelog: [internal]

Remove const requirement when using RawProps and prefer passing it by rvalue.

Reviewed By: javache

Differential Revision: D51471667

fbshipit-source-id: 479bcebe642e168ff1f110e7b2bfaf20a3e82821
2023-11-22 04:33:02 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 951efc8ce2 Remove some usages of RCT_NEW_ARCH_ENABLED (#41589)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41589

This is a cleanup diffs that removes some of the usages of RCT_NEW_ARCH_ENABLED.
Now that we are shipping all the pods, there is no need to conditionally compile-out part of the codebase depending on whether the new architecture is running or not.

This change will not alter the behavior of the app.

## Changelog:
[iOS][Breaking] - Remove some usages of RCT_NEW_ARCH_ENABLED. The change should be transparent BUT some **Swift** libraries might get broken by this change.

Reviewed By: dmytrorykun

Differential Revision: D51498730

fbshipit-source-id: c83416480eea1f7bbc55f72c31e7b69ad0e9e01a
2023-11-22 03:50:29 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 6b5320540a Always install all the pods (#41588)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41588

This change always installs all the Pods for both architecture.
This unify the behavior between iOS and Android.

## Changelog:
[Internal] - Always install all the pods

## Facebook:
The inly four pods that are changed when flipping between the new and the old arch with RNTester are:
- MyNativeView
- NativeCxxModuleExample
- React-RCTAppDelegate
- ScreenshotManager
The only change there is the RCt_NEW_ARCH_ENABLED flag being set or not in those pods

Reviewed By: dmytrorykun

Differential Revision: D51494498

fbshipit-source-id: 4cafdef4a4c2b86381067373aed27ed18524e4be
2023-11-22 03:50:29 -08:00
Riccardo CipolleschiandFacebook GitHub Bot a6076924bf Remove unused flag in Old Architecture codegen (#41579)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41579

This change remove a flag that is unused.

## Changelog
[Internal] - Remove unused Flag

Reviewed By: dmytrorykun

Differential Revision: D51493765

fbshipit-source-id: f8cbce991d80d4f51363cdd4f379e6b214b2b2df
2023-11-22 03:50:29 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 13d08f146b Remove RN_FABRIC_ENABLED flag (#41561)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41561

The RN_FABRIC_ENABLED has been deprecated and superseded by the RCT_NEW_ARCH_ENABLED for a while now.

This change removes it, from the codebase as now we always have the Fabric pod available to the codebase.

## Changelog
[Internal] - Remove RN_FABRIC_ENABLED flag

Reviewed By: dmytrorykun

Differential Revision: D51468332

fbshipit-source-id: 6b2fc554e6bf5ac748b9e45d7c14f9ba9b57820c
2023-11-22 03:50:29 -08:00
Nicola CortiandFacebook GitHub Bot 0cbd2a345d Update Element Inspector string to "Toggle" (#41595)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41595

Instead of having to select between Enable/Hide the Element Inspector String, let's just use "Toggle".

Changelog:
[Internal] [Changed] - Update Element Inspector string to "Toggle"

Reviewed By: cipolleschi

Differential Revision: D51503403

fbshipit-source-id: 2ad24df8324eb789b0016fe7ac5d439cba6f5952
2023-11-22 03:37:13 -08:00
Dark KnightandFacebook GitHub Bot 2a4338d091 Revert D51346658: Multisect successfully blamed "D51346658: [RN][Android] Handle all incoming Inspector messages on main thread, downgrade some errors to logs" for otest failure
Summary:
This diff is reverting D51346658
D51346658: [RN][Android] Handle all incoming Inspector messages on main thread, downgrade some errors to logs by motiz88 has been identified to be causing the following test failure:

Tests affected:
- [xplat/endtoend/jest-e2e/apps/facebook_xplat/ReactNativeTTRCTester/__tests__/ReactNativeTTRCTester-storeOrNetworkWithoutCachedContent-android-e2e.js](https://www.internalfb.com/intern/test/281475019301167/)

Here's the Multisect link:
https://www.internalfb.com/multisect/3539088
Here are the tasks that are relevant to this breakage:

We're generating a revert to back out the changes in this diff, please note the backout may land if someone accepts it.

If you believe this diff has been generated in error you may Commandeer and Abandon it.

bypass-github-export-checks

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D51512872

fbshipit-source-id: 8bc8e12b651f91a6f74243a0a85fca7fd1953bdb
2023-11-21 23:48:48 -08:00
Nick GerlemanandFacebook GitHub Bot 08f89eb2ae Remove yoga::Style::Edges usage in AndroidTextInputComponentDescriptor (#41598)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41598

This code merges native, Android provided theme text input padding, with Yoga style. We are removing operations on all edges as aggregate, so this replaces that.

This was previously part of D50998164

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D51503493

fbshipit-source-id: c6e2f3183a05861745fdd8f044d12e3dd8205804
2023-11-21 23:17:32 -08:00
Nick GerlemanandFacebook GitHub Bot c4519a01ac Remove composite border comparisons (#41568)
Summary:
X-link: https://github.com/facebook/yoga/pull/1475

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

Removes cases where we rely on comparing composite of Yoga edges, since we are removing that internal API (public API is already one at a time). Extracted from D50998164, with more sound facility for looping through edges.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D51478403

fbshipit-source-id: 162170b91345ff86db44a49a04a2345f0fbd0911
2023-11-21 23:17:32 -08:00
Pieter De BaetsandFacebook GitHub Bot bf4e229668 Clear mLastQueriedSurfaceMountingManager on stopSurface (#41590)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41590

Causing a small leak while we wait for the surface to be fully destroyed.

Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D51499256

fbshipit-source-id: 8f9e65898dcb9e0261502028874378ec9cc0f3fc
2023-11-21 13:44:18 -08:00
Kevin GozaliandFacebook GitHub Bot c497fc61b5 RNTester iOS: setup Meta internal app init logic (#41591)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41591

For internal build integration, invoke Meta internal app setup logic. This has no effect in OSS.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D51498070

fbshipit-source-id: 48658d2c3136023d80fbd9a2fdc29996616e1eee
2023-11-21 13:43:16 -08:00
Samuel SuslaandFacebook GitHub Bot 0d715cd016 add unit tests for EventTarget (#41596)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41596

changelog: [internal]

Reviewed By: rshest

Differential Revision: D51499449

fbshipit-source-id: 782108edf24af1c91d77c664bc496b466995621e
2023-11-21 13:31:50 -08:00
Arushi KesarwaniandFacebook GitHub Bot a6964b3629 Fix ReactNativeHost to have default UIManagerProvider as null (#41593)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41593

Fixing fallback to `getJSIModule()` by defaulting `getUIManagerProvider()` correctly to null

Reviewed By: christophpurrer

Differential Revision: D51500901

fbshipit-source-id: 91b692e6c88d736970b652179e14bc524a411d0e
2023-11-21 11:27:26 -08:00
Ruslan ShestopalyukandFacebook GitHub Bot ac1cdaa716 Make ImageManager implementation overridable (#41582)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41582

# Changelog:

This will allow to have custom `ImageManager` implementations on new platforms.

Reviewed By: christophpurrer

Differential Revision: D51495143

fbshipit-source-id: bbd03bdad1b87fd53e70a886f1fdc74f371987c8
2023-11-21 10:51:40 -08:00
Samuel SuslaandFacebook GitHub Bot 1e43d2b9bd remove unused argument from RawProps (#41565)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41565

changelog: [internal]

this argument is never used, let's remove it.

Reviewed By: christophpurrer

Differential Revision: D51468580

fbshipit-source-id: aec029bc78b5490686a36ac8a5f5d0342bd28d50
2023-11-21 10:37:54 -08:00
Moti ZilbermanandFacebook GitHub Bot 16ad818d21 Handle all incoming Inspector messages on main thread, downgrade some errors to logs
Summary:
Changelog: [Internal]

* Updates `InspectorPackagerConnection.java`, `DevServerHelper.java` and `DevSupportManagerBase.java` to perform all connection management and message dispatching for the inspector socket on the main thread. This is in support of a new CDP implementation in React Native that will strictly assume it's called on the main thread (thus avoiding the need for explicit locking in many places).
* Downgrades JSON parsing errors and duplicate connection errors from exceptions to logs, matching the [iOS implementation](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Inspector/RCTInspectorPackagerConnection.m).

Reviewed By: javache

Differential Revision: D51346658

fbshipit-source-id: 3d0d5588a824c1b28da5499ef9d040998a941288
2023-11-21 09:56:55 -08:00
Ruslan ShestopalyukandFacebook GitHub Bot 7625a50296 Share ImageRequest implementation across the platforms (#41581)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41581

# Changelog:

There was nothing platform-specific in `ImageRequest` implementation, defined on iOS, so might as well share across platforms.

Reviewed By: christophpurrer

Differential Revision: D51495144

fbshipit-source-id: ef15c5c8c6b07c1a87ca83eb15b5997ba703fbcc
2023-11-21 09:08:10 -08:00
Nick GerlemanandFacebook GitHub Bot d9d81a755e Terminate on logic error in createNode HostFunction (#41567)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41567

Sometimes `createNode` calls into is throwing `std::out_of_range_error` or `std::length_error` in response to both vector and string operations.

Instead of propagating `std::logic_error`, which indicates a defect in native code, terminate, so we can get an actionable native stack trace.

`createNode` and `cloneNode` also both ocasionally see `bad_alloc`, but this is not usually an instance of a defect at the allocation-site, and throwing would be more graceful.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D51463600

fbshipit-source-id: 870cbf3538d8ccbc01ded2868781a63ba12a941c
2023-11-21 09:03:51 -08:00
Christoph PurrerandFacebook GitHub Bot 99d407da46 ios|android textInput > Remove #ifdef ANDROID when not needed (#41569)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41569

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D51479729

fbshipit-source-id: 0dd78e568b98c93446a59e5f1242d26a24d9fff2
2023-11-21 08:07:37 -08:00
Moti ZilbermanandFacebook GitHub Bot b58cba7ef2 Rename JSEngineInstance -> JSRuntimeFactory (#41548)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41548

`JSEngineInstance` is a misnomer - this interface actually creates `jsi::Runtime`s and doesn't represent an "instance of a JS engine". This diff renames it to `JSRuntimeFactory`.

Changelog: [Internal]

Reviewed By: huntie, arushikesarwani94

Differential Revision: D51447882

fbshipit-source-id: e118fe5c202607500a62d8e15afec088c4946969
2023-11-21 07:06:22 -08:00
Ruslan ShestopalyukandFacebook GitHub Bot ce0dabddf3 Extract ImageSize type from NativeImageLoader interface (re-submit) (#41577)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41577

# Changelog:
[Internal]-

The change is equivalent in terms of API, however this makes it work nicer with C++ codegen and easier to use with a pure C++ implementation of the native module.

Reviewed By: GijsWeterings

Differential Revision: D51493466

fbshipit-source-id: bf9105670ae56a191ab2e6c8cfb794c2fecd4809
2023-11-21 05:14:14 -08:00
Dmitry RykunandFacebook GitHub Bot 33a44e68fc Refactor generate-artifacts-executor.js: delete configFilename and configKey arguments (#41533)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41533

This diff removes `configFilename` and `configKey` arguments from iOS codegen CLI. Now we always expect them to be `package.json` and `codegenConfig` respectively.

## Motivation

The existing implementation expects every library to have its codegen config in a file with `configFilename` name. `configFilename` is passed as a single CLI argument and applied to every app dependency. I.e. if `configFilename = codegen.config.json` then we expect to find this file in *every* third-party library. That is weird expectation. This customisation option is unsound. Same with `configKey`. It is much simpler to just stick with convention that `configFilename = "package.json"` and `configKey = "codegenConfig"`.

Changelog: [General][Breaking] - Delete `configFilename` and `configKey` arguments from iOS codegen CLI. Now we always expect them to be `package.json` and `codegenConfig` respectively.

Reviewed By: cipolleschi

Differential Revision: D51256486

fbshipit-source-id: fe190b514be7c4e489c7be01294958cf3254602a
2023-11-21 03:53:33 -08:00
Dmitry RykunandFacebook GitHub Bot d1e03f5606 Refactor generate-artifacts-executor.js: return libraries array instead of using an inout argument (#41531)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41531

This diff converts in-out `libraries` argument of codegen library lookup functions to a normal return value. This makes these functions simpler to reason about, and simplifies subsequent refactors.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D51111416

fbshipit-source-id: 12b5dda4d326e3f1c866c16f7bcd17080be54b58
2023-11-21 03:12:08 -08:00
Moti ZilbermanandFacebook GitHub Bot a1b67f955e Handle all incoming Inspector messages on main thread (#41503)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41503

Changelog: [Internal]

Updates RCTInspectorPackagerConnection to dispatch all messages on the main thread (which is SocketRocket's default behaviour). This is in support of a new CDP implementation in React Native that will strictly assume it's called on the main thread (thus avoiding the need for explicit locking in many places).

Reviewed By: javache

Differential Revision: D51346659

fbshipit-source-id: c529b0aea97f7732cea58a4dc66993c5c8259958
2023-11-20 21:56:41 -08:00
Ruslan ShestopalyukandFacebook GitHub Bot 781b637db4 Do not filter out Image.source prop when sending it C++ on New Architecture on Android (#41570)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41570

## Changelog:
[Internal] -

This fixes a subtle problem whereas an update to `Image.source` (or `Image.src`) prop on JS side may not end up getting propagated to the C++ side, with New Architecture.

As the result, this can lead to some weird corner cases, whereas e.g. layout doesn't update after the image's size changes.

Differential Revision: D51479305

fbshipit-source-id: 72afb7dfd0ba32f96af4f9a6564b3b8121a597c7
2023-11-20 18:10:55 -08:00
Ramanpreet NaraandFacebook GitHub Bot 3f12c45f65 Fix CircleCI failure with cxxreactpackage (#41571)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41571

The original diff:  D51166523

## The Failure
https://app.circleci.com/pipelines/github/facebook/react-native/36821/workflows/7e360d9d-0a8e-4bf9-87d8-91c4cf3db3ca/jobs/1221118

```
CMake Error at CMakeLists.txt:28 (add_subdirectory):
    The source directory

      /root/react-native/packages/react-native/ReactAndroid/src/main/jni/react/runtime/cxxreactpackage

    does not contain a CMakeLists.txt file.
```

## The Fix
Rename CMakeList.txt to CMakeList*s*.txt

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D51481098

fbshipit-source-id: 32d71f3fdfe0c473f9b30a278603cf1153cd1df8
2023-11-20 17:33:28 -08:00
Christoph PurrerandFacebook GitHub Bot e364553492 RNTester-ios / RCTAppDelegate > correctly check for USE_HERMES Flag (#41573)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41573

Changelog: [iOS][Fixed] RNTester-ios / RCTAppDelegate > correctly check for USE_HERMES Flag

On iOS we check for ENV flags if Hermes should be used:
- https://github.com/facebook/react-native/blob/b4d4aef057ebf90176287f22d72b4b3b8b280c9a/packages/react-native/React-Core.podspec#L24
- https://github.com/facebook/react-native/blob/b4d4aef057ebf90176287f22d72b4b3b8b280c9a/packages/react-native/React/React-RCTFabric.podspec#L90

and add necessary C++ packages based on that flag.

In code we do check for those imports
https://github.com/facebook/react-native/blob/b4d4aef057ebf90176287f22d72b4b3b8b280c9a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h#L16-L27

and decided if we should use Hermes or not.

However the .mm check is faulty and does not check for the `RCT_USE_HERMES` flag set in code.

Reviewed By: fkgozali

Differential Revision: D51483740

fbshipit-source-id: 428c27aae80fe6f9799cf6ae21a5d3801fe6ca11
2023-11-20 16:25:46 -08:00
Nick GerlemanandFacebook GitHub Bot b4d4aef057 Fix modulemap typo (#41564)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41564

X-link: https://github.com/facebook/yoga/pull/1474

Fixes https://github.com/facebook/yoga/issues/1468

We build with Swift, but don't build something consuming Yoga module, and don't use modulemap and CocoaPods. This is a gap in validation we should figure out, but in the meantime, we should fix the typo.

Reviewed By: christophpurrer

Differential Revision: D51472493

fbshipit-source-id: 60e05cc49969f51d5fc4856cf25ce2afede72f36
2023-11-20 14:10:56 -08:00
Kevin GozaliandFacebook GitHub Bot c7bd397dac RNTester iOS: require arm64 device capabilities (#41551)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41551

We have since targeted iOS min SDK 13.4, it's time to move to `arm64`.

Reference: https://developer.apple.com/documentation/bundleresources/information_property_list/uirequireddevicecapabilities?language=objc

Changelog: [iOS][Fixed] Move UIRequiredDeviceCapabilities for RNTester to arm64

Reviewed By: cipolleschi

Differential Revision: D51461103

fbshipit-source-id: 726ca1f37d249092e8f10c2043d0b696bf64aa7d
2023-11-20 14:02:00 -08:00
Pieter De BaetsandFacebook GitHub Bot 228193dad5 Do not suppress IllegalArgumentExceptions during TurboModule creation (#41509)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41509

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165

fbshipit-source-id: 1eea1db6c7e3313a36d24e7837b36a3d0fccc718
2023-11-20 13:01:04 -08:00
Arushi KesarwaniandFacebook GitHub Bot e8323781fa Fix ReactInstanceManager to add getJSIModule() as an alternate path (#41495)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41495

Fix ReactInstanceManager for adding the callsite of `getJSIModule()` as an alternate path to new way of Fabric initialization in order to make Catalyst and RN-Tester work with the changes for Fabric initialization

Reviewed By: javache

Differential Revision: D51338036

fbshipit-source-id: 49badac52f1032f1032a989b76dd422e3cf7582f
2023-11-20 10:26:27 -08:00
Dmitry RykunandFacebook GitHub Bot 6321371212 Refactor generate-artifacts-executor.js: various cleanups (#41528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41528

This diff makes some minor cleanups in `generate-artifacts-executor.js`. Specifically:
1. remove unused argument `iosOutputDir`
2. remove unused `libraryConfig.library` property
3. Fix typo in `handleReactNativeCo`**r**`eLibraries` function name

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D51115394

fbshipit-source-id: 8ee9b5f35cf254510714a023dab32077c700e061
2023-11-20 07:30:55 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 0056fc89ff Cleanup fabricEnabled callsites (#41556)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41556

Followup after [#41500](https://github.com/facebook/react-native/pull/41500) to cleanup some callsites that does not need the flag anymore.

## Changelog
[Internal] - Callsite cleanup

Reviewed By: dmytrorykun

Differential Revision: D51465124

fbshipit-source-id: 61c0ac047f6eeb528f9a8aafd6d3f339c0399be9
2023-11-20 06:41:25 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot e2d708875c fix: typo in cli.js (#41523)
Summary:
This PR fixes a typo in `cli.js`.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[INTERNAL] [FIXED] - typo in react-native/cli.js

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

Test Plan: Not needed

Reviewed By: christophpurrer

Differential Revision: D51452866

Pulled By: arushikesarwani94

fbshipit-source-id: 61f1da70621bfe1a159ec63da0014141b182c5ac
2023-11-19 22:46:36 -08:00
Ramanpreet NaraandFacebook GitHub Bot 9fd1c6872f Integrate default tmm delegate with CxxReactPackage (#41464)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41464

Now, DefaultTurboModuleManagerDelegate can be created with a CxxReactPackage.

If it exists, DefaultTurobModuleManager will use the CxxReactPackage to create C++-only turbo modules.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D51166524

fbshipit-source-id: 2fdc404e79213d685c4f41b2a152b68226bb71b2
2023-11-19 18:46:12 -08:00
Ramanpreet NaraandFacebook GitHub Bot a2558d15ab Introduce CxxReactPackage
Summary:
CxxReactPackage is supposed to be the way apps register C++-only turbo modules with React Native.

Applications are meant to subclass this jni::HybridObject.

Since this is a jni::HybridObject, applications are meant to create this CxxReactPackage in java, and initialize it with java dependencies.

React Native will reach into its c++ part, and use it create C++-only turbo modules.

NOTE: This is a **temporary** abstraction meant to unblock the stable API effort of removing the turbomodulemanagerdelegate builder from ReactHostDelegate:

https://www.internalfb.com/code/fbsource/[e7efced3018f6178b7187a2358f3b76d40e2b43c]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostDelegate.kt?lines=50-51

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D51166523

fbshipit-source-id: 51a22411239fbba32f3a70cc363e59947c2782dc
2023-11-19 18:46:12 -08:00
Ramanpreet NaraandFacebook GitHub Bot 1394cf7da7 Make default classes load their own so's (#41467)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41467

Make the DefaultTurboModuleManagerDelegate and the DefaultComponentRegistry load their own so's when they're created.

**Motivation:** We are going to use these two classes in Meta apps. And Meta apps will not invoke DefaultNewArchitectureEntryPoint.load.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D51036133

fbshipit-source-id: 5ebd4d3b85f435229c9b5950493310aa7fa36ba0
2023-11-19 18:46:12 -08:00
Ramanpreet NaraandFacebook GitHub Bot 66051047e0 Make default tmm delegate provide eager initialized module names (#41544)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41544

## Change
Extend DefaultTurboModuleManagerDelegate's API so that it specify which modules should be eagerly initialized.

## Rationale
This information was originally stored on the module's ReactModuleInfo object.

But, we're running an experiment (i.e: lazy mode) that gets rid of the ReactModuleInfo object. See D51093697 for more details.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D51307434

fbshipit-source-id: 6d867436588de2f9b8dd084327e74bd51ed61a2d
2023-11-19 18:46:12 -08:00
Ramanpreet NaraandFacebook GitHub Bot 90b2c3fe43 Merge ReactModuleInfo removal logic into core (#41468)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41468

Currently ReactPackageTurboModuleManagerDelegate uses ReactModuleInfos to create turbo modules. We want to see if it's possible to remove ReactModuleInfo from React Native's public API.

Therefore, we are forking the implementation of each each method inside ReactPackageTurboModuleManagerDelegate:
- **lazy mode:** doesn't use ReactModuleInfo
- **control:** uses ReactModuleInfo

This optimization was previosuly implemented outside of ReactPackageTurboModuleManagerDelegate. But, to simplify things, we are just pulling it inside the ReactPackageTurboModuleManagerDelegate.

Changelog: [Internal]

Reviewed By: philIip, mdvacca

Differential Revision: D51093697

fbshipit-source-id: 6eb11020e0bf87eb704b35b990a0f14f157eea66
2023-11-19 18:46:12 -08:00
Phillip PanandFacebook GitHub Bot 9b1f8a81e9 hook up RCTDeprecation to [RCTBridgeModule bridge] (#41415)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41415

Changelog: [iOS][Deprecated]

an example of RCT_DEPRECATION in action. you will get a build time warning if `RCT_DEPRECATED_DECLARATIONS` is enabled.

Reviewed By: cipolleschi

Differential Revision: D51184572

fbshipit-source-id: a0bcb4c69e63620bbdf2e2a7afb25c649fcaa100
2023-11-18 22:13:40 -08:00
Phillip PanandFacebook GitHub Bot e7500df57a RCTDeprecation cocoapods integration (#41416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41416

Changelog: [Internal]

cocoapods boilerplate to integrate the first RCTFoundation library. decided to split this up so we can reference it easily in the future when adding new libs

Reviewed By: cipolleschi

Differential Revision: D51184321

fbshipit-source-id: 28696f0a8e43e0bcd24a37956823fb544ecd84be
2023-11-18 22:13:40 -08:00
Phillip PanandFacebook GitHub Bot c06beaeed1 RCTDeprecation BUCK integration (#41417)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41417

Changelog: [Internal]

BUCK boilerplate to integrate the first RCTFoundation library. decided to split this up so we can reference it easily in the future when adding new libs

Reviewed By: cipolleschi

Differential Revision: D51101009

fbshipit-source-id: fe828b64c7fd939f8576a496478b6a401bfae69c
2023-11-18 22:13:40 -08:00
Phillip PanandFacebook GitHub Bot e9ecc65652 introduce RCTFoundation (#41418)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41418

Changelog: [iOS][Added]

creating a top level directory for shared lightweight utility functions

open to suggs on naming and rules we want to enforce

Reviewed By: shwanton, christophpurrer

Differential Revision: D51170983

fbshipit-source-id: 8bc0a193b486f5a0653ad58d92a034cacede2d61
2023-11-18 22:13:40 -08:00
Phillip PanandFacebook GitHub Bot 9af8f78d3b introduce ReactApple (#41419)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41419

Changelog: [iOS][something]

Creating a new top level directory for Apple platform specific code.

Reviewed By: christophpurrer

Differential Revision: D51170984

fbshipit-source-id: 1a453c9ae9142167afef5ac4a348c644fa6f1ab3
2023-11-18 22:13:40 -08:00
Ruslan ShestopalyukandFacebook GitHub Bot 917fd25cbb Temporarily back out ImageLoaderModule type extraction (#41547)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41547

# Changelog:
[Internal]-

Pending figuring out why it might break backwards compatibility (which it shouldn't, in practice).

Reviewed By: GijsWeterings

Differential Revision: D51447646

fbshipit-source-id: c3a4511badc6c1346655f3a1a20050ad719b095b
2023-11-18 04:51:25 -08:00
Gijs WeteringsandFacebook GitHub Bot 73411f4e08 Back out "Restore InspectorProxy tests - fix Windows by Babel-ignoring node_modules consistently"
Summary: Changelog: Internal

Reviewed By: gsathya

Differential Revision: D51447333

fbshipit-source-id: 56eb839671ca62269d59d48fd3c83df4f42a5111
2023-11-18 02:04:44 -08:00
Alexander OprisnikandFacebook GitHub Bot 3bee205c62 Use visibility events for React image component (#41538)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41538

Changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D51368688

fbshipit-source-id: 8de0d8f81c7454444c484311a37e56d9a4c35c01
2023-11-17 18:16:48 -08:00
Alex HuntandFacebook GitHub Bot 361a944348 Remove "Open Debugger" action under JSC (#41535)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41535

## Context

**Remote JS Debugging removal**

In React Native 0.73, we have deprecated Remote JS Debugging (execution of JavaScript in a separate V8 process) and also removed the Dev Menu launcher (https://github.com/facebook/react-native/pull/36754).

## This diff

Follows D46187942 — this option wasn't correctly removed for Android when running JSC. This is now consistent with iOS.

Changelog:
[Android][Changed] "Open Debugger" is no longer available for remote JS debugging from the Dev Menu (non-Hermes). Please use `NativeDevSettings.setIsDebuggingRemotely()`.

Reviewed By: blakef

Differential Revision: D50555095

fbshipit-source-id: 1aeb48ab1390dc12ce300d6f321c30de5343cf0a
2023-11-17 15:42:59 -08:00
Ruslan ShestopalyukandFacebook GitHub Bot f4d006a785 Optional prop for RNTesterApp to provide custom test lists (#41537)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41537

# Changelog:
[Internal] -

This allows to optionally provide a custom list of component/api test clauses into `RNTesterApp`.

Reviewed By: christophpurrer

Differential Revision: D51429407

fbshipit-source-id: 3ee35f13f6156fd055f6e0cbc788b7cf01c22b36
2023-11-17 13:10:39 -08:00