[ios] Fix regression stopping --project-directory from working#55204
Closed
kitten wants to merge 2 commits intofacebook:mainfrom
Closed
[ios] Fix regression stopping --project-directory from working#55204kitten wants to merge 2 commits intofacebook:mainfrom
--project-directory from working#55204kitten wants to merge 2 commits intofacebook:mainfrom
Conversation
kitten
commented
Jan 16, 2026
| ReactNativePodsUtils.detect_use_frameworks(current_target_definition) | ||
|
|
||
| CodegenUtils.clean_up_build_folder(path, $CODEGEN_OUTPUT_DIR) | ||
| CodegenUtils.clean_up_build_folder(react_native_path, $CODEGEN_OUTPUT_DIR) |
Contributor
Author
There was a problem hiding this comment.
This is something I updated for clarity. Without this, if path isn't relative to the pwd the FileUtils.rm_rf can silently fail here afaict:
react-native/packages/react-native/scripts/cocoapods/codegen_utils.rb
Lines 91 to 93 in 9d3cc38
3 tasks
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D90870064. |
Collaborator
|
This pull request was successfully merged by @kitten in 9f686f2 When will my fix make it into a release? | How to file a pick request? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This is a fix for a regression in #54948 found by @Kudo. Passing an absolute path for
react_native_pathwas non-functional before and the change was meant to fix this.This however used
Pathname.pwd.join(path)since I assumed that'd be the intention for a relative path. However, my assumption was thatpod installwould only ever be run in the installation root and hence be equivalent toPod::Config.instance.installation_rootmost of the time.This broke:
pod install --project-directory ios(and the likes), since I wasn't aware of the--project-directoryargument before.To fix this, we should construct the absolute path and join from
Pod::Config.instance.installation_rootas well.Note to self: Needs a pick into
0.84.0due to being a regression (will file a pick request after this is merged)Changelog:
[IOS] [FIXED] Regression from #54948 preventing
pod install --project-directoryfrom working properlyTest Plan:
pod installinrn-testerto validate