Skip to content

Commit

Permalink
Fix: ensure that Codegen podspec don't force dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo Cipolleschi committed Nov 14, 2022
1 parent 2bcbfbc commit 91b6d36
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 45 deletions.
20 changes: 0 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,6 @@ commands:
paths:
- vendor/bundle

install_ruby_ubuntu:
steps:
- run:
name: setup rbenv
command: |
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo "add eval(rbenv init) to ~/.bashrc"
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
- run:
name: install ruby
command: |
rbenv install 2.7.6 --verbose
rbenv global 2.7.6
run_yarn:
parameters:
yarn_base_cache_key:
Expand Down Expand Up @@ -1376,10 +1360,6 @@ jobs:
steps:
- checkout_code_with_cache
- run_yarn
- install_ruby_ubuntu
- run:
name: Which Ruby
command: which ruby
- add_ssh_keys:
fingerprints:
- "1c:98:e0:3a:52:79:95:29:12:cd:b4:87:5b:41:e2:bb"
Expand Down
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
26 changes: 13 additions & 13 deletions scripts/cocoapods/codegen_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,32 +98,32 @@ 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

if hermes_enabled
spec[:'dependencies'].merge!({
'hermes-engine': [version],
'hermes-engine': [],
});
else
spec[:'dependencies'].merge!({
'React-jsc': [version],
'React-jsc': [],
});
end

Expand Down

0 comments on commit 91b6d36

Please sign in to comment.