Commit Graph
29154 Commits
Author SHA1 Message Date
Alex HuntandAlex Hunt bf0cdfcdd4 Add "Hermes only" to open debugger key prompt
Summary: Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D50327180

fbshipit-source-id: 6ee08fadd313828ddbc7702d5b3b1174a91b1ac1
2023-10-18 10:37:01 +01:00
Riccardo CipolleschiandAlex Hunt 9b9c07eaf0 Run all the tests when not on a PR
Summary:
## Changelog:
[Internal] - Run all the tests in CI when not on a PR

Reviewed By: cortinico

Differential Revision: D50220596

fbshipit-source-id: be1a30d713e9d427858cf22bd3ca9549ad513057
2023-10-13 09:47:06 +01:00
Blake FriedmanandAlex Hunt 8d2f41dbbf make runtime reference thread safe on tickleJs call
Summary:
The reference to runtime assumes the queue will ensure references to runtime are valid when invoked. This
isn't the case if you create a breakpoint, Hermes hit that breakpoint and your refresh the app. This consistently
will crash the app.

The fix is to not assument this, similar to ReactCommon/react/runtime/hermes/HermesInstance.cpp

Reviewed By: javache

Differential Revision: D50225678

fbshipit-source-id: b45cae1f5f687bc8c699fd74b187376a547012c5
2023-10-13 09:43:59 +01:00
Alex HuntandAlex Hunt 9f6575b6d4 Disable --experimental-debugger by default (#40795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40795

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D50178494

fbshipit-source-id: b833b6accadd2902d97a45e030cd48d1b62ac438
2023-10-12 13:50:37 +01:00
Nick GerlemanandAlex Hunt a09999911a Fix iOS Paper Scroll Event RTL check (#40751)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40751

In D48379915 I fixed inverted `contentOffset` in `onScroll` events on iOS. I thought I tested on Paper, but I think this was during a period where the Paper route in Catalyst was actually launching Fabric (oops).

In Paper, at least under `forceRTL` and English, `[UIApplication sharedApplication].userInterfaceLayoutDirection` is not set to RTL. We instead have a per-view `reactLayoutDirection` we should be reading.

This sort of thing isn't currently set on Fabric, which checks application-level RTL. This seems... not right with being able to set `direction` in a subtree context, but Android does the same thing, and that would take some greater changes.

Changelog:
[iOS][Fixed] - Fix iOS Paper Scroll Event RTL check

Reviewed By: luluwu2032

Differential Revision: D50098310

fbshipit-source-id: e321fca7b2f7983e903e23237bc2d604c72f98a3
2023-10-11 11:39:37 +01:00
Nick GerlemanandAlex Hunt 59855fc412 Remove code to support bottom-up layout events in horizontal RTL (#39646)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39646

We can dramatically simplify this code and remove quirks/hacks, now that we can assume layout events are always fired top down.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D49628669

fbshipit-source-id: 7de5bbc4597eba1c59aaa7672c70e76d2786c7ef
2023-10-11 11:39:32 +01:00
Nick GerlemanandAlex Hunt 31680559b4 Deterministic onLayout event ordering for iOS Paper (#40748)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40748

The ordering of `onLayout` events is non-deterministic on iOS Paper, due to nodes being added to an `NSHashTable` before iteration, instead of an ordered collection.

We don't do any lookups on the collection, so I think this was chosen over `NSMutableArray` for the sake of `[NSHashTable weakObjectsHashTable]`, to avoid retain/release. Using a collection which does retain/release seems to cause a crash due to double release or similar, so those semantics seem intentional (though I'm not super familiar with the model here).

We can replicate the memory semantics with ordering by using `NSPointerArray` (which is unfortunately not parameterized). This change does that, so we get consistently top-down layout events (matching Fabric, and Android Paper as of D49627996). This lets us use multiple layout events to calculate right/bottom edge insets deterministically.

Changelog:
[iOS][Changed] -  Deterministic onLayout event ordering for iOS Paper

Reviewed By: luluwu2032

Differential Revision: D50093411

fbshipit-source-id: f6a9d5c973b97aede879baa8b952cc1be2447f28
2023-10-11 11:39:25 +01:00
Nick GerlemanandAlex Hunt 21e2445d06 Top-down onLayout events (#39644)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39644

This makes Android Paper/Classic renderer fire `onLayout` events top down, like in Fabric/new Architecture. This gives a much more sane model for using layout events to calculate bottom/right-edge insets.

I was under the impression that Paper in general was bottom-up, but it turns out that is only true for Android and Windows (iOS seems totally deterministic).

This is a behavior change, but to my knowledge was never hit during the Fabric migration, and any JS code already written for both Android and iOS cannot make assumptions here anyways.

Changelog:
[General][Changed] - Make layout events top-down on Android classic renderer

Reviewed By: mdvacca

Differential Revision: D49627996

fbshipit-source-id: 29964b421dd420681d45348c7db16f211a6c087f
2023-10-11 11:39:20 +01:00
Dmitry RykunandAlex Hunt 4a4fb12a47 Store hermes stable artifacts inside Pods directory (#40733)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40733

Node package managers may purge or recreate `node_modules/react-native` when adding/removenf project dependencies. Storing hermes iOS artifacts inside `node_modules/react-native/sdks` is not reliable.
This diff moves those artifacts to `Pods/hermes-engine-artifacts`.
Should fix https://github.com/facebook/react-native/issues/39903
Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D50081559

fbshipit-source-id: a130898e12fb6275cadaef7617bf4b6a09e6487e
2023-10-11 11:39:10 +01:00
Nicola CortiandGitHub c05b3d385e [0.73] Make sure template is consuming the right buildToolsVersion (#39957) 2023-10-11 11:37:38 +01:00
Alex HuntandAlex Hunt 5310a50a66 Add --experimental-debugger-frontend flag, restore 0.72 flow as base (#40766)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40766

This changeset allows users to opt into the new debugger frontend experience by passing `--experimental-debugger` to `react-native start`. **We are defaulting this option to `true`** for now, but will continue to evaluate this feature before 0.73 ships. It restores Flipper (via `flipper://`) as the default handling for `/open-debugger` (matching 0.72 behaviour) when this flag is not enabled.

Detailed changes:

- Replaces `enableCustomDebuggerFrontend` experiment in `dev-middleware` with `enableNewDebugger`. The latter now hard-swaps between the Flipper and new launch flows.
    - Removes now-unused switching of `devtoolsFrontendUrl`.
- Implements `deprecated_openFlipperMiddleware` (matching previous RN CLI implementation).
- Disables "`j` to debug" key handler by default.
- Marks "`j` to debug" and `/open-debugger` console logs as experimental.

Changelog:
[Changed][General] Gate new debugger frontend behind `--experimental-debugger` flag, restore Flipper as base launch flow

Reviewed By: motiz88

Differential Revision: D50084590

fbshipit-source-id: 5234634f20110cb7933b1787bd2c86f645411fff
2023-10-10 18:41:40 +01:00
Distiller e22a8d1ac5 [0.73.0-rc.2] Bump version numbers v0.73.0-rc.2 2023-10-10 08:36:24 +00:00
Luna Wei d5ff7e7e74 Update .gitignore for sdks/downloads 2023-10-06 10:22:38 -07:00
Luna Wei b4bc816fcd Update pod for CI 2023-10-06 10:22:03 -07:00
Luna Wei a52faa6fab fix missing sed import 2023-10-06 09:30:04 -07:00
Luna WeiandLuna Wei 8e5439f1a7 Set hermes for Android template project in testing
Summary:
Changelog: [Internal] - Set the hermes value as specified by the test-e2e-local script flag. Right now, the script incorrectly ignores the flag

By default, the template project has `hermesEnabled=true`

Reviewed By: cipolleschi

Differential Revision: D49831355

fbshipit-source-id: 7fb8613fa86f2c6140b7d25b16aeb583e6e26c12
2023-10-06 09:25:13 -07:00
Saad NajmiandGitHub 3ba5e4f89c [iOS] Deprecate RCTGetMultiplierForContentSizeCategory (#39785) 2023-10-05 21:35:01 -07:00
NishanandLuna Wei ee6ff7a53e fix: view flips on RTL with new transform origin changes in Paper arch. (#39803)
Summary:
Fixes - https://github.com/facebook/react-native/pull/38626#issuecomment-1745528706. Explained the issue [here](https://github.com/facebook/react-native/pull/38626#issuecomment-1747212113).

## Changelog:

[IOS] [FIXED] - View flips horizontally in paper arch on RTL

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

Test Plan: Run RNTester in Paper mode on iOS

Reviewed By: NickGerleman

Differential Revision: D49952227

Pulled By: lunaleaps

fbshipit-source-id: 7240552e499765859dceea0a0406561cc3a3148f
2023-10-05 21:34:28 -07:00
Riccardo CipolleschiandLuna Wei 7f72275567 Fix Gemfile, setting Active support to < 7.1.0 (#39828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39828

Active Suppert released a new Gem which is incompatible with Cocoapods 1.13.0, the latest release, as they removed a method used by cocoapods.

This fix ensures that we install compatible versions of the Gem.

## Changelog:
[iOS][Fixed] - Set the max version of Active support to 7.0.8

Reviewed By: hoxyq

Differential Revision: D49949782

fbshipit-source-id: 278097502d3a416567cc8c0b90090fee4fb21503
2023-10-05 21:34:09 -07:00
Dmitry RykunandLuna Wei d247b61f78 Default to native view configs in bridged mode and to static view configs in bridgeless mode (#39704)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39704

Default to native view configs in bridged mode and to static view configs in bridgeless mode.
Remove `setRuntimeConfigProvider` calls from RNTester and from the Template.
Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D49687252

fbshipit-source-id: 140e1c510ba3fbc153978b59c8bb4b4e35bc7571
2023-10-05 21:34:01 -07:00
Riccardo CipolleschiandLuna Wei 7a4a0c4984 Remove unneeded write to .version file (#39807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39807

We used to need this file so that we could read the react native version when [creating Hermes artifacts](https://github.com/facebook/react-native/commit/e4b5d3eec9bae44c46795c4be097b31cb48593ae#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R1507). Originally, that change was introduced [here](https://github.com/facebook/react-native/commit/e4b5d3eec9bae44c46795c4be097b31cb48593ae#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47)

Despite the fact that that approach was wrong, as we already have the right version in the package.json which is guaranteed to be present, a lot has changed since then and we don't need that file anymore.

## Changelog:
[Internal] - Remove lines that write a .version file while releasing on npm

Reviewed By: lunaleaps

Differential Revision: D49909718

fbshipit-source-id: bd23d6d73001d0b58bf6b0321ed6d4ceb3523e7a
2023-10-05 21:33:18 -07:00
Nicola CortiandLuna Wei 82a52a1939 Fix broken Loading/Refreshing indicator on Android
Summary:
The Loading.../Refreshing... indicator is currently broken on Android.
The reason is related to D42599220
We used to have a Toast shown to users on Android as a fallback, but as the
DevLoadingView is not always loaded as a module in the core package, this ends up in the banner never beign shown to the user (on RN Tester or template apps).

Changelog:
[Android] [Fixed] - Fix broken Loading/Refreshing indicator on Android

Reviewed By: cipolleschi

Differential Revision: D49876757

fbshipit-source-id: 400e002327ebca908e3e7a7f81c5066888ac4e9b
2023-10-05 21:32:51 -07:00
Distiller e8f41ce48b [0.73.0-rc.1] Bump version numbers v0.73.0-rc.1 2023-10-04 08:37:43 +00:00
Riccardo CipolleschiandGitHub 032706790a Make jobs required for hermes to run on tagged builds (#39800) 2023-10-04 10:22:14 +02:00
Thibault Malbranche 8eec395268 Revert "[0.73.0-rc.1] Bump version numbers"
This reverts commit 725b1c9a7e.
2023-10-04 10:20:44 +02:00
Distiller 725b1c9a7e [0.73.0-rc.1] Bump version numbers 2023-10-03 20:23:12 +00:00
Alex Hunt 50f242e4d7 Bump package versions
#publish-packages-to-npm
2023-10-03 15:11:53 -04:00
Alex Hunt e5bf39cf85 Fix start command exit behaviour
This is an eager cherry pick of #39788 for `0.73-stable`.
2023-10-03 15:04:22 -04:00
Alex Hunt 047f645079 Fix typings for ReactNativeVersionCheck
Applies correct fix for `_formatVersion` misalignment — based on #36657.
2023-10-03 14:36:08 -04:00
Alex Hunt dd30cd30c9 Revert "Fix typings for ReactNativeVersion.js"
This reverts commit b6c0703ebb.
2023-10-03 14:36:08 -04:00
Distiller f133dd2efb [0.73.0-rc.0] Bump version numbers v0.73.0-rc.0 2023-10-03 16:13:06 +00:00
Riccardo CipolleschiandGitHub 8263b9d237 [RN][CI] Make the Choose CI Job run also on tags (#39774) 2023-10-03 11:58:36 -04:00
Alex Hunt 0c040314b5 Revert "[0.73.0-rc.0] Bump version numbers"
This reverts commit 6b9cf50b30.
2023-10-03 11:57:38 -04:00
Alex Hunt b6c0703ebb Fix typings for ReactNativeVersion.js
This is an eager cherry pick of #39784 for `0.73-stable`.
2023-10-03 11:56:51 -04:00
Distiller 6b9cf50b30 [0.73.0-rc.0] Bump version numbers 2023-10-02 21:39:05 +00:00
Alex Hunt aa58c4c4b7 Bump package versions (dependant packages)
#publish-packages-to-npm
2023-10-02 16:57:25 -04:00
Alex Hunt 3793a64808 Bump package versions
#publish-packages-to-npm
2023-10-02 16:50:40 -04:00
David VaccaandAlex Hunt e6b24a3146 Mark initHybrid as @JvmStatic (#39755)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39755

The goal of this diff is to fix:
```
JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.NoSuchMethodError: no static or non-static method
"Lcom/facebook/react/jscexecutor/JSCExecutor;.initHybrid(Lcom/facebook/react/bridge/ReadableNativeMap;)Lcom/facebook/jni/HybridData;"

```

changelog: [internal] internal

Reviewed By: luluwu2032

Differential Revision: D49831595

fbshipit-source-id: 9ce22cdccdd02af74edb27be2df72a469d3166c9
2023-10-02 16:31:16 -04:00
Alex HuntandAlex Hunt c116c1c268 Sync debugger-frontend
Summary:
Sync latest `debugger-frontend` artifacts, based on https://github.com/motiz88/rn-chrome-devtools-frontend/pull/12.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D49502838

fbshipit-source-id: 25805066670ac35ec976dc820a73a722ee182dd2
2023-10-02 13:40:29 -04:00
Riccardo CipolleschiandAlex Hunt 67ebc7c7d5 Update Xcode 15 patches to be more robust (#39710)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39710

Last week Apple released Xcode 15, which required us to ship a workaround for the new linker.
Unfortunately, the previous fix was not good enough and there were some edge cases that were not covered.
For example, in some occasions the flags are read as an array and the `-Wl` and the `-ld_classic` flags were separated and not properly removed when moving from Xcode 15 to Xcpde 14.3.1.

This change fixes those edge cases, with a more robust solution where:
- We convert the flags to a string.
- We trim the string and the values properly.
- We add the flags when running `pod install` with Xcode 15 as the default iOS toolchain.
- We remove the flags when running `pod install` with Xcode <15 as the default iOS toolchain.

## Changelog:
[Internal] - Make the Xcode 15 workaround more robust.

Reviewed By: dmytrorykun

Differential Revision: D49748844

fbshipit-source-id: 34976d148f123c5aacba6487a500874bb938fe99
2023-10-02 10:59:36 -04:00
Alex Hunt 49bd0ed303 Bump package versions
#publish-packages-to-npm
2023-09-27 15:22:42 -04:00
Alex Hunt 608b4bac44 Bump CLI to 12.0.0-alpha.17 2023-09-27 15:21:37 -04:00
Dmitry RykunandLuna Wei ea09bcd8cb Export Commands and Constants only if native view config interop is enabled (#39696)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39696

`Commands` and `Constants` should be set in native only if component data is instantiated via native view config interop layer.
Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D49684166

fbshipit-source-id: ceaa29c2ed3336aa6e21a116a3f5f94e03c225c1
2023-09-27 13:41:12 -04:00
Ramanpreet NaraandLuna Wei 562109fdd3 Enable TurboModule interop in Bridgeless Mode (#39687)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39687

Bridgeless mode is releasing in 0.73.

Bridgeless mode isn't stable inside RNTester (in 0.73) without the TurboModule interop layer: T164853040.

**Changes:** Enable the TurboModule interop layer in RNTester (Bridgeless Mode).

**Urgency:** This will unblock the 0.73.

Changelog: [General][Added] - Enable TurboModule interop in Bridgeless mode

Reviewed By: fkgozali, dmytrorykun, luluwu2032

Differential Revision: D49653919

fbshipit-source-id: a4a09a99544c2ef8713484dbeab5cb04f29256cc
2023-09-27 13:39:15 -04:00
Arushi KesarwaniandLuna Wei a57a8b7782 Reduce visibility of functions in ReactHostImpl (#39640)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39640

changelog: [internal] internal

Reducing visibility from public to package only for `ReactHostImpl.getDefaultHardwareBackBtnHandler()` since it's only used within package

Reviewed By: mdvacca

Differential Revision: D49612859

fbshipit-source-id: 3c40888da732f33dc046d9363b08119e707f4ea4
2023-09-27 13:03:16 -04:00
Luna Wei 69e0c2d916 bumped packages versions
#publish-packages-to-npm
2023-09-27 12:36:19 -04:00
Alex Hunt 04d80478c8 Bump CLI to 12.0.0-alpha.16 2023-09-27 12:19:06 -04:00
Alex HuntandGitHub 73cd7c0e6b [Hotfix] Remove node engines constraint for normalize-color (#39698) 2023-09-27 12:18:28 -04:00
Lulu WuandLuna Wei 4c1418a216 Enable Template with Bridgeless (#39661)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39661

Changelog:
[Android][Changed] - Enable Template with Bridgeless

Reviewed By: cortinico

Differential Revision: D49464580

fbshipit-source-id: 26dd8e2a0b9a66421d58f147eed4d2fd28817dc7
2023-09-26 13:40:32 -04:00
Dmitry RykunandLuna Wei 9f5c77dab7 Enable native view configs in bridgeless mode in OSS (#39476)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39476

This diff enables native view config interop layer in bridgeless mode by default for OSS.
It also removes redundant `enableNativeViewConfigsInBridgelessMode` JS feature flag.
Changelog: [General][Added] - Native view config interop layer enabled in bridgeless mode.

Reviewed By: luluwu2032

Differential Revision: D49318325

fbshipit-source-id: ea2e38b2ea10637b578d98e38d97eed923498fb3
2023-09-26 13:15:39 -04:00