From 78c8e49d0a3f20e1fb2cf9bcebef3ed822518784 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Mon, 14 Nov 2022 08:31:30 -0800 Subject: [PATCH] Fix avoid forcing podspec versions (#35274) Summary: This is a backport of [this](https://github.com/facebook/react-native/commit/becb47ccb6a6ed77e81b5488561ef6d683933ffe) local fix we made on 0.71-stable. All our podspecs delegates to the main React Native pods script to set up the dependencies properly. The React-Codegen.podspec, which is generated by the script itself, was generated with hardcoded dependencies. This PR aligns the versioning with the other podspec. On a side note, this could create issues in CI and when releaseing, because we are changing the versions to prepare the new release and it breaks some steps. ## Changelog [iOS] [Fixed] - Make sure that the React-Codegen.podspec does not enforce specific versions of its dependencies. Pull Request resolved: https://github.com/facebook/react-native/pull/35274 Test Plan: 1. Ruby tests are passing 2. Manually tested that pods are correctly installed in the following configurations - RNTester - Hermes - Old Architecture - RNTester - Hermes - New Architecture - RNTester - JSC - Old Architecture - RNTester - JSC - New Architecture Reviewed By: christophpurrer Differential Revision: D41153859 Pulled By: cipolleschi fbshipit-source-id: 043513866a66ecca3e326f8671bea3ec576422de # Conflicts: # scripts/cocoapods/codegen_utils.rb --- .../cocoapods/__tests__/codegen_utils-test.rb | 24 +++++++++---------- scripts/cocoapods/codegen_utils.rb | 24 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/scripts/cocoapods/__tests__/codegen_utils-test.rb b/scripts/cocoapods/__tests__/codegen_utils-test.rb index 989b7e87857..35f732efac6 100644 --- a/scripts/cocoapods/__tests__/codegen_utils-test.rb +++ b/scripts/cocoapods/__tests__/codegen_utils-test.rb @@ -458,16 +458,16 @@ class CodegenUtilsTests < Test::Unit::TestCase ].join(' ') }, 'dependencies': { - "FBReactNativeSpec": ["99.98.97"], - "React-jsiexecutor": ["99.98.97"], - "RCT-Folly": ["2021.07.22.00"], - "RCTRequired": ["99.98.97"], - "RCTTypeSafety": ["99.98.97"], - "React-Core": ["99.98.97"], - "React-jsi": ["99.98.97"], - "hermes-engine": ["99.98.97"], - "ReactCommon/turbomodule/bridging": ["99.98.97"], - "ReactCommon/turbomodule/core": ["99.98.97"] + "FBReactNativeSpec": [], + "React-jsiexecutor": [], + "RCT-Folly": [], + "RCTRequired": [], + "RCTTypeSafety": [], + "React-Core": [], + "React-jsi": [], + "hermes-engine": [], + "ReactCommon/turbomodule/bridging": [], + "ReactCommon/turbomodule/core": [] } } end @@ -476,8 +476,8 @@ class CodegenUtilsTests < Test::Unit::TestCase specs = get_podspec_no_fabric_no_script() specs[:dependencies].merge!({ - 'React-graphics': ["99.98.97"], - 'React-rncore': ["99.98.97"], + 'React-graphics': [], + 'React-rncore': [], }) specs[:'script_phases'] = script_phases diff --git a/scripts/cocoapods/codegen_utils.rb b/scripts/cocoapods/codegen_utils.rb index 9caff0c74c3..14fc35c602c 100644 --- a/scripts/cocoapods/codegen_utils.rb +++ b/scripts/cocoapods/codegen_utils.rb @@ -98,22 +98,22 @@ class CodegenUtils ].join(' ') }, 'dependencies': { - "FBReactNativeSpec": [version], - "React-jsiexecutor": [version], - "RCT-Folly": [folly_version], - "RCTRequired": [version], - "RCTTypeSafety": [version], - "React-Core": [version], - "React-jsi": [version], - "ReactCommon/turbomodule/bridging": [version], - "ReactCommon/turbomodule/core": [version] + "FBReactNativeSpec": [], + "React-jsiexecutor": [], + "RCT-Folly": [], + "RCTRequired": [], + "RCTTypeSafety": [], + "React-Core": [], + "React-jsi": [], + "ReactCommon/turbomodule/bridging": [], + "ReactCommon/turbomodule/core": [] } } if fabric_enabled spec[:'dependencies'].merge!({ - 'React-graphics': [version], - 'React-rncore': [version], + 'React-graphics': [], + 'React-rncore': [], }); end @@ -123,7 +123,7 @@ class CodegenUtils }); else spec[:'dependencies'].merge!({ - 'React-jsc': [version], + 'React-jsc': [], }); end