Commit Graph

25178 Commits

Author SHA1 Message Date
Riccardo Cipolleschi e8e059a977 [0.70][RN][General] Migrate boost download url away from JFrog (#42178) 2024-01-08 11:21:56 -08:00
Riccardo Cipolleschi 5b95254359 [Local] Bump hermes-engine (#41991) 2023-12-19 07:20:36 -08:00
Luna Wei abb4a2bddd Bump react-devtools-core to 4.27.7 2023-12-18 16:17:34 -08:00
Muhammad Hur Ali cb170efdd3 BUMP CLI to v9.3.5 (#41479) 2023-12-18 13:28:53 -08:00
Distiller fe6c65169c [0.70.14] Bump version numbers v0.70.14 2023-10-24 17:32:08 +00:00
Riccardo Cipolleschi 603d2b2299 Revert "[LOCAL] For targeting SDK 34 - Added RECEIVER_EXPORTED/RECEIVER_NOT_EXPORTED flag support in DevSupportManagerBase"
This reverts commit ffbec5b73f.
2023-10-12 17:57:46 +01:00
Riccardo Cipolleschi 977f03ae9d [LOCAL] Fix CI 2023-10-12 17:14:10 +01:00
Riccardo Cipolleschi b1496be007 [LOCAL] Remove generate yarn.lock for react-native-codegen 2023-10-12 17:05:31 +01:00
Riccardo Cipolleschi d0eb4218cd [LOCAL] Bump published packages 2023-10-12 17:02:02 +01:00
Riccardo Cipolleschi 9f53ea7aca [LOCAL] Bump iOS executor as CircleCI removed the one we used for 0.70 2023-10-12 16:56:30 +01:00
Riccardo Cipolleschi a1a220b6ac 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.

[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-12 16:50:28 +01:00
Riccardo Cipolleschi 735d06c01f [LOCAL] Update Xcode 15 patches to be more robust 2023-10-12 16:39:11 +01:00
Riccardo Cipolleschi 964872d936 [LOCAL] update yarn.lock 2023-10-12 16:27:01 +01:00
Stian Jensen 5a695dd17c Bump jscodeshift to 0.14 (#35356)
Summary:
Jscodeshift has become maintained again in the past year, and has gotten rid of quite a good chunk of old dependencies that are no longer needed!

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - update jscodeshift

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

Reviewed By: cipolleschi

Differential Revision: D41325527

Pulled By: rshest

fbshipit-source-id: 666b25c9bb3b1720479e9e098968b3b983adc2b4
2023-10-12 16:24:16 +01:00
Riccardo Cipolleschi ffbec5b73f [LOCAL] For targeting SDK 34 - Added RECEIVER_EXPORTED/RECEIVER_NOT_EXPORTED flag support in DevSupportManagerBase 2023-10-12 16:21:13 +01:00
Riccardo Cipolleschi 5f4a091a2f Add ld_classic flag to Hermes when building for Xcode 15 (#39516)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39516

With Xcode15, Apple rewrote the C++ linker.
This is a breaking change that does not work with weak symbols.
As a workaround, apple is suggesting to add `-ld_classic` to the linker in order to readd support for weak symbols. The flag does not exists for Xcode 14.3 or lower, so we need to add it conditionally.

With this change, we introduce a couple of checks in the Hermes build logic:
1. Detect the version of Xcode that is used
2. Add the new flag to `HERMES_EXTRA_LINKER_FLAGS` if Xcode version is 15.

[Internal] - Make hermes build properly with Xcode 15

Reviewed By: cortinico, dmytrorykun

Differential Revision: D49368675

fbshipit-source-id: 62d8ed81855c426f56ed94b6a2d6da2eb882b355
2023-09-19 13:46:13 +02:00
Riccardo Cipolleschi 740c40187f Fix Xcode 15 RC issues (#39474)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39474

When it comes to Xcode 15 RC, we are aware of two issues:
1. `unary_function` and `binary_function` not available in Cxx17
2. [Weak linking](https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking) is not supported anymore.

This change should fix both of the issues, adding the flags to allow for `unary_function`and `binary_function` to be called and adding the `-Wl -ld_classic` flag to `OTHER_LDFLAGS` in case Xcode 15 is detected.

[Internal] - add the `_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION` and the `-Wl -ld_classic` flags to projects when needed

Reviewed By: dmytrorykun

Differential Revision: D49319256

fbshipit-source-id: bb895f1e60db915db79684f71fa436ce80b42111
2023-09-19 13:40:17 +02:00
Riccardo Cipolleschi b8b9b609a1 Bump IPHONEOS_DEPLOYMENT_TARGET to 13.4 for 3rd party pods (#39478)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39478

When testing Xcode 15, we realized that a few pods we do not control directly have the IPHONEOS_DEPLOYMENT_TARGET set to old versions of iOS.
We can update that setting to silence the warning with Cocoapods and this is what this script does.

Notice that bumping that setting generated other warning as some APIs have been deprecated.

[Internal] - Bump min IPHONEOS_DEPLOYMENT_TARGET for 3rd party pods

Reviewed By: dmytrorykun

Differential Revision: D49274837

fbshipit-source-id: 584d105c76d654daa2ecf5eb2f1b9381e70f567a
2023-09-19 13:39:03 +02:00
Lorenzo Sciandra be89d2af54 chore(releases): rename bump-oss script to align with newer versions (#38892) 2023-08-21 09:58:28 +01:00
Distiller 0bccf2b616 [0.70.13] Bump version numbers v0.70.13 2023-07-28 08:24:59 +00:00
Thibault Malbranche 549ff6380a fix: bumped CLI to address broken backward compatibility (#38572) 2023-07-24 13:49:20 +02:00
Distiller 3481eba79a [0.70.12] Bump version numbers v0.70.12 2023-07-05 09:35:43 +00:00
Rob Hogan 1363b0a36f Use Content-Location header in bundle response as JS source URL (#37501)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37501

This is the iOS side of the fix for https://github.com/facebook/react-native/issues/36794.

That issue aside for the moment, the high-level idea here is to conceptually separate the bundle *request URL*, which represents a request for the *latest* bundle, from the *source URL* passed to JS engines, which should represent the code actually being executed. In future, we'd like to use this to refer to a point-in-time snapshot of the bundle, so that stack traces more often refer to the code that was actually run, even if it's since been updated on disk (actually implementing this isn't planned at the moment, but it helps describe the distinction).

Short term, this separation gives us a way to address the issue with JSC on iOS 16.4 by allowing Metro to provide the client with a [JSC-safe URL](https://github.com/react-native-community/discussions-and-proposals/pull/646) to pass to the JS engine, even where the request URL isn't JSC-safe.

We'll deliver that URL to the client on HTTP bundle requests via the [`Content-Location`](https://www.rfc-editor.org/rfc/rfc9110#name-content-location) header, which is a published standard for communicating a location for the content provided in a successful response (typically used to provide a direct URL to an asset after content negotiation, but I think it fits here too).

For the long-term goal we should follow up with the same functionality on Android and out-of-tree platforms, but it's non-essential for anything other than iOS 16.4 at the moment.

For the issue fix to work end-to-end we'll also need to update Metro, but the two pieces are decoupled and non-breaking so it doesn't matter which lands first.

Changelog:
[iOS][Changed] Prefer `Content-Location` header in bundle response as JS source URL

Reviewed By: huntie

Differential Revision: D45950661

fbshipit-source-id: 170fcd63a098f81bdcba55ebde0cf3569dceb88d
2023-07-05 09:39:28 +01:00
Distiller 90d0f938e1 [0.70.11] Bump version numbers v0.70.11 2023-07-04 10:28:13 +00:00
Lorenzo Sciandra 2a9d71dc34 [LOCAL] bump CLI to 9.3.3 and Metro do 0.72.4 2023-07-03 13:40:20 +01:00
Distiller 3364cd1c01 [0.70.10] Bump version numbers v0.70.10 2023-06-08 15:37:39 +00:00
Riccardo Cipolleschi c5e549e694 [LOCAL] Make 0.70 compatible with Xcode 15 (thanks to @AlexanderEggers for the commit in main) 2023-06-08 12:28:43 +01:00
Harry Yu 51bbfe1c60 Prevent crash in runAnimationStep on OnePlus and Oppo devices (#37487)
Summary:
We've been encountering a crash in `runAnimationStep` with "Calculated frame index should never be lower than 0" https://github.com/facebook/react-native/issues/35766 with OnePlus/Oppo devices as well, but don't have one on hand to test.

This just works around the issue: if the time is before the start time of an animation, we shouldn't do anything anyways, so we just log a message instead of throwing while in production. We still throw in debug mode though for easier debugging.

### Hypothesis of the root cause

Based on stacktrace in https://github.com/facebook/react-native/issues/35766 (which is the same one we see)

Normally, this should happen

1. Choreographer.java constructs a FrameDisplayEventReceiver
2. FrameDisplayEventReceiver.onVSync gets called, which sets the `mTimestampNanos`
3. FrameDisplayEventReceiver.run gets called, which then eventually calls our `doFrame` callback with `mTimestampNanos`. This then causes `FrameBasedAnimationDriver.runAnimationStep` to be called with the same timestamp

I suspect what's happening on OnePlus devices is that the `onVSync` call either doesn't happen or happens rarely enough that the `mTimestampNanos` when `run` is called is sometime in the past

### Fix

1. Add logging so we get the parameters to debug more if we end up getting this error
2. In production, just ignore past times instead of throwing an Error

## Changelog:

Pick one each for the category and type tags:

[ANDROID] [FIXED] - Prevent crash on OnePlus/Oppo devices in runAnimationStep

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

Test Plan: Ran our app using patched version and verified no issues showed up when using it

Reviewed By: cipolleschi

Differential Revision: D46102968

Pulled By: cortinico

fbshipit-source-id: bcb36a0c2aed0afdb8e7e68b141a3db4eb02695a
2023-06-08 11:56:31 +01:00
Dmitry Rykun bad39493b9 Cleanup temporary files after source map generation.
Summary:
Changelog:
[iOS][Fixed] - When source maps are enabled, clean up temporary files from the build directory. Reduces bundle size by at least 1MB.

Reviewed By: cipolleschi

Differential Revision: D38866158

fbshipit-source-id: 0f46faf4e767bb7417b24f283fbe19cfa022941a
2023-06-08 11:56:24 +01:00
Dmitry Rykun 4108b37438 Fix react-native-xcode.sh build script
Summary:
This diff fixes USE_HERMES checks.

Changelog
[iOS][Fixed] - USE_HERMES envvar check fixed in react-native-xcode.sh.

Reviewed By: cipolleschi

Differential Revision: D38704558

fbshipit-source-id: 90a8648fd1094fcf9ab085f37efce9b811e707bc
2023-06-08 11:56:18 +01:00
Dmitry Rykun 8ad63714ed Fix USE_HERMES envvar check
Summary:
Hermes is enabled by default. We set `USE_HERMES` envvar to `false` to explicilty disable Hermes. The only valid way to check it would be to compare it against `false`. Everything else will produce invalid results if `USE_HERMES` is not defined. For example `$USE_HERMES != true` will turn into `'' != true`, which evaluates to `true`.
Due to this bug source maps were not generated by default.

Changelog:
[iOS][Fixed] - USE_HERMES envvar check fixed in react-native-xcode.sh. Now source maps are generated by default.

Reviewed By: cipolleschi

Differential Revision: D38571971

fbshipit-source-id: bc6b505c225c56d62ee773b401b66d821965e106
2023-06-08 11:56:11 +01:00
Peter Velkov 2b2e4f0ca2 Fix HBC_SOURCEMAP_FILE in scripts/react-native-xcode.sh (#34111)
Summary:
## Summary

Fixes https://github.com/facebook/react-native/issues/32497
Fixes https://github.com/facebook/react-native/issues/34212

The assigned HBC_SOURCEMAP_FILE path is incorrect as it does not reference the hermes bundle source map file

See: https://github.com/facebook/react-native/issues/32497#issuecomment-1171379674

## Changelog
[General] [Fixed] - using SOURCEMAP_FILE during xcode build phase with Hermes enabled

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

Test Plan:
1. In a blank react-native project
1. Enable Hermes
1. Go to xCode -> Project -> Build Phases -> Bundle React Native code and images
3. Add `export SOURCEMAP_FILE="$(pwd)/../ios.jsbundle.map"` before `react-native-xcode.sh`
   e.g.
   ```sh
   export NODE_BINARY=node
   export SOURCEMAP_FILE="$(pwd)/../ios.jsbundle.map"

   ../node_modules/react-native/scripts/react-native-xcode.sh
   ```
4. Make a release build `npx react-native run-ios --configuration Release` or `CMD + I` in xCode
5. Verify the build is successful
6. Verify the `.map` file is outputted at the specified path (`ios.jsbundle.map` in project root for the example above)

Reviewed By: cipolleschi

Differential Revision: D38460586

Pulled By: dmitryrykun

fbshipit-source-id: 54c1594b37fa2253896ce9739c1a9a712deecd0f
2023-06-08 11:56:04 +01:00
Riccardo Cipolleschi e0ad535ea6 [LOCAL] restore with_hermes_sdk_cache_span job 2023-06-08 10:38:16 +01:00
Riccardo Cipolleschi 227f4233fe [LOCAL] restore the right hermes cache keys for 0.70 2023-06-08 10:35:04 +01:00
Riccardo Cipolleschi 190fc5be87 [LOCAL] restore the right hermes keys for 0.70 2023-06-08 10:32:38 +01:00
Riccardo Cipolleschi 40e8bb9a43 Make CircleCI caches for hermesc be version dependent (#37452)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37452

Fixes #37428

We do have cache poisoning for hermesc on Windows and Linux due to reusing the same cache key among different
React Native version. This fixes it by specifying a cache key which is version dependent + it invalidates the
caches by defining a new key.

Changelog:
[Internal] [Fixed] - Make CircleCI caches for hermesc be version dependent

Reviewed By: cortinico

Differential Revision: D45909178

fbshipit-source-id: 830c87ae45739c7053342a68dac2ee7581945c1d
2023-06-08 10:13:42 +01:00
Marek Fořt 8c90612925 Fix test e2e script (#37081) 2023-04-25 15:36:33 +01:00
Distiller 6bba507895 [0.70.9] Bump version numbers v0.70.9 2023-04-19 09:51:57 +00:00
Nicola Corti 260a9c720e Fix test_buck by providing exported deps for textinput target (#34436)
Summary:
This is an attempt to fix the broken `test_buck` as the `/textinput` target now needs to access the Kotlin stdlib dependencies

## Changelog

[Internal] - Fix test_buck by providing exported deps for textinput target

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

Test Plan: Will wait for a CircleCI result

Reviewed By: cipolleschi

Differential Revision: D38782473

Pulled By: cortinico

fbshipit-source-id: 72265c34092372189d75df732b64a1e370453472
2023-04-17 15:38:08 +01:00
Pieter De Baets da1d82bcb4 Fix TextView alignment being reset on state updates
Summary: Changelog: [Android][Fixed] Resolved bug with Text components in new arch losing text alignment state.

Reviewed By: mdvacca

Differential Revision: D34108943

fbshipit-source-id: 3992e9406345be919b5e3595fc1f9e61cf67a699

# Conflicts:
#	ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java
#	ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java
2023-04-17 13:13:49 +01:00
Lorenzo Sciandra 1df92c6948 manual backport of "Use RN Build Utils for Building Hermes Artifacts" fix 2023-04-17 11:34:17 +01:00
Lorenzo Sciandra 124547ef26 Merge pull request #36875 from facebook/kelset/070-backport-textinput-fixes 2023-04-17 11:19:04 +01:00
Luna Wei 7b1441730b Update Hermes tag 2023-04-13 10:59:04 -07:00
Nick Gerleman 5339e95cb9 Mimimize EditText Spans 9/9: Remove addSpansForMeasurement() (#36575)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36575

This is part of a series of changes to minimize the number of spans committed to EditText, as a mitigation for platform issues on Samsung devices. See this [GitHub thread]( https://github.com/facebook/react-native/issues/35936#issuecomment-1411437789) for greater context on the platform behavior.

D23670779 addedd a previous mechanism to add spans for measurement caching, like we needed to do as part of this change. It is called in more specific cases (e.g. when there is a text hint but no text), but it edits the live EditText spannable instead of the cache copy, and does not handle nested text at all.

We are already adding spans back to the input after this, behind everything else, and can replace it with the code we have been adding.

Changelog:
[Android][Fixed] - Mimimize EditText Spans 9/9: Remove `addSpansForMeasurement()`

Reviewed By: javache

Differential Revision: D44298159

fbshipit-source-id: 1af44a39de7550b7e66e45db9ebc3523ae9ff002

# Conflicts:
#	ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java
2023-04-11 16:02:08 +01:00
Joshua Gross 62364d00ca Support MapBuffer in TextInput State
Summary:
Support MapBuffer in TextInput State.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D38546271

fbshipit-source-id: 93e7fd79d9d8473dd646410f3047fcfafa8516f1
2023-04-11 16:01:59 +01:00
Nick Gerleman 322f721c4a Minimize EditText Spans 8/9: CustomStyleSpan (#36577)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36577

This is part of a series of changes to minimize the number of spans committed to EditText, as a mitigation for platform issues on Samsung devices. See this [GitHub thread]( https://github.com/facebook/react-native/issues/35936#issuecomment-1411437789) for greater context on the platform behavior.

This change allows us to strip CustomStyleSpan. We already set all but `fontVariant` on the underlying EditText, so we just need to route that through as well.

Note that because this span is non-parcelable, it is seemingly not subject to the buggy behavior on Samsung devices of infinitely cloning the spans, but non-parcelable spans have different issues on the devices (they disappear), so moving `fontVariant` to the top-level makes sense here.

Changelog:
[Android][Fixed] - Minimize EditText Spans 8/N: CustomStyleSpan

Reviewed By: javache

Differential Revision: D44297384

fbshipit-source-id: ed4c000e961dd456a2a8f4397e27c23a87defb6e
2023-04-11 15:57:18 +01:00
Nick Gerleman 471cc514a8 Minimize EditText Spans 7/9: Avoid temp list (#36576)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36576

This is part of a series of changes to minimize the number of spans committed to EditText, as a mitigation for platform issues on Samsung devices. See this [GitHub thread]( https://github.com/facebook/react-native/issues/35936#issuecomment-1411437789) for greater context on the platform behavior.

This change addresses some minor CR feedback and removes the temporary list of spans in favor of applying them directly.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D44295190

fbshipit-source-id: bd784e2c514301d45d0bacd8ee6de5c512fc565c
2023-04-11 15:57:12 +01:00
Nick Gerleman ab822c41f1 Minimize EditText Spans 6/9: letterSpacing (#36548)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36548

This is part of a series of changes to minimize the number of spans committed to EditText, as a mitigation for platform issues on Samsung devices. See this [GitHub thread]( https://github.com/facebook/react-native/issues/35936#issuecomment-1411437789) for greater context on the platform behavior.

This change lets us set `letterSpacing` on the EditText instead of using our custom span.

Changelog:
[Android][Fixed] - Minimize EditText Spans 6/N: letterSpacing

Reviewed By: rshest

Differential Revision: D44240777

fbshipit-source-id: 9bd10c3261257037d8cacf37971011aaa94d1a77
2023-04-11 15:57:12 +01:00
Nick Gerleman f1c33b9e15 Minimize EditText Spans 5/9: Strikethrough and Underline (#36544)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36544

This is part of a series of changes to minimize the number of spans committed to EditText, as a mitigation for platform issues on Samsung devices. See this [GitHub thread]( https://github.com/facebook/react-native/issues/35936#issuecomment-1411437789) for greater context on the platform behavior.

This change makes us apply strikethrough and underline as paint flags to the underlying EditText, instead of just the spans. We then opt ReactUnderlineSpan and ReactStrikethroughSpan into being strippable.

This does actually create visual behavior changes, where child text will inherit any underline or strikethrough of the root EditText (including if the child specifies `textDecorationLine: "none"`. The new behavior is consistent with both iOS and web though, so it seems like more of a bugfix than a regression.

Changelog:
[Android][Fixed] - Minimize Spans 5/N: Strikethrough and Underline

Reviewed By: rshest

Differential Revision: D44240778

fbshipit-source-id: d564dfc0121057a5e3b09bb71b8f5662e28be17e
2023-04-11 15:57:07 +01:00
Nick Gerleman 205623cbe8 Minimize EditText Spans 4/9: ReactForegroundColorSpan (#36545)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36545

This is part of a series of changes to minimize the number of spans committed to EditText, as a mitigation for platform issues on Samsung devices. See this [GitHub thread]( https://github.com/facebook/react-native/issues/35936#issuecomment-1411437789) for greater context on the platform behavior.

This adds ReactForegroundColorSpan to the list of spans eligible to be stripped.

Changelog:
[Android][Fixed] - Minimize Spans 4/N: ReactForegroundColorSpan

Reviewed By: javache

Differential Revision: D44240780

fbshipit-source-id: d86939cc2d7ed9116a4167026c7d48928fc51757
2023-04-11 15:57:07 +01:00