From 32dab7a63fd0795c3aaefa766aa9f818428ed2de Mon Sep 17 00:00:00 2001 From: Dmitry Rykun Date: Mon, 18 Dec 2023 09:37:54 -0800 Subject: [PATCH] Add the DoubleConversion dependency to third-party libraries (#41972) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41972 This diff adds the `DoubleConversion` dependency to the `install_modules_dependencies` function, that installs all the dependencies that third-party libraries might need. The libraries will need the `DoubleConversion` pod if they include the generated Fabric files. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D51848314 fbshipit-source-id: ae2ce022c6f51ce392852494c61e26ff810d30d0 --- .../scripts/cocoapods/__tests__/new_architecture-test.rb | 2 ++ packages/react-native/scripts/cocoapods/new_architecture.rb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb b/packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb index 0b5f77d9ee4667..b10ef21f145251 100644 --- a/packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb +++ b/packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb @@ -163,6 +163,7 @@ def test_installModulesDependencies_whenNewArchEnabledAndNewArchAndNoSearchPaths { :dependency_name => "React-debug" }, { :dependency_name => "React-ImageManager" }, { :dependency_name => "React-rendererdebug" }, + { :dependency_name => "DoubleConversion" }, { :dependency_name => "hermes-engine" } ]) end @@ -203,6 +204,7 @@ def test_installModulesDependencies_whenNewArchDisabledAndSearchPathsAndCompiler { :dependency_name => "React-debug" }, { :dependency_name => "React-ImageManager" }, { :dependency_name => "React-rendererdebug" }, + { :dependency_name => "DoubleConversion" }, { :dependency_name => "hermes-engine" } ] ) diff --git a/packages/react-native/scripts/cocoapods/new_architecture.rb b/packages/react-native/scripts/cocoapods/new_architecture.rb index 0d2aa46333d3f1..b3ae25ca988508 100644 --- a/packages/react-native/scripts/cocoapods/new_architecture.rb +++ b/packages/react-native/scripts/cocoapods/new_architecture.rb @@ -128,6 +128,8 @@ def self.install_modules_dependencies(spec, new_arch_enabled, folly_version) spec.dependency "React-debug" spec.dependency "React-ImageManager" spec.dependency "React-rendererdebug" + # This dependency is required for the cases when the pod includes generated sources, specifically Props.cpp. + spec.dependency "DoubleConversion" if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1" spec.dependency "hermes-engine"