react-native
react-native copied to clipboard
fix: "Time.h:52:17: error: typedef redefinition with different types" when a folder in the file path has a space
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 a sed
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 the sed
error is gone.
Run the build, the error should be gone.
Hi @gaberogan!
Thank you for your pull request and welcome to our community.
Action Required
In 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.
Process
In 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 CLA signed
. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.
If you have received this in error or have any questions, please contact us at [email protected]. Thanks!
Platform | Engine | Arch | Size (bytes) | Diff |
---|---|---|---|---|
android | hermes | arm64-v8a | 7,617,912 | +0 |
android | hermes | armeabi-v7a | 7,032,163 | +0 |
android | hermes | x86 | 7,917,973 | +0 |
android | hermes | x86_64 | 7,891,590 | +0 |
android | jsc | arm64-v8a | 9,495,694 | +0 |
android | jsc | armeabi-v7a | 8,273,317 | +0 |
android | jsc | x86 | 9,433,479 | +0 |
android | jsc | x86_64 | 10,026,464 | +0 |
Base commit: 2452c5f16e8bbbf6f17d09e77d3b8f073837bf18 Branch: main
Platform | Engine | Arch | Size (bytes) | Diff |
---|---|---|---|---|
ios | - | universal | n/a | -- |
Base commit: 9ac437f25b51b9a7fc8134d17c69b64ae90d508d Branch: main
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 9e169da3ae44854e0cbfe6d95739a669290105c8.
When will my fix make it into a release? | Upcoming Releases