-
Notifications
You must be signed in to change notification settings - Fork 24.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix duplicate entries in HEADER_SEARCH_PATHS when running react_native_post_install script #46262
Fix duplicate entries in HEADER_SEARCH_PATHS when running react_native_post_install script #46262
Conversation
Hi @dirkpostma! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
@shwanton has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
/rebase - this comment automatically rebase on top of main |
ef2f1fd
to
1d6983c
Compare
…ring and array inputs
…of whitespace in folder name
…correctly in case of string input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! It's amazing that you added also the tests!
That's the best solution: I didn't want to suggest it in advance as it was quite a bit of work that I would have put on your shoulders, but I'm glad you did it!
@shwanton has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@cipolleschi I noticed a linter build step failed on the meta internal CI servers. Unfortunately I can’t view the logs there and I don’t know the linting rules. I did make some changes with regard to whitespacing in the last commit, but that’s a bit of a guess. If this doesn’t fix it, can you do it? Thanks! |
This pull request was successfully merged by @dirkpostma in d687d38 When will my fix make it into a release? | How to file a pick request? |
Summary:
In a react native project where USE_FRAMEWORKS is not nil, every time when running
pod install
, duplicate lines are added toHEADER_SEARCH_PATHS
section ofproject.pbxproj
:Note: a popular library that needs
use_frameworks
is react-native-firebase.See https://rnfirebase.io/#altering-cocoapods-to-use-frameworks
Analyse
react_native_post_install
callsReactNativePodsUtils.update_search_paths(installer)
ENV['USE_FRAMEWORKS'] != nil
thenupdate_search_paths
callsadd_search_path_if_not_included
add_search_path_if_not_included
checks if"#{new_search_path}"
is already there" #{new_search_path}"
with an extra space"#{new_search_path}"
because of the extra space, and adds" #{new_search_path}"
againChangelog:
[IOS] [FIXED] - react_native_post_install script no longer adds duplicate entries to HEADER_SEARCH_PATHS
Test Plan:
use_frameworks! :linkage => :static
toios/Podfile
(just beforeuse_react_native
)pod install
project.pbxproj