-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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: "Time.h:52:17: error: typedef redefinition with different types" when a folder in the file path has a space #34510
Conversation
Hi @gaberogan! 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@fb.com. Thanks! |
Base commit: 2452c5f |
Base commit: 9ac437f |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Thanks @gaberogan for submitting the fix. |
This pull request was successfully merged by @gaberogan in 9e169da. When will my fix make it into a release? | Upcoming Releases |
Summary
The
sed
workaround here in__apply_Xcode_12_5_M1_post_install_workaround
:https://github.com/facebook/react-native/blob/main/scripts/react_native_pods.rb#L293-L298
does not work when the react native project has a parent folder with a space in the the name, for example:
/Users/myuser/Some Folder/my-project/ios/Pods/RCT-Folly/folly/portability/Time.h
This is because the
sed
command thinks that the part after the space is a separate argument.This bug caused one of our engineers to not be able to run our React Native project through no fault of his own, so I would like to propose this change to help other engineers avoid this in the future.
Changelog
Add single quotes around the file parameter in the
sed
command[iOS] [Fixed] - Fixed Time.h:52:17: error when a folder in the file path has a space
Test Plan
Checkout the main branch.
Create a React Native project in a folder that has a space in the name.
When you run
pod install
, you should notice ased
error indicating that the text replacement failed.Run the build to reproduce the
Time.h:52:17: error
.Checkout this branch.
Run
pod install
and notice thesed
error is gone.Run the build, the error should be gone.