Skip to content
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 pod install --project-directory=ios failing when Hermes is enabled #33820

Closed
wants to merge 1 commit into from

Conversation

tido64
Copy link
Collaborator

@tido64 tido64 commented May 12, 2022

Summary

pod install --project-directory=ios fails when Hermes is enabled:

% pod install --project-directory=ios
[Codegen] Generating ios/build/generated/ios/React-Codegen.podspec.json
[Hermes] Extracting Hermes tarball (5244f8)

[DEBUG] pwd: /~/example
[DEBUG] cp: cp ../node_modules/react-native/sdks/hermes-engine.podspec ../node_modules/react-native/sdks/hermes/hermes-engine.podspec

warn Multiple Podfiles were found: ios/Podfile,macos/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
Auto-linking React Native module for target `ReactTestApp`: ReactTestApp-DevSupport
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
[!] No podspec found for `hermes-engine` in `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`

Changelog

[iOS] [Fixed] - pod install --project-directory=ios fails when Hermes is enabled

Test Plan

Running pod install --project-directory=ios is enough to trigger this issue.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Microsoft Partner: Microsoft Partner labels May 12, 2022
Comment on lines 636 to +638
# Use React Native's own scripts to build Hermes
system("cp #{sdks_dir}/hermes-engine/hermes-engine.podspec #{hermes_dir}/hermes-engine.podspec")
system("cp #{sdks_dir}/hermes-engine/utils/* #{hermes_dir}/utils/.")
FileUtils.cp(sdks_dir.join("hermes-engine", "hermes-engine.podspec"), hermes_dir.join("hermes-engine.podspec"))
FileUtils.cp_r(sdks_dir.join("hermes-engine", "utils"), hermes_dir)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section changed since the 0.69 cut. The PR for 0.69 is here: #33819

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks I've tracked this 👍

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label May 12, 2022
@react-native-bot react-native-bot added Bug Platform: iOS iOS applications. labels May 12, 2022
@cortinico
Copy link
Contributor

pod install --project-directory=ios fails when Hermes is enabled.

For context, what's the failure?

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: a897314
Branch: main

@tido64
Copy link
Collaborator Author

tido64 commented May 12, 2022

For context, what's the failure?

Sorry, forgot to add the error message here. I posted it over here: reactwg/react-native-releases#21 (comment). In any case, I've updated the PR description.

@tido64
Copy link
Collaborator Author

tido64 commented May 13, 2022

@cortinico: It looks like this code was removed in favour of a JS script. I'm closing this PR, but the one for 0.69-stable is still required.

@tido64 tido64 closed this May 13, 2022
@tido64 tido64 deleted the tido/fix-pod-install branch May 13, 2022 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Microsoft Partner: Microsoft Partner Platform: iOS iOS applications. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants