Skip to content

Commit cf43f9c

Browse files
hoxyqfacebook-github-bot
authored andcommitted
fix: update paths in React-rncore.podspec (#36571)
Summary: Pull Request resolved: #36571 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 Reviewed By: cipolleschi Differential Revision: D44294112 fbshipit-source-id: 47fcf510e203d0880e1f92ab6ead09f4b79cb4dd
1 parent 8313f23 commit cf43f9c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

packages/react-native/ReactCommon/React-rncore.podspec

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ else
1616
source[:tag] = "v#{version}"
1717
end
1818

19-
react_native_path = ".."
19+
# We are using two different paths for react native because of the way how js_srcs_dir and output_dir options are used
20+
# output_dir option usage was introduced in https://github.com/facebook/react-native/pull/36210
21+
# React-rncore.podspec is the only podspec in the project that uses this option
22+
# We should rethink this approach in T148704916
23+
24+
# Relative path to react native from iOS project root (e.g. <ios-project-root>/../node_modules/react-native)
25+
react_native_dependency_path = ENV['REACT_NATIVE_PATH']
26+
# Relative path to react native from current podspec
27+
react_native_sources_path = '..'
2028

2129
Pod::Spec.new do |s|
2230
s.name = "React-rncore"
@@ -33,10 +41,10 @@ Pod::Spec.new do |s|
3341

3442

3543
use_react_native_codegen!(s, {
36-
:react_native_path => react_native_path,
37-
:js_srcs_dir => "#{react_native_path}/Libraries",
44+
:react_native_path => react_native_sources_path,
45+
:js_srcs_dir => "#{react_native_sources_path}/Libraries",
3846
:library_name => "rncore",
3947
:library_type => "components",
40-
:output_dir => "#{react_native_path}/react-native/ReactCommon"
48+
:output_dir => "#{react_native_dependency_path}/ReactCommon"
4149
})
4250
end

0 commit comments

Comments
 (0)