Skip to content

Commit

Permalink
fix: update paths in React-rncore.podspec
Browse files Browse the repository at this point in the history
Summary:
Changelog: [Internal]

The problem is related to the way we use `js_srcs_dir` & `output_dir` options, one requires just relative path from current ruby script, other requires relative path from iOS root project (where the Podfile located)

output_dir was introduced in D43304641
resulted into the issue, described in https://discord.com/channels/514829729862516747/1087736932953509958

allow-large-files

Differential Revision: D44294112

fbshipit-source-id: 0acf8098d6aae551d8e91638b3c76564bb4f6fc7
  • Loading branch information
hoxyq authored and facebook-github-bot committed Mar 22, 2023
1 parent e188585 commit b750359
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions packages/react-native/ReactCommon/React-rncore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ else
source[:tag] = "v#{version}"
end

react_native_path = ".."
# We are using to different paths for react native because of the way how js_srcs_dir and output_dir options are used
# output_dir option usage was introduced in D43304641, React-rncore.podspec is the only podspec in the project that uses this option
# We should rethink this approach in T148704916

# Relative path to react native from iOS project root (e.g. <ios-project-root>/../node_modules/react-native)
react_native_dependency_path = ENV['REACT_NATIVE_PATH']
# Relative path to react native from current podspec
react_native_sources_path = '..'

Pod::Spec.new do |s|
s.name = "React-rncore"
Expand All @@ -33,10 +40,10 @@ Pod::Spec.new do |s|


use_react_native_codegen!(s, {
:react_native_path => react_native_path,
:js_srcs_dir => "#{react_native_path}/Libraries",
:react_native_path => react_native_sources_path,
:js_srcs_dir => "#{react_native_sources_path}/Libraries",
:library_name => "rncore",
:library_type => "components",
:output_dir => "#{react_native_path}/react-native/ReactCommon"
:output_dir => "#{react_native_dependency_path}/ReactCommon"
})
end
2 changes: 1 addition & 1 deletion packages/rn-tester/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ SPEC CHECKSUMS:
FlipperKit: 2efad7007d6745a3f95e4034d547be637f89d3f6
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
hermes-engine: d4e3147fcec14fb95d56cad45f03f126e725a098
hermes-engine: 23974109d4ab9be57257a23579a564c53f86abc3
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
Expand Down

0 comments on commit b750359

Please sign in to comment.