Skip to content

Commit

Permalink
Remove dependency on libevent (facebook#41486)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#41486

Now that React-Hermes does not depends on folly::Futures anymore, we can safely delete the `libevent` dependency.
This will speedup the pod install step and potentially also the bundle size (to be tested)

## Changelog
[iOS][Removed] - Remove libevent dependency

Reviewed By: javache

Differential Revision: D51307333

fbshipit-source-id: 029c1d6aaad46fc261502241f7df28b4d5f59eb9
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Nov 15, 2023
1 parent 560e0f0 commit 23cf104
Show file tree
Hide file tree
Showing 5 changed files with 284 additions and 261 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Pod::Spec.new do |s|
s.public_header_files = "executor/HermesExecutorFactory.h"
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"${PODS_ROOT}/hermes-engine/destroot/include\" \"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_ROOT)/libevent/include\"",
"HEADER_SEARCH_PATHS" => "\"${PODS_ROOT}/hermes-engine/destroot/include\" \"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20"
}
s.header_dir = "reacthermes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,12 @@ def test_setupHermes_installsPods
setup_hermes!(:react_native_path => @react_native_path)

# Assert
assert_equal($podInvocationCount, 4)
assert_equal($podInvocationCount, 3)
assert_equal($podInvocation["React-jsi"][:path], "../../ReactCommon/jsi")
hermes_engine_pod_invocation = $podInvocation["hermes-engine"]
assert_equal(hermes_engine_pod_invocation[:podspec], "../../sdks/hermes-engine/hermes-engine.podspec")
assert_equal(hermes_engine_pod_invocation[:tag], "")
assert_equal($podInvocation["React-hermes"][:path], "../../ReactCommon/hermes")
assert_equal($podInvocation["libevent"][:version], "~> 2.1.12")
end

end
1 change: 0 additions & 1 deletion packages/react-native/scripts/cocoapods/jsengine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ def setup_hermes!(react_native_path: "../node_modules/react-native")
hermestag = File.exist?(hermestag_file) ? File.read(hermestag_file).strip : ''
pod 'hermes-engine', :podspec => "#{react_native_path}/sdks/hermes-engine/hermes-engine.podspec", :tag => hermestag
pod 'React-hermes', :path => "#{react_native_path}/ReactCommon/hermes"
pod 'libevent', '~> 2.1.12'
end
1 change: 0 additions & 1 deletion packages/react-native/scripts/cocoapods/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,6 @@ def self.react_native_pods
"fmt",
"glog",
"hermes-engine",
"libevent",
"React-hermes",
]
end
Expand Down
Loading

0 comments on commit 23cf104

Please sign in to comment.