Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43967
Following up https://github.com/facebook/react-native/issues/43943, the metro loading banner is presented twice in Bridgeless mode.
This happens because both the RCTInstance and the RCTHost are listening to the Reload Command and issuing the instructions to refetch the JSBundle and to present the banner.
The RCTInstance should not concern itself with lifecycle events, owned by the RCTHost.
## Changelog:
[iOS][Fixed] - Avoid to show Metro Loading banner twice.
Reviewed By: cortinico
Differential Revision: D55870640
fbshipit-source-id: addb67d3226f7d7db20736309172a42fc15f3aa3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43864
This change tries to vendor boost. It has several sustainable benefits:
- Reduce the download time to download boost
- Reduce the time to install pods
- Reduce the time to build the project
- Protects us from SEVs due to boost download link being down (happened twice already)
- Fixes how we build boost: currently it is a pseudo-target in iOS with no code, this makes all the symbols weak and this does not plays nicely with the new Apple linker.
## Changelog:
[Internal] - Vendor boost from React Native
Reviewed By: cortinico
Differential Revision: D55742345
fbshipit-source-id: 75abb5a2875e949b3dae299d2e18cb648c46151e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43968
Changelog: [Internal]
When going from a Fusebox build to a non-Fusebox build of the same app, users can accidentally connect a previously opened Fusebox frontend to a non-Fusebox backend (or vice versa).
To prevent this, here we assign a distinct "device ID" to the Fusebox backend on both Android and iOS. This will prevent a mismatched CDT frontend from reconnecting to the app after a backend change, forcing the user to close and reopen the debugger.
Reviewed By: hoxyq
Differential Revision: D55870800
fbshipit-source-id: 8552e009ef1e43b512d35035c98d1a859e3ccf91
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43966
The `context` field was confusing. I've renamed it to `currentActivityContext` +
I've made sure the `onKey` method is using the right context with a this@ accessor.
Changelog:
[Android] [Fixed] - Fix ClassCastException in `ReactModalHostView`
Reviewed By: GijsWeterings
Differential Revision: D55870250
fbshipit-source-id: a25a31452fb0d21cf8e2807eca62cf09fe4fd74b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43742
## Changelog:
[Internal] -
As in the title - taking a subset of the views/image Java files, those that are related to interfaces, and convert them to Kotlin.
Reviewed By: tdn120
Differential Revision: D55589946
fbshipit-source-id: 60f03eaaca467821634d5b0195e42bfb931f65fb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43920
React native is shipped as a whole, so it makes no sense for individual pods to specify which version of boost they support.
With this change we let the `react_native_pods` and the `boost.podspec` file to decide which version of boost is supported and all the other podspecs will follow.
## Changelog:
[Internal] - Remove explicit boost version from other podspecs
Reviewed By: NickGerleman
Differential Revision: D55801708
fbshipit-source-id: 3dcbbfb25010d2ee615afc4acfd5232fdc0c2a14
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43951
## Context
The **early js** error reporting pipeline catches javascript exceptions.
After errors are caught, the pipeline parses the exception, and puts the data into into a map buffer. 🤨
## Problems
We don't need to use a mapbuffer here: The structure of this exception data is known and never changes. (A map buffer is a type-unsafe bag of key/value pairs).
Instead, we could just use lower-level type-safe language primitives: regular C++ struct, and java class w/ fbjni.
## Changes
Migrate the **early js** error handling infra to C++ structs/fbjni.
## Impact
Now, there is no mapbuffer usage on iOS. We could re-introduce it when there is a need.
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D55265170
fbshipit-source-id: cda97633d4c6ccaad541e5d416067390fe6f61b2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43913
changelog: [internal]
We have this turned on in ParagraphShadowNode, let's roll it out for TextInput as well.
I came across this while profiling scroll performance when TextInput is part of the view hierarchy.
Reviewed By: javache
Differential Revision: D55751341
fbshipit-source-id: 2af20ddb5a4fb9b0ccd33217e60e8b9e8a95b920
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43939
## Problem
If we link the default tmmdelegate with our vr apps, we get this issue:
```
ld.lld: error: duplicate symbol: facebook::react::NativeDevLoadingViewSpecJSI::NativeDevLoadingViewSpecJSI(facebook::react::JavaTurboModule::InitParams const&)
>>> defined at firsttimenux_v2AppModulesCodegen-generated.cpp:1367 (buck-out/v2/gen/fbsource/bcbe7a50bd5ff29a/arvr/libraries/react-panellib/FirstTimeNux/__firsttimenux_v2AppModulesCodegen-codegen-modules-jni_cpp__/out/firsttimenux_v2AppModulesCodegen-generated.cpp:1367)
>>> firsttimenux_v2AppModulesCodegen-generated.cpp.pic.o:(facebook::react::NativeDevLoadingViewSpecJSI::NativeDevLoadingViewSpecJSI(facebook::react::JavaTurboModule::InitParams const&)) in archive buck-out/v2/gen/fbsource/bcbe7a50bd5ff29a/arvr/libraries/react-panellib/FirstTimeNux/__firsttimenux_v2AppModulesCodegen-jni__/libfirsttimenux_v2AppModulesCodegen-jni.pic.a
>>> defined at rncore-generated.cpp:606 (buck-out/v2/gen/fbsource/bcbe7a50bd5ff29a/xplat/js/react-native-github/__rncore-codegen-modules-jni_cpp__/out/rncore-generated.cpp:606)
>>> rncore-generated.cpp.pic.o:(.text._ZN8facebook5react27NativeDevLoadingViewSpecJSIC2ERKNS0_15JavaTurboModule10InitParamsE+0x0) in archive buck-out/v2/gen/fbsource/bcbe7a50bd5ff29a/xplat/js/react-native-github/__rncore-jniAndroid__/librncore-jniAndroid.pic.a
```
## Cause
My best understanding of the problem:
- Default tmmdelegate links against rncore, which contains codegen for react native's standard library of modules.
- But, the default delegate also pulls in this appmodules.so library. That library also contains codegen for react native's standard library of modules + the app's modules.
So, two so libraries define the same symbols. Hence the build fails.
## Solution
Remove the codegen for react native's standard library of modules from the default tmmdelegate.
Prereq: In open source, also make appmodules.so include the codegen for react native's standard library of modules.
Changelog: [Android][Breaking] - Make the app responsible for returning core turbomodule jsi hostobjects
Reviewed By: cortinico
Differential Revision: D55613024
fbshipit-source-id: 6406a9f388ff9de01288de0e263a78a079e7a0da
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43860
Changelog: [Internal]
_____
## Why?
We recommend to use Kotlin for any new code and are actively migrating Java code to Kotlin. This codemod service attempts to migrate existing Java code to Kotlin.
## How was this diff generated?
This codemod service scans through qualified paths and looks for Java modules. Then it runs `kotlinator.sh` on each module, which generated this diff.
## What if I see problems in this diff?
We recommend commandeering and fixing the diff. If you reject or abandon the diff, the codemod service will regenerate it in a few days
- Script for easily commandeer & open diff: In fbandroid, `scripts/commandeer_and_checkout.sh <DIFF>`. It not only commandeer the diff, but also rebase & open diff in Android Studio.
- Report repeating issues in [Kotlinator Papercut](https://fburl.com/papercuts/1g4f4qas)
See more useful tips & scripts in [Kotlin Auto-Conversion Codemod Wiki](https://fburl.com/wiki/c68ka0pu)
_____
## Questions / Comments / Feedback?
**Your feedback is important to us! Give feedback about this diff by clicking the "Provide Feedback" button below.**
* Returning back to author or abandoning this diff will only cause the diff to be regenerated in the future.
* Do **NOT** post in the CodemodService Feedback group about this specific diff.
_____
## Codemod Metadata
NOTE: You won't need to read this section to review this diff.
https://www.internalfb.com/intern/sandcastle/job/1239557953/
|Oncall|[kotlin_in_fb4a](https://our.intern.facebook.com/intern/oncall3/?shortname=kotlin_in_fb4a)|
|CodemodConfig|[fbsource/kotlinator.json](https://www.internalfb.com/codemod_service/fbsource%2Fkotlinator.json)|
|ConfigType|configerator|
Rules run:
- CodemodTransformerFBSourceScript
This diff was created with [CodemodService](https://fburl.com/CodemodService).
Reviewed By: cortinico
Differential Revision: D55725322
fbshipit-source-id: 8f78d221a8f04136019055a6ea64d8ec05bfd8a2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43923
Another round of Kotlin migration.
This time I'm doing `com.facebook.react.views.text.internal.span` which has been recently been annotated as `Nullsafe`
Changelog:
[Internal] [Changed] - Convert the whole `com.facebook.react.views.text.internal.span` package to Kotlin
Reviewed By: tdn120
Differential Revision: D55802155
fbshipit-source-id: 4bed023557f45a43d921df73dfc685e547788fd4