Skip to content

Commit

Permalink
Fix avoid forcing podspec versions (#35274)
Browse files Browse the repository at this point in the history
Summary:
This is a backport of [this](becb47c) 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: #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
  • Loading branch information
Riccardo Cipolleschi authored and kelset committed Nov 22, 2022
1 parent e809e4b commit 78c8e49
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
24 changes: 12 additions & 12 deletions scripts/cocoapods/__tests__/codegen_utils-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -458,16 +458,16 @@ def get_podspec_no_fabric_no_script
].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
Expand All @@ -476,8 +476,8 @@ def get_podspec_fabric_and_script_phases(script_phases)
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
Expand Down
24 changes: 12 additions & 12 deletions scripts/cocoapods/codegen_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,22 @@ def get_react_codegen_spec(package_json_file, folly_version: '2021.07.22.00', fa
].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

Expand All @@ -123,7 +123,7 @@ def get_react_codegen_spec(package_json_file, folly_version: '2021.07.22.00', fa
});
else
spec[:'dependencies'].merge!({
'React-jsc': [version],
'React-jsc': [],
});
end

Expand Down

0 comments on commit 78c8e49

Please sign in to comment.