react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Cocoapod scripts add hermes dependency even when JSC is used

Open anta-semenov opened this issue 2 months ago • 3 comments

Description

When running pod install with community JSC and disable hermes, ccoapods trying to add hermes as dependency anyway.

Looks like this lines https://github.com/facebook/react-native/blob/851d59a620a391c60f19e91c01546e5fad58de32/packages/react-native/scripts/cocoapods/utils.rb#L642-L643 should be moved under if ENV['USE_THIRD_PARTY_JSC'] != '1' condition

Steps to reproduce

cd ReproducerApp yarn cd ios bundle install bundle exec pod install

React Native Version

0.82.1

Affected Platforms

Build - MacOS

Output of npx @react-native-community/cli info

System:
  OS: macOS 15.5
  CPU: (8) arm64 Apple M1 Pro
  Memory: 155.89 MB / 16.00 GB
  Shell:
    version: 3.2.57
    path: /bin/bash
Binaries:
  Node:
    version: 22.11.0
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.19
    path: /usr/local/bin/yarn
  npm:
    version: 10.9.0
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.12.02.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/anton/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23726.103.2422.12816248
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby:
    version: 3.3.6
    path: /Users/anton/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false // don't now why it shows false, it's 0.82.1 version which should have only new arch

Stacktrace or Logs

Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `fast_float` from `../node_modules/react-native/third-party-podspecs/fast_float.podspec`
Fetching podspec for `fmt` from `../node_modules/react-native/third-party-podspecs/fmt.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`
[Hermes] Using release tarball from URL: https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.82.1/react-native-artifacts-0.82.1-hermes-ios-debug.tar.gz

MANDATORY Reproducer

https://github.com/anta-semenov/react-native-circular-dependencies

Screenshots and Videos

No response

anta-semenov avatar Oct 24 '25 17:10 anta-semenov

@anta-semenov did you manage to make it work with a patch or something?

tux2nicolae avatar Nov 23 '25 15:11 tux2nicolae

@anta-semenov thanks for reporting this. Have you verified that by moving those lines to the if condition, the problem is fixed? If yes, could you submit a PR?

cipolleschi avatar Dec 09 '25 12:12 cipolleschi

We do have an app clip which has a hard size constraint, and this is a blocker for us in upgrading to 0.83.0, can someone help with a patch please?

tux2nicolae avatar Dec 15 '25 19:12 tux2nicolae