Skip to content

Commit 16fc065

Browse files
koenpuntfacebook-github-bot
authored andcommitted
Revert "Fix build failure on iOS with pnpm and use_frameworks! (#38158)" (#39177)
Summary: This partially reverts commit 58adc5e. Using an absolute path in a podspec is wrong, and causes checksum issues when installs are ran on different systems. Example: `pod install --deployment --clean-install` breaks on non-matching checksums on CI because the absolute path is not the same in that environment. ``` Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/` Verifying no changes [!] There were changes to the lockfile in deployment mode: SPEC CHECKSUMS: React-debug: New Lockfile: 419922cde6c58cd5b9d43e4a09805146a7dd13a8 Old Lockfile: 1ce329843d8f9a9cbe0cdd9de264b20e89586734 React-NativeModulesApple: New Lockfile: a683b0c999e76b7d15ad9d5eaf8b6308e710a93e Old Lockfile: f82356d67a137295d098a98a03be5ee35871b5a5 React-runtimescheduler: New Lockfile: 79f8dff11acbe36aaeece63553680d7a8272af96 Old Lockfile: 16c5282d43a0df50d7c68ebf0218aeeb642a7086 React-utils: New Lockfile: 4fabb3cba786651e35bc41e610b0698fa24cecff Old Lockfile: e7e9118d0e85b107bb06d1a5f72ec5db6bddb911 ReactCommon: New Lockfile: af30fb021799e18c85a8e30ce799e15607e82212 Old Lockfile: f04f86f33c22e05dbf875789ea522ee486dace78 ``` And even tho the change fixed an issue with pnpm, the issue it introduces with cocoapods I think is a bigger one. ## Changelog: [INTERNAL] - Revert commit that makes podfile unstable Pull Request resolved: #39177 Test Plan: Tested locally that the hashes are stable Reviewed By: NickGerleman Differential Revision: D48773887 Pulled By: cipolleschi fbshipit-source-id: 96bcdbadc17a24fa9a8669f569d004bee6a03521
1 parent 468a136 commit 16fc065

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

Diff for: packages/react-native/ReactCommon/React-Fabric.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
3737
"DEFINES_MODULE" => "YES" }
3838

3939
if ENV['USE_FRAMEWORKS']
40-
s.header_mappings_dir = File.absolute_path('./')
40+
s.header_mappings_dir = './'
4141
s.module_name = 'React_Fabric'
4242
end
4343

Diff for: packages/react-native/ReactCommon/ReactCommon.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
3737
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
3838
"GCC_WARN_PEDANTIC" => "YES" }
3939
if ENV['USE_FRAMEWORKS']
40-
s.header_mappings_dir = File.absolute_path("./")
40+
s.header_mappings_dir = './'
4141
end
4242

4343
# TODO (T48588859): Restructure this target to align with dir structure: "react/nativemodule/..."

Diff for: packages/react-native/ReactCommon/react/debug/React-debug.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ Pod::Spec.new do |s|
3232

3333
if ENV['USE_FRAMEWORKS']
3434
s.module_name = "React_debug"
35-
s.header_mappings_dir = File.absolute_path("../..")
35+
s.header_mappings_dir = "../.."
3636
end
3737
end

Diff for: packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
3737
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
3838
"GCC_WARN_PEDANTIC" => "YES" }
3939
if ENV['USE_FRAMEWORKS']
40-
s.header_mappings_dir = File.absolute_path('./')
40+
s.header_mappings_dir = './'
4141
end
4242

4343
s.source_files = "ReactCommon/**/*.{mm,cpp,h}"

Diff for: packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
3737
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
3838
"GCC_WARN_PEDANTIC" => "YES" }
3939
if ENV['USE_FRAMEWORKS']
40-
s.header_mappings_dir = File.absolute_path('./')
40+
s.header_mappings_dir = './'
4141
end
4242

4343

Diff for: packages/react-native/ReactCommon/react/renderer/graphics/React-graphics.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Pod::Spec.new do |s|
4545

4646
if ENV['USE_FRAMEWORKS']
4747
s.module_name = "React_graphics"
48-
s.header_mappings_dir = File.absolute_path("../../..")
48+
s.header_mappings_dir = "../../.."
4949
header_search_paths = header_search_paths + ["\"$(PODS_TARGET_SRCROOT)/platform/ios\""]
5050
end
5151

Diff for: packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Pod::Spec.new do |s|
4242

4343
if ENV['USE_FRAMEWORKS']
4444
s.module_name = "React_ImageManager"
45-
s.header_mappings_dir = File.absolute_path("./")
45+
s.header_mappings_dir = "./"
4646
header_search_paths = header_search_paths + [
4747
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\"",
4848
"\"$(PODS_ROOT)/DoubleConversion\"",

Diff for: packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Pod::Spec.new do |s|
4848

4949
if ENV['USE_FRAMEWORKS']
5050
s.module_name = "React_runtimescheduler"
51-
s.header_mappings_dir = File.absolute_path("../../..")
51+
s.header_mappings_dir = "../../.."
5252
end
5353

5454
s.dependency "React-jsi"

Diff for: packages/react-native/ReactCommon/react/utils/React-utils.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Pod::Spec.new do |s|
4848

4949
if ENV['USE_FRAMEWORKS']
5050
s.module_name = "React_utils"
51-
s.header_mappings_dir = File.absolute_path("../..")
51+
s.header_mappings_dir = "../.."
5252
end
5353

5454
s.dependency "RCT-Folly", folly_version

0 commit comments

Comments
 (0)