Summary:
There is currently an error when building in release on iOS when using asset catalogs (experimental feature that is partially merged https://github.com/facebook/react-native/pull/30129)
This was probably incorrectly migrated from the community cli repo. `.imageset` is actually folders so it needs to be removed with `{recursive: true, force: true}`. I also renamed the variable `files` which is confusing since its folders.
## Changelog:
[IOS] [FIXED] - Fix cleanAssetCatalog error
Pull Request resolved: https://github.com/facebook/react-native/pull/41865
Test Plan: Tested in an app that uses asset catalogs
Reviewed By: NickGerleman
Differential Revision: D52032258
Pulled By: huntie
fbshipit-source-id: 1dc0ca09e0da0d514b03d7d72707bdcaef03301d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41831
The build is currently firing several build warnings due to the Groovy -> Kotlin migration.
I've fixed them all over here.
Changelog:
[Internal] [Changed] - Resolve several Gradle build warning
Reviewed By: mdvacca
Differential Revision: D51890225
fbshipit-source-id: 4a2ff9dc168fca62893db704e282793e0bf03653
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41832
I'm removing the `installArchives` task and all the setup to publish
the Maven Local inside the NPM package as we're not using this entirely
and we won't be able to use it anyway (as the Maven Local is too big to fit an NPM package).
Changelog:
[Internal] [Changed] - Remove the installArchives task
Reviewed By: GijsWeterings
Differential Revision: D51890224
fbshipit-source-id: 3ffdc67a9fe931118596f6f74a5a2df0313ca3f2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41834
I'm updating other two `build.gradle` to `build.gradle.kts` files.
The only functional change I made was to remove the function to check if major >= 1 and turn on New Architecture. This needs to be moved to RNGP as Kotlin doesn't have dynamic accessors to Object so we can't convert that function.
Changelog:
[Internal] [Changed] - Convert ReactAndroid and RN-Tester to Kotlin DSL
Reviewed By: mdvacca
Differential Revision: D51856356
fbshipit-source-id: ef75579cd3ec121ef6ac9a357c1e10bcf9995432
Summary:
The logic to constrain the last spacer size is incorrect in some cases where the spacer is the last spacer, but not the last section in the list.
For more context, the role of spacer constraining is explained in this comment:
```
// Without getItemLayout, we limit our tail spacer to the _highestMeasuredFrameIndex to
// prevent the user for hyperscrolling into un-measured area because otherwise content will
// likely jump around as it renders in above the viewport.
```
For example it is incorrect in the case where we have:
ITEMS
SPACER
ITEMS
In this case the spacer is not actually the tail spacer so the constraining is incorrectly appied.
This causes issues mainly when using `maintainVisibleContentPosition` since it will cause it to scroll to an incorrect position and then cause the view that was supposed to stay visible to be virtualized away.
## Changelog:
[GENERAL] [FIXED] - Fix last spacer constrain logic in VirtualizedList
Pull Request resolved: https://github.com/facebook/react-native/pull/41846
Test Plan:
Tested using https://gist.github.com/janicduplessis/b67d1fafc08ef848378263208ab93d4c in RN tester, before the change content will jump on first click on add items.
Tested using the same example and setting initial posts to 1000, then we can see our content view size is still constrained properly (see scrolling indicator as reference).
Reviewed By: yungsters
Differential Revision: D51964500
Pulled By: NickGerleman
fbshipit-source-id: 4465aa5a36c95466aef6571314973c1e2c9a0f2c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41672
Progress towards an opt-in setup for our new CDP backend.
- Adds `InspectorFlags.h`, a singleton intended to allow convienient access to static boolean feature flags for the new CDP backend/inspector features across platforms. This will be written to in upcoming diffs, with the accessor for `enable_modern_cdp_registry` soft-defaulting to `false` here.
- References this to conditionally disable legacy ~CDP registration in `HermesExecutorFactory` (Bridge) and `HermesInstance` (Bridgeless) code paths.
- Stubs a `false` value for `react_native_devx:enable_modern_cdp_registry` in `EmptyReactNativeConfig` (documentation/convenience point for open source partners and integrators).
Changelog: [Internal]
Reviewed By: motiz88
Differential Revision: D51563107
fbshipit-source-id: 446f319228ec627fdc0ecba9517a1a3faad9d262
Summary:
X-link: https://github.com/facebook/yoga/pull/1497
The lowest common denominator we have had for Yoga has been Clang 12 + MSVC 2017 stdlib. This has allowed Yoga to use C++ 20 language features, but not library features. React Native for mobile has not been bound to this restriction.
Builds using that toolchain are being updated to latest MSVC 2019 stdlib (which has good C++ 20 library support), along with Clang 17 (or maybe a stop at 15) pending projects using `-fcoroutines-ts` being migrated to C++ 20.
This tests out some C++ 20 standard library usages against the current Clang 12 + MSVC 2019 stdlib toolchain that didn't work before, and adds a couple concepts for better constraints/compiler error messages if misused.
This bumps min-tested XCode (and minimum required) version to 14.3, matching a similar change for React Native. This should probably be bumped to 15 sometime before Apple starts requiring 15+ to go out to the iOS app store.
We are approaching a practical support range of:
1. XCode >= 14.3
2. NDK >= 26
3. Clang/libc++ >= 14
4. GCC/libstdc++ >= 11
5. MSVC >= 16.11 (VS 2019)
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D51604487
fbshipit-source-id: d394d0d86672b69781b8ae071d87adcf944ddc72
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41866
Direct recursive member types require infinite memory and aren't possible with current hardware.
Throw parser error to make this visible.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D51999832
fbshipit-source-id: 671f87325f33dd24f70ff3e2229c9d0b888d7445
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41471
Changelog: [Internal] - Clean up eventTarget retaining logic in the pointer event processor
This refactors calls to EventTarget::retain/release to occur in the actual methods that require the event target to be retained instead of expecting the caller to manage that which should be more maintainable.
Reviewed By: sammy-SC
Differential Revision: D51279974
fbshipit-source-id: db7251504a44ca59e4475928af7e6cf993cfa6e3
Summary:
Why ignore for now?
- It only happen once during initialization and doesn't cause any breakages for RNTester
- The race condition happens in Android System code which is hard to tackle:
```Exception in native call
java.lang.NullPointerException: java.lang.NullPointerException
at com.facebook.jni.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:30)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:235)
at java.lang.Thread.run(Thread.java:1012)
```
From stack trace message.callback is checked in
```at android.os.Handler.dispatchMessage(Handler.java:99)```
but becomes null in
```at android.os.Handler.handleCallback(Handler.java:958)```
[Android source code](https://l.facebook.com/l.php?u=https%3A%2F%2Fandroid.googlesource.com%2Fplatform%2Fframeworks%2Fbase%2F%2B%2Fmaster%2Fcore%2Fjava%2Fandroid%2Fos%2FHandler.java&h=AT1aQS0Vmknao8kLbYE_hhLj1G3idUf69jFQE3ZLAqjrbcMX4OdQUV1dzZpAkAvLaZ9HAOanpsKCC8z59Ce9XJa6cOhQL2L95gM9iMrSr7FbrpTKPLKbWjDmTz89WUL2pQprnBVKyA8) of Handler.
Reviewed By: cortinico
Differential Revision: D51550240
fbshipit-source-id: 6288e196da1da88a37f5c69bfce82e3e09c6f106
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41819
This will be needed in order to access the position type while implementing offsetLeft/Top, which needs to know if a node is static or not to get the proper offset. This is simply making the position type available to be read from LayoutMetrics.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D51412428
fbshipit-source-id: b101d8065ddfe0322f77f64d1de0f9ead3975c60
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41889
Resubmit of D51891716
I'm doing a pass and converting the last Java Unit Tests we had to Kotlin
I've also re-enabled multiple tests that were disabled in the past.
Changelog:
[Internal] [Changed] - Convert the last Unit Tests to Kotlin
Reviewed By: GijsWeterings
Differential Revision: D52033328
fbshipit-source-id: fabe19f88129f5c4b1d77d45cf5089117aed439e
Summary:
This PR fixes https://github.com/facebook/react-native/issues/41874.
## 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
-->
[iOS] [Fixed] - Fix NSAppTransportSecurity being overwritten during pod install
Pull Request resolved: https://github.com/facebook/react-native/pull/41875
Test Plan:
1. Delete the whole `NSAppTransportSecurity` in Info.plist and run `pod install`: `NSAllowsArbitraryLoads` and `NSAllowsLocalNetworking` are added as expected.
2. Modify `NSAppTransportSecurity` to only contain `NSExceptionDomains` and run `pod install`: `NSAllowsArbitraryLoads` and `NSAllowsLocalNetworking` are added, and `NSExceptionDomains` is still there.
3. Run `pod install` again: nothing changes.
Reviewed By: christophpurrer
Differential Revision: D52032400
Pulled By: dmytrorykun
fbshipit-source-id: 48cf29809c283af80613ffbf1ac0dc663a0a2fb5
Summary:
Bridgeless dev menu couldn't open due to self.bridge being null here.
Changelog:
[Android][Changed] - Fix dev menu not open for Bridgeless
Reviewed By: cortinico
Differential Revision: D51746610
fbshipit-source-id: 2e9bab686c965271bbfad264ff22ff61e28849c3
Summary:
To unlock ~~certain OOT platform capabilities~~ seamless `init` integration for out-of-tree platforms with CLI, we need to pass the package name to it. This change landed on 0.73 branch already: https://github.com/facebook/react-native/pull/41530
Depends on https://github.com/facebook/react-native/issues/41722
## Changelog:
[INTERNAL] [ADDED] - Fix init for out-of-tree platforms by passing name to CLI
Pull Request resolved: https://github.com/facebook/react-native/pull/41723
Test Plan: CI green
Reviewed By: christophpurrer
Differential Revision: D51979329
Pulled By: dmytrorykun
fbshipit-source-id: 451f70dc42ae0667bc65cba2e77898c9eec8d9ec
Summary:
Small edit to point to the newer React Native docs guide for Metro, which includes more clarity on the `metro.config.js` file setup in React Native projects.
Changelog: [Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/41855
Test Plan: —
Reviewed By: christophpurrer
Differential Revision: D52031862
Pulled By: huntie
fbshipit-source-id: 705418f35e5f6a3eddbec129e283773bb9d0f89c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41880
Pull Request resolved: https://github.com/facebook/react-native/pull/41664
Moving the check for Fabric i.e. `ReactFeatureFlags.enableFabricRenderer` to old JSI Module path logic instead of new UIManagerProvider path for Fabric initialization
Reviewed By: philIip
Differential Revision: D51610399
fbshipit-source-id: 1d868111dd2b65ac8d69198f7ab115ac8a2b43ec
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41852
I'm doing a pass and converting the last Java Unit Tests we had to Kotlin
I've also re-enabled multiple tests that were disabled in the past.
Changelog:
[Internal] [Changed] - Convert the last Unit Tests to Kotlin
Reviewed By: mdvacca
Differential Revision: D51891716
fbshipit-source-id: 7f953cf039a7b45bd773d1995253b4db262f8d22
Summary:
This PR adds build generated files to *ignore config files. This allows to locally run `yarn lint`
## Changelog:
[INTERNAL] [ADDED] - Add build generated files to local config files
Pull Request resolved: https://github.com/facebook/react-native/pull/41826
Test Plan: CI Green
Reviewed By: huntie
Differential Revision: D51939024
Pulled By: cortinico
fbshipit-source-id: cfd6c1c13dd23c692859cd06fa5955024fafc522
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41835
This removes internal usages of `onCatalystInstanceDestroy`.
The method is still available inside `NativeModule` but is `Deprecated(forRemoval = true)` so we're getting warning of its usages all over the places.
Changelog:
[Internal] [Changed] - Remove internal references of onCatalystInstanceDestroy()
Reviewed By: hoxyq
Differential Revision: D51589276
fbshipit-source-id: 84ed4d099a444977b95b4ef00e53750b79018e6f
Summary:
X-link: https://github.com/facebook/yoga/pull/1490
Pull Request resolved: https://github.com/facebook/react-native/pull/41692
In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing
Reviewed By: NickGerleman
Differential Revision: D51404489
fbshipit-source-id: 604495d651eb67cfdcca40df9d8d3a125c5741a8
Summary:
X-link: https://github.com/facebook/yoga/pull/1487
Pull Request resolved: https://github.com/facebook/react-native/pull/41691
The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side.
Reviewed By: NickGerleman
Differential Revision: D51383792
fbshipit-source-id: 372835a44edff361dbd84dd92ff9f2ec844b9f9c
Summary:
X-link: https://github.com/facebook/yoga/pull/1489
Pull Request resolved: https://github.com/facebook/react-native/pull/41690
Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child
Reviewed By: NickGerleman
Differential Revision: D51383625
fbshipit-source-id: 6bbbace95689ef39c35303bea4b99505952df457
Summary:
X-link: https://github.com/facebook/yoga/pull/1485
Pull Request resolved: https://github.com/facebook/react-native/pull/41686
The size of the containing block is the size of the padding box of the containing node for absolute nodes. We were looking at `containingNode->getLayout().measuredDimension(Dimension::Width)` which is the border box. So we need to subtract the border from this.
Added a test that was failing before this change as well
Reviewed By: NickGerleman
Differential Revision: D51330526
fbshipit-source-id: adc448dfb71b54f1bbed0d9d61c5553bda4b106c
Summary:
X-link: https://github.com/facebook/yoga/pull/1482
Pull Request resolved: https://github.com/facebook/react-native/pull/41685
This is the final step (that I know of) to get the core features of static working. Here we turn on all of the tests and pass down the correct owner size for the call to `calculateLayoutInternal` that is in `layoutAbsoluteChild`
Reviewed By: NickGerleman
Differential Revision: D51293606
fbshipit-source-id: 972259e7ebecb19b55aef2ef866bd7cb57aaf0ca
Summary:
X-link: https://github.com/facebook/yoga/pull/1481
Pull Request resolved: https://github.com/facebook/react-native/pull/41684
Absolute nodes can be laid out by themselves and do not have to care about what is happening to their siblings. Because of this we can make `positionAbsoluteChild` the sole place where we handle this logic. Right now that is scattered around algorithm with many `if (child is absolute)` cases everywhere. This makes implementing position static a lot harder since we are relying on the CB to do all this work, not the parent.
With this change the only time we set position for an absolute node and it matter (i.e. not overwritten) is in `positionAbsoluteChild`
Reviewed By: NickGerleman
Differential Revision: D51290723
fbshipit-source-id: 405d81b1d28826cbb0323dc117c406a44d381dff
Summary:
This enables the network panel/inspector by passing the `unstable_enableNetworkPanel=true` to the React Native JS Inspector. (See https://github.com/facebookexperimental/rn-chrome-devtools-frontend/pull/2)
By setting this inside the `experiments`, we can enable/disable network related CDP handlers within the proxy.
## Changelog:
[GENERAL] [ADDED] - Add `enableNetworkInspector` experiment to enable Network panel and CDP handlers in inspector proxy
Pull Request resolved: https://github.com/facebook/react-native/pull/41787
Test Plan: TBD, will provide a repository using an Expo canary / RN 0.73.0-rc release.
Reviewed By: NickGerleman
Differential Revision: D51811892
Pulled By: huntie
fbshipit-source-id: 541d96b6f0735104a4050a24a152e1158871ed1d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41828
Bumping the docker image used inside CircleCI to v12
This image contains NDK 26.0.10792818 which was bumped recently.
Without it the CI will attempt to download it everytime consuming time and bandwidth
Changelog:
[Internal] [Changed] - Bump Android Docker Image to v12
Reviewed By: NickGerleman
Differential Revision: D51897068
fbshipit-source-id: a510568efc2574917d94371eeab6f0a53550bc1d
Summary:
This PR convert `ReactPropForShadowNodeSetterTest` to kotlin as part of https://github.com/facebook/react-native/issues/38825
## Changelog:
[INTERNAL] [CHANGED] - Convert ReactPropForShadowNodeSetterTest to kotlin
<!-- 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
Pull Request resolved: https://github.com/facebook/react-native/pull/41774
Test Plan:
```
./gradlew :packages:react-native:ReactAndroid:test
```
Reviewed By: NickGerleman
Differential Revision: D51882685
Pulled By: cortinico
fbshipit-source-id: ff1cce824dc342200f1f5ccbb297b955747b10c8
Summary:
As the title says, if we discover that an issue needs a repro, then we should also apply
the "Needs: Author Feedback" as that will make the issue stale quicker (30 days) rather than (90)
Changelog:
[Internal] [Changed] - Adds "Needs: Author Feedback" if "Needs: Repro" is applied
Reviewed By: NickGerleman
Differential Revision: D51895945
fbshipit-source-id: 3ed651aec96795ada3e7c28b0f1e68d68f7fc870