-
Notifications
You must be signed in to change notification settings - Fork 58
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
Update XCFramework pods after running bin/generate-podspecs.sh
#5846
Update XCFramework pods after running bin/generate-podspecs.sh
#5846
Conversation
The XCFramework pods refer to the local third-party podspecs. When those are updated, it can happen that `bundle exec pod install` cannot find the new version. Running `bundle exec pod update` ensures that all dependencies point to the version defined in the local third-party podspecs.
Rely upon pushd and popd to simplify the "breadcrumbs" of navigating into and out of multiple directories.
We are required to run `bin/generate-podspecs.sh` twice to capture the correct target. This change ensures the xcframework is only updated on the second run with the correct target, otherwise the following error occurs: ``` Installing FBReactNativeSpec 0.69.4 [!] Error installing FBReactNativeSpec [!] /opt/homebrew/bin/git -C /var/folders/c5/mkbb257d7fg4myx88dvsndp80000gn/T/d20230623-6856-98pfen checkout --quiet 0 error: pathspec '0' did not match any file(s) known to git ```
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.
Thank you for taking the time to address this issue! 🙇🏻
I tried to run the script locally, but it failed like so:
WARNING! hermes-engine.podspec doesn't have a 'tag' or 'commit' field, or doesn't point to a SHA verified file. Either modify this script to add a patch during the podspec generation or modify the original hermes-engine.podspec in the source repo.
[...]
I'm not sure whether the failure is due to the SHA1 I used or there's something currently wrong with
hermes-engine
.
I circumvented this error by manually setting a tag
within my local node_modules
directory. That is obviously not a long-term solution, but it let me proceed.
I do not believe the hermes-engine
error relates to this PR specifically, but I could be wrong. For hermes-engine
, I am unsure whether we need to patch it, filter it out, or something else. My limited understanding of the purpose1 of bin/generate-podspecs.sh
inhibits me from knowing the best path forward.
Footnotes
-
If you are able to share a high level description of its purpose, that would be very helpful for me. "Explain it to me like I'm five." 😄 ↩
Co-authored-by: Gio Lodi <gio.lodi@automattic.com>
…rk-integration build: Fix generate-podspecs script errors
Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job! |
For posterity, I am answering my own question to the best of my understanding. We have the |
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.
As mentioned in #5846 (review), I do not believe the lingering hermes-engine
error relates to the proposed changes. The error occurs without the proposed changes. Therefore, I believe it is safe to merge this work.
Thank you for addressing this issue. 🙇🏻
@jhnstn recently opened #5843 to address a
bundle exec pod install
failing locally for the XCFramework generation project.As far as I can tell, the sequence of events that resulted in that failure was:
bin/generate-podspec.js
?) in ed9625dPodfile.lock
was pointing to one that no longer existed locallyAssuming that
bin/generate-podspec.js
is the single point through which we updated thethird-party-podspecs
, then I think we can avoid this issue in the future by making the script also update the pods used by the XCFramework project, which is what this PR does.Testing
I tried to run the script locally, but it failed like so:
Full log
I'm not sure whether the failure is due to the SHA1 I used or there's something currently wrong with
hermes-engine
.PR submission checklist: