Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Cocoapods for Xcode 14.3.0 #36759

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ references:
# Dependency Anchors
# -------------------------
dependency_versions:
xcode_version: &xcode_version "14.2.0"
xcode_version: &xcode_version "14.3.0"
nodelts_image: &nodelts_image "cimg/node:18.12.1"
nodeprevlts_image: &nodeprevlts_image "cimg/node:16.18.1"

Expand Down Expand Up @@ -620,7 +620,7 @@ jobs:
- run:
name: Run Ruby Tests
command: |
cd scripts
cd packages/react-native/scripts
sh run_ruby_tests.sh
- run_yarn
- *attach_hermes_workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
require_relative "./test_utils/CodegenScriptPhaseExtractorMock.rb"
require_relative "./test_utils/FileUtilsMock.rb"

# mocking the min_ios_version_supported function
# as it is not possible to require the original react_native_pod
# without incurring in circular deps
# TODO: move `min_ios_version_supported` to utils.rb
def min_ios_version_supported
return '12.4'
end

class CodegenUtilsTests < Test::Unit::TestCase
:base_path

Expand Down Expand Up @@ -527,7 +535,7 @@ def get_podspec_no_fabric_no_script
'source' => { :git => '' },
'header_mappings_dir' => './',
'platforms' => {
'ios' => '11.0',
'ios' => '12.4',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn’t it be also min_ios_version_supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it depends on the philosophy you adopt to write tests.
If you use min_ios_version_supported here, once we move the function to the proper file and we reuse the same function of production, this test would be tautological, as changing what the function in prod returns will also change what returned here.

Personally, I prefer to see my test failing if I bump a version in production code, so I can double check that the change was done on purpose and not by mistake. That's why I hardcoded the value.

Does it make sense?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting – makes sense!

},
'source_files' => "**/*.{h,mm,cpp}",
'pod_target_xcconfig' => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/scripts/cocoapods/codegen_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def get_react_codegen_spec(package_json_file, folly_version: '2021.07.22.00', fa
'source' => { :git => '' },
'header_mappings_dir' => './',
'platforms' => {
'ios' => '11.0',
'ios' => min_ios_version_supported,
},
'source_files' => "**/*.{h,mm,cpp}",
'pod_target_xcconfig' => {
Expand Down
File renamed without changes.