Commit Graph
32141 Commits
Author SHA1 Message Date
Nicola Corti d94d447777 [LOCAL] Manual cherry-pick of 28597168aa 2024-08-15 10:31:39 +01:00
Nicola Corti 41b188b7e6 [LOCAL] Fix further compilation error introduced by cherry-pick conflicts 2024-08-15 10:29:13 +01:00
Nicola Corti a3187bb5d9 [LOCAL] Fix compilation error introduced by cherry-pick conflicts 2024-08-15 08:53:45 +01:00
Nicola Corti f202e80177 [LOCAL] Bump Hermes version 2024-08-15 08:20:44 +01:00
Nick GerlemanandNicola Corti 8c4f240c9b Gate off % border radii on Android Paper (#45945)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45945

This code is forked on iOS, where we have been, as a policy, avoiding Paper-specific changes. This code is shared between renderers on Android, but it is confusing developer experience to have it work on Android Paper, to then fail on iOS unless it is on new arch.

This change disables support on Android Paper for consistency.

Changelog:
[Android][Removed] - Gate off % border radii on Android Paper

Reviewed By: cortinico

Differential Revision: D60967347

fbshipit-source-id: 1d26bc71aee677aa9a0dc9bb38f781a99c7762a8
2024-08-15 08:16:04 +01:00
Nick GerlemanandNicola Corti b64f5498f6 Gate off % translate on Android Paper (#45946)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45946

This code is forked on iOS, where we have been, as a policy, avoiding Paper-specific changes. This code is shared between renderers on Android, but it is confusing developer experience to have it work on Android Paper, to then fail on iOS unless it is on new arch.

This change disables support on Android Paper for consistency.

Changelog:
[Android][Removed] - Gate off % translate on Android Paper

Reviewed By: joevilches

Differential Revision: D60970266

fbshipit-source-id: 5df73b948464f5093941528b0af2e694827a9460
2024-08-15 08:11:45 +01:00
Nicola Corti efe8a5e85a [LOCAL] Update Podfile.lock
Changelog: [Internal]
2024-08-15 08:09:22 +01:00
React Native Bot 89cdc14c8b Release 0.75.0
#publish-packages-to-npm&latest
v0.75.0
2024-08-14 14:54:23 +00:00
Blake FriedmanandRiccardo Cipolleschi 9120cd30f2 Move init deprecation notice 30 Sept → 31 Dec (#45590)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45590

This gives us more wiggle room with the release of 0.76.

Changelog: [General][Changed] Move init deprecation notice 30 Sept → 31 Dec

Reviewed By: cortinico

Differential Revision: D60105868

fbshipit-source-id: d03fcf5d4a97db9b21792eff6f993e2671b276ef
2024-08-14 14:30:23 +01:00
Gabriel DonadelandRiccardo Cipolleschi 34c91036e1 Add shared-testutil folder to NPM files to be published (#45936)
Summary:
React-native 0.75 RC7 gradle sync is currently broken due to the fact that the `shared-testutil` folder is missing from the `react-native/gradle-plugin` npm package

## Changelog:

[INTERNAL] [ADDED] - Add shared-testutil folder to NPM files to be published

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D60969631

Pulled By: cortinico

fbshipit-source-id: 850edfe0cf6b0e8174a1df9ea962d207d2ce0112
2024-08-14 14:29:29 +01:00
Nicola CortiandGitHub 82ddf5d532 [LOCAL] Bump Node on CircleCI to 18.18 to fix red signal (#45894) 2024-08-07 14:16:38 +01:00
React Native Bot 7244893b12 Release 0.75.0-rc.7
#publish-packages-to-npm&next
v0.75.0-rc.7
2024-08-06 11:16:54 +00:00
Nicola Corti b0662b3c33 [LOCAL] All librrc_textinput.so to NdkConfiguratorUtils.configureNewArchPackagingOptions 2024-08-06 11:44:06 +01:00
Riccardo Cipolleschi 6250409a62 [LOCAL] Bump Podfile.lock 2024-08-06 10:18:46 +01:00
szymonrybczakandRiccardo Cipolleschi b62bfcd561 feat: update CLI to 14.0.0 (#45540)
Summary:
Update to stable version of `react-native-community/cli`.

[GENERAL] [CHANGED] - Upgrade `react-native-community/cli` to `13.6.9`

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

Test Plan: n/a

Reviewed By: blakef

Differential Revision: D59960021

Pulled By: cortinico

fbshipit-source-id: 9d470699cdd2d20e08e844c92c7982056aec082c
2024-08-05 13:25:56 +01:00
React Native Bot 7e98cdba8a Release 0.75.0-rc.6
#publish-packages-to-npm&next
v0.75.0-rc.6
2024-07-29 16:54:09 +00:00
Nicola Corti 51156fd3b2 [LOCAL] Fix broken build of RNGP due to complex cherry-pick 2024-07-29 15:40:56 +01:00
Nicola CortiandGitHub c8cb3d4a59 [0.75] Fix core autolinking not working on Windows (#45796) 2024-07-29 14:43:00 +01:00
Riccardo CipolleschiandGitHub 011118fe13 [LOCAL][RN] Revert React from 19Rc to 18.3.1 (#45779)
* Revert ReacRevert React from 19 to 18.3.1 due to React 19 not being out as stable

\## Changelog
[General][Changed] - Revert from React 19 RC to React 18.3.1

* Revert from React 19 RC to React 18.3.1

\## Changelog
[General][Changed] - Revert from React 19RC to React 18.3.1

* Fix ruby tests
2024-07-29 14:36:44 +01:00
Gabriel DonadelandRiccardo Cipolleschi 88f2a24b5d RNGP - Filter out null dependencies from getGradleDependenciesToApply (#45749)
Summary:
`getGradleDependenciesToApply` tries to call `implementation:` in all libraries, including the ones that are not supported on Android.

## Changelog:

[INTERNAL] [FIXED] - Filter out platform-specific libraries from the auto-linking gradle plugin

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

Test Plan: CI should be green

Reviewed By: cipolleschi

Differential Revision: D60374769

Pulled By: cortinico

fbshipit-source-id: 33c83e9cc39d81b0e5c497570a936831ebb345f9
2024-07-29 14:25:38 +01:00
Jakub PiaseckiandGitHub ea8ad6457c [LOCAL] Make rrc_textinput on Android a shared library (#45592) 2024-07-29 14:24:49 +01:00
CHEN Xian-anandRiccardo Cipolleschi e39e9c4a60 Not all the targets have a defined symbol_type (#45591)
Summary:
Errors occurred on running `pod install`:

```
[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `symbol_type' for #<Xcodeproj::Project::Object::PBXAggregateTarget:0x000000010f6ea568>

[redact]/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:53:in `block in get_application_targets'
```

## Changelog:

[iOS] [Fixed] - Fix error on handling privacy manifest

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

Reviewed By: cipolleschi

Differential Revision: D60107607

Pulled By: dmytrorykun

fbshipit-source-id: 316220fe54174b18c9b61775f807d5d05d9f0240
2024-07-29 14:20:57 +01:00
Riccardo Cipolleschi 9fac7bdc43 Revert "Release 0.75.0-rc.6"
Changelog:
[Internal] - Revert release commit
2024-07-29 14:15:02 +01:00
React Native Bot a36476395a Release 0.75.0-rc.6
#publish-packages-to-npm&next
2024-07-22 16:55:20 +00:00
Riccardo Cipolleschi a91b9bff5d [LOCAL][RN][Release] Test Debug APK rather than Release APK 2024-07-22 14:41:11 +01:00
Riccardo CipolleschiandGitHub 9594d36d4a [LOCAL][RN][Release] Add logging to E2E test script (#45532) 2024-07-22 14:32:18 +01:00
szymonrybczakandRiccardo Cipolleschi 5189e457a4 feat: update CLI to 14.0.0 (#45540)
Summary:
Update to stable version of `react-native-community/cli`.

[GENERAL] [CHANGED] - Upgrade `react-native-community/cli` to `13.6.9`

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

Test Plan: n/a

Reviewed By: blakef

Differential Revision: D59960021

Pulled By: cortinico

fbshipit-source-id: 9d470699cdd2d20e08e844c92c7982056aec082c
2024-07-22 14:31:43 +01:00
Gabriel DonadelandRiccardo Cipolleschi 88276c51ad Restore CLI_PATH variable in react-native-xcode script (#45560)
Summary:
When changing the `react-native-xcode.sh` logic to use the helloworld cli on https://github.com/facebook/react-native/pull/44721, the `CLI_PATH` env var was removed along with `BUNDLE_COMMAND`. Both of these values were used by Expo to override the default CLI and use our custom bundling command.

https://github.com/expo/expo/blob/10e302ee13add0e24a08c7ee792c2da50ace95a6/templates/expo-template-bare-minimum/ios/HelloWorld.xcodeproj/project.pbxproj#L215C4-L215C15

This restores the `CLI_PATH` variable and set the default value as `"$REACT_NATIVE_DIR/scripts/bundle.js"`, along with the `BUNDLE_COMMAND` variable. With this Expo and other frameworks can keep the ability to easily replace the internal CLI

## Changelog:

[INTERNAL] [CHANGED] - Restore CLI_PATH variable in react-native-xcode script

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

Test Plan: Project compiles correctly on iOS

Reviewed By: robhogan

Differential Revision: D60035338

Pulled By: blakef

fbshipit-source-id: 26583d11d9f573f7cfa405b68e0cc3304c3601df
2024-07-22 14:28:35 +01:00
Douglas LowderandRiccardo Cipolleschi 72a38aace2 fix: Remove setting of process.exitCode that breaks Jest tests (#45562)
Summary:
In Node 20, the script to run unit tests in CI (`scripts/run-ci-javascript-tests.js`) will fail, even when all the Jest tests pass. This happens because one of the JS modules being tested is setting `process.exitCode` (see https://github.com/jestjs/jest/issues/9324#issuecomment-1808090455).

Changes:

- Modified the affected module to throw an exception when failing, instead of setting the exit code
- Adjusted the unit test for that module

## Changelog:

[General] [Fixed] - Remove setting of process.exitCode that breaks Jest tests

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

Test Plan:
Before this change, running `node scripts/run-ci-javascript-tests.js` would fail with Node 20.
After this change, it succeeds.

Reviewed By: blakef

Differential Revision: D60033582

Pulled By: cipolleschi

fbshipit-source-id: 71b7f4495d414e719a9bd2d892bd1bc3045ddd5d
2024-07-22 14:28:05 +01:00
nik910andRiccardo Cipolleschi d4b3fc9ed8 Adding space to $(inherited) string to avoid merging of inherited and… (#45520)
Summary:
Added space to $(inherited) string to avoid creation of wrong cpp flags in RCTAppDelegate podspec

<img width="1157" alt="Screenshot 2024-07-18 at 8 51 19 PM" src="https://github.com/user-attachments/assets/29d32d08-e81f-4c25-b8ee-5dccc0f620ea">

## Changelog:

[IOS] [FIXED] - Building of iOS project when RCTAppDelegate is used in the project

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

Test Plan: To test this you can simply change in your node modules and run pod install, the build will now work successfully

Reviewed By: cipolleschi

Differential Revision: D59950906

Pulled By: arushikesarwani94

fbshipit-source-id: 0d58620aa0be7ac4fcbcd309f06df0eef7844016
2024-07-22 14:27:38 +01:00
Riccardo Cipolleschi 9ec4af86a7 Fix path to node in .xcode.env.local (#43333)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43333

This change fixes https://github.com/facebook/react-native/issues/43285.
Basically, when using a `yarn` alias to install pods, yarn creates a copy of the `node` and `yarn` executables and the `command -v node` command will return the path to that executable.

## Changelog
[iOS][Fixed] - Do not use temporary node when creating the .xcode.env.local

Reviewed By: dmytrorykun

Differential Revision: D54542774

fbshipit-source-id: 3ab0d0bb441988026feff9d5390dcfd10869a1b5
2024-07-22 14:27:09 +01:00
Nicola CortiandRiccardo Cipolleschi 648520be32 Add react-native.config.js to autolinking lockfiles (#45511)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45511

This adds react-native.config.js to autolinking default lockfiles
so autolinking can account for changes in that file.

Changelog:
[Internal] [Changed] - Add react-native.config.js to autolinking lockfiles

Reviewed By: blakef

Differential Revision: D59907268

fbshipit-source-id: d5893a3f7b4d5d9f6c6c13042aa6866ad16b2ea4
2024-07-22 14:26:50 +01:00
Blake FriedmanandRiccardo Cipolleschi 53e62de9c7 always proxy to @react-native-community/cli (#45464)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45464

Previous work would cause versions >= react-native 0.76 to exit if called through `npx react-native <cmd>`. This was intended to be full deprecated and removed.  The intention was to shift users to calling react-native-community/cli directly.

This change allows commands to be proxied to react-native-community/cli but with no guarantees of success.  It's up to each framework / project to explicitly create that dependency.

This also  provides warnings, which won't go away, suggesting the supported method of calling the community CLI directly.

The outcome is that we're not going to break existing workflows.

closes: #45461

Changelog: [General][Fixed] allow proxying commands from react-native to react-native-community/cli with explicit warning

Reviewed By: cortinico

Differential Revision: D59805357

fbshipit-source-id: 21e23b082a9c709effa050d8e7dd04a40f5ab0e6
2024-07-22 14:26:27 +01:00
Nicola CortiandRiccardo Cipolleschi c75ec15b48 Unbreak RNTester instacrashing on main (#45467)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45467

This unbreaks RNTester instacrashing on main.

Changelog:
[Internal] [Changed] - Unbreak RNTester instacrashing on main

Reviewed By: javache

Differential Revision: D59806826

fbshipit-source-id: 6d5246cd02e2c364068d047b973b2954b459df1e
2024-07-22 14:25:53 +01:00
Blake FriedmanandRiccardo Cipolleschi 4f6f0a19cf publish template on publishing release (#45327)
Summary:
Call the react-native-community/template GHA to trigger a new release when we publish a react-native release. This then waits to confirm that the package is published.

See react-native-community/template#36 for the matching change

Changelog: [General][Added] trigger template publish

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

Test Plan: Not sure on the best way forward here.

Reviewed By: cipolleschi

Differential Revision: D59467829

Pulled By: blakef

fbshipit-source-id: 091269e7ecdae5801ac7c03a1ede54452ae99b24
2024-07-22 14:25:19 +01:00
Blake Friedman 7d0ec89498 Update Podfile.lock
Changelog: [Internal]
2024-07-16 15:12:22 +01:00
React Native Bot 46b269dd46 Release 0.75.0-rc.5
#publish-packages-to-npm&next
v0.75.0-rc.5
2024-07-15 17:06:25 +00:00
Riccardo Cipolleschi 0e56bce6ba [LOCAL] Fix React-perflogger.podspec conflict 2024-07-15 16:24:47 +02:00
Riccardo CipolleschiandBlake Friedman d0c94d6de1 Factor out the CXX language standard in a separate const (#45374)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45374

This change factors out the language standard in a separate constant so we can easily control it from a single place.

There are only 2 exception to this:
1. hermes-engine: the podspec is used in CI and it has no access to the rct_cxx_language_standard variable
2. Yoga: it can be used as a separate pod, outside of React Native, so it makes sense to leave it alone.

This change also fixes a problem where, in some setup, the language was set to C++14

[Internal] - Refactor Cxx language standard in a single constant

Reviewed By: dmytrorykun, blakef

Differential Revision: D59629061

fbshipit-source-id: 41eac64e47c14e239d8ee78bd88ea30af244d695
2024-07-15 14:45:14 +01:00
Riccardo CipolleschiandBlake Friedman 28d171993e Make sure to pass the BridgeProxy to view managers in the interop layer (#45329)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45329

Thanks to [#45232](https://github.com/facebook/react-native/issues/45232) we found a bug in the interop layer, where we were not passing the BridgeProxy in bridgeless mode to the view managers.

This Change should fix that issue.

## Changelog:
[iOS][Fixed] - Make sure to pass the RCTBridgeProxy to  ViewManagers

Reviewed By: dmytrorykun

Differential Revision: D59468292

fbshipit-source-id: 00666be21385a735878eb567c4b8a0986c609c5f
2024-07-15 14:43:48 +01:00
Nick GerlemanandBlake Friedman 7484e72210 Fix "Platform.constants.reactNativeVersion.prerelease" Flow and TypeScript types (#45256)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45256

The actual stamped versions here are all strings.

Android interface for constants is untyped, and we always return a string here. iOS, we will try to parse the string into a double, which will fail for every prerelease version RN has ever published.

Platform on Windows seems to uniquely be doing the right thing.

Changelog:
[General][Fixed] - Fix Platform.constants.reactNativeVersion type

Reviewed By: robhogan, necolas

Differential Revision: D59141948

fbshipit-source-id: 9c758e5eb8796b03197258d87ec06b31018e211c
2024-07-15 14:43:12 +01:00
Wojciech LewickiandBlake Friedman 58bbbff4d7 feat: expose prefabs for newly added targets (#45386)
Summary:
In recent commits, some new targets have been added, and they are not exposed as prefabs, yet are used in e.g. `TextLayoutManager`. They are needed then for `react-native-live-markdown`: https://github.com/Expensify/react-native-live-markdown/pull/428/commits/c1611cd98ed5009fd66c871b9999b55941086af0

## 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
-->

[ANDROID] [ADDED] - expose prefabs for newly added targets

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

Test Plan: It cannot be tested inside the repo, but try to build the `example` app with new arch enabled on `Android` in the `react-native-live-markdown` repo to see that those are needed.

Reviewed By: NickGerleman

Differential Revision: D59638801

Pulled By: cortinico

fbshipit-source-id: 3d09507d72a0c4d3dbb3a2a81b753625230a04a3
2024-07-15 14:37:59 +01:00
Nicola CortiandBlake Friedman c45d450502 Upstream CLI autolinking changes to RNGP (#45314)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45314

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

I'm ustreaming two changes that happened inside the CLI/Autolinking logic that are
missing inside core autolinking.

Changelog:
[Internal] [Changed] - Upstream CLI autolinking changes to RNGP

Reviewed By: blakef

Differential Revision: D59460504

fbshipit-source-id: a6e7ab6a46fec26620dc965e77b13fdeba84fae3
2024-07-15 14:37:29 +01:00
Miklós FazekasandBlake Friedman e1d97f4621 fix: android autolinkLibrariesFromCommand should handle timeout or non zero exit code (#45333)
Summary:
Fixes: https://github.com/facebook/react-native/issues/45307

## Changelog:

[Android] [Fixed] - if `npx react-native-community/cli config` fails or timeouts proper error is shown and built is aborted, instead of leaving and empty autolinking.json

During build `npx react-native-community/cli config` is generated into autolinking.json. When command fails, we should error and should not leave and empty `autolinking.json`

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

Test Plan:
Output of the reproducer in https://github.com/facebook/react-native/issues/45307 looks like this:

```log
android % ./gradlew assembleDebug
Starting a Gradle Daemon (subsequent builds will be faster)
ERROR: autolinkLibrariesFromCommand: Failed to create /Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/android/build/generated/autolinking/autolinking.json - process npx react-native-community/cli config  exited with error code: 126

FAILURE: Build failed with an exception.

* Where:
Settings file '/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/android/settings.gradle' line: 3

* What went wrong:
A problem occurred evaluating settings 'android'.
> ERROR: autolinkLibrariesFromCommand: Failed to create /Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/android/build/generated/autolinking/autolinking.json - process npx react-native-community/cli config  exited with error code: 126

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 10s
8 actionable tasks: 4 executed, 4 up-to-date
```

Output if you modify the package.json to be invalid looks like this:

```log
android % ./gradlew assembleDebug
ERROR: autolinkLibrariesFromCommand: process npx react-native-community/cli config  exited with error code: 1
JSONError: JSON Error in /Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/package.json:

  35 |     "node": ">=18"
  36 |   },
> 37 |   SOMETHING_NON_JSON
     |   ^
  38 |   "packageManager": "yarn@3.6.4",
  39 |   "resolutions": {
  40 |     "rtn-centered-text": "portal:../RTNCenteredText"

Unexpected token "S" (0x53) in JSON at position 1019 while parsing near "...ode\": \">=18\"\n  },\n  SOMETHING_NON_JSON\n ..."

  35 |     "node": ">=18"
  36 |   },
> 37 |   SOMETHING_NON_JSON
     |   ^
  38 |   "packageManager": "yarn@3.6.4",
  39 |   "resolutions": {
  40 |     "rtn-centered-text": "portal:../RTNCenteredText"

    at parseJson (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/parse-json/index.js:29:21)
    at loadJson (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/loaders.js:48:16)
    at #loadConfiguration (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/ExplorerSync.js:116:36)
    at #loadConfigFileWithImports (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/ExplorerSync.js:87:54)
    at #readConfiguration (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/ExplorerSync.js:84:82)
    at search (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/ExplorerSync.js:50:63)
    at emplace (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/util.js:36:20)
    at ExplorerSync.search (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/ExplorerSync.js:78:42)
    at getUserDefinedOptionsFromMetaConfig (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/index.js:32:37)
    at mergeOptionsBase (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/index.js:60:31)

FAILURE: Build failed with an exception.

* Where:
Settings file '/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/android/settings.gradle' line: 3

* What went wrong:
A problem occurred evaluating settings 'android'.
> ERROR: autolinkLibrariesFromCommand: process npx react-native-community/cli config  exited with error code: 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 2s
8 actionable tasks: 4 executed, 4 up-to-date
```

Reviewed By: cipolleschi

Differential Revision: D59582430

Pulled By: cortinico

fbshipit-source-id: bedb9563175cc5c46f5af80cf309769e56b803cc
2024-07-15 14:36:58 +01:00
Blake Friedman f303bcaaa5 fix: ios Helloworld assumes community cli is present (#45221)
Summary:
Use the hard-coded config for Helloworld instead of assuming the community cli is there to generate a config, which we can no longer assume.

Changelog: [Internal]

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

Test Plan:
This works in my local environment:
```
bundle exec pod install
```
and
```
./gradlew generateAutolinkingPackageList
```
Changelog: [Internal]

Reviewed By: javache

Differential Revision: D59162715

Pulled By: blakef

fbshipit-source-id: 95ff2c3929f12ee0ecf468cb80d2df1281eb746e
2024-07-15 14:36:49 +01:00
Miklós FazekasandBlake Friedman 2e06efbf5d Allow library podspec to declare Swift Package Manager dependencies (#44627)
Summary:
React-Native uses Cocapods for native dependency management on iOS. While CocoaPods is flexible and popular, Apple's Swift Package Manager is the new standard. Currently consuming packages available only via Swift Package Manager is not possible. This change implements a single extension so .podspec files can declare Swift Package Manager dependencies via
```ruby
ReactNativePodsUtils.spm_dependency(s,
     url: 'https://github.com/apple/swift-atomics.git',
     requirement: {kind: 'upToNextMajorVersion', minimumVersion: '1.1.0'},
     products: ['Atomics']
   )
```

bypass-github-export-checks

## Changelog:

[IOS] [ADDED] - libraries can now declare Swift Package Manager dependencies in their .podspec with `ReactNativePodsUtils.spm_dependency`

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

Test Plan:
https://github.com/mfazekas/rn-spm-rfc-poc/

Is a simple demo for the feature:

1. Podspec declare dependency with:

   ```ruby
   if const_defined?(:ReactNativePodsUtils) && ReactNativePodsUtils.respond_to?(:spm_dependency)
     ReactNativePodsUtils.spm_dependency(s,
       url: 'https://github.com/apple/swift-atomics.git',
       requirement: {kind: 'upToNextMajorVersion', minimumVersion: '1.1.0'},
       products: ['Atomics']
     )
   else
     raise "Please upgrade React Native to >=0.75.0 to use SPM dependencies."
   end
   ```

2. [`import Atomics`](https://github.com/mfazekas/rn-spm-rfc-poc/blob/e4eb1034f7498dedee4cb673d327c34a6048bda2/ios/MultiplyInSwift.swift#L1C2-L1C15) and [`ManagedAtomic`](https://github.com/mfazekas/rn-spm-rfc-poc/blob/e4eb1034f7498dedee4cb673d327c34a6048bda2/ios/MultiplyInSwift.swift#L7-L13) is used in the code

3.) `spm_dependency` causes the dependency to be added via `post_install` hook in the workspace

<img width="261" alt="image" src="https://github.com/facebook/react-native/assets/52435/ad6aee1c-ac88-4c84-8aa3-50e148c4f5b2">

4.) `spm_dependecy` causes the library to be linked with `Atomics` library

<img width="817" alt="image" src="https://github.com/facebook/react-native/assets/52435/bfc8dfc0-aeb7-4c75-acbd-937eab1cbf80">

Limitations:
1.) only works `USE_FRAMEWORKS=dynamic pod install` otherwise the linker fails [with known Xcode issue - duplicate link issue](https://forums.swift.org/t/objc-flag-causes-duplicate-symbols-with-swift-packages/27926)
2.) .xcworkspace needs to be reopened after `pod install` - this could be worked around by not removing/readding spm dependencies

### See also:

https://github.com/react-native-community/discussions-and-proposals/issues/587#issuecomment-2117025448
https://github.com/react-native-community/discussions-and-proposals/pull/787

Reviewed By: cortinico

Differential Revision: D58947066

Pulled By: cipolleschi

fbshipit-source-id: ae3bf955cd36a02cc78472595fa003cc9e843dd5
2024-07-15 14:36:12 +01:00
IrfanwaniandBlake Friedman 4cec121a7b fix: post install error in iOS after running pod install, undefined method 'path' for nil:NilClass (#45095)
Summary:
After upgrading my project to the latest version of react native i.e, 0.74.2, i was getting an error when running `pod install` an the error was coming from the post install hook. Going deeper into the file tree, i found that some of the things are Nil and react native is trying to use some methods on them, so fixed those issues by using chaining operators to conditionally apply the path method on them.

## Changelog:

[Internal] - fixes the post install issue when running pod install with react native version, 0.74.2

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

Test Plan: Manually tested the fix. Works perfectly fine in both debug and production mode.

Reviewed By: cortinico

Differential Revision: D58863666

Pulled By: cipolleschi

fbshipit-source-id: 64459711dcf926b7544b99b542e9861c1c0f05ca
2024-07-15 14:35:49 +01:00
Rubén NorteandBlake Friedman 95fa0dcdc8 Fix broken CI due to missing dependencies
Summary:
https://github.com/facebook/react-native/pull/45409 broke CI because it didn't set up dependencies correctly. This should fix it.

Changelog: [internal]

Reviewed By: cipolleschi

Differential Revision: D59751194
2024-07-15 14:35:16 +01:00
Rubén NorteandBlake Friedman 58a525aa2f Replace BridgelessJSCallInvoker with RuntimeSchedulerCallInvoker everywhere (#45409)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45409

Changelog: [internal]

This removes `BridgelessJSCallInvoker` in favor of `RuntimeSchedulerCallInvoker`. This change should be transparent when not invoking JS callbacks using priorities, as both of them would just go directly to the scheduler using `scheduleWork`, but when priorities are specified, they'd now be honored in `RuntimeSchedulerCallInvoker`.

I realized this wasn't being used when I saw that `PerformanceObserver` callbacks were always scheduled with the highest priority, instead of with idle priority as specified in code.

Reviewed By: sammy-SC

Differential Revision: D59679512

fbshipit-source-id: 51d36d56ef1ff0b34e5157ed7b5e08de0a3884d2
2024-07-15 14:34:06 +01:00
Rubén NorteandBlake Friedman 2373a0003a Fix incorrect application of idle priority in RuntimeScheduler (#45408)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45408

Changelog: [General][Fixed] Fixed prioritization of idle priority tasks

We recently found out that idle priority tasks were never scheduled with the lowest priority possible. We didn't realize before because idle priority tasks weren't used, but now they are via `requestIdleCallback` and other mechanisms.

The problem was that the timeout for idle priority tasks was `std::chrono:milliseconds::max()`, and we compute the expiration time adding that to the current time. Doing that operation is always guaranteed to overflow, and the resulting expiration time was always in the past, resulting in the task having higher priority than any other tasks with any other priorities.

Instead of using `max()` we can just use a sensible value for idle priorities. In this case, 5 minutes should be more than enough.

Reviewed By: sammy-SC

Differential Revision: D59679513

fbshipit-source-id: 6c0f9e275818737ce804f05615c01f7ea6c126ab
2024-07-15 14:33:38 +01:00