-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[iOS] Fix build of glog & Flipper-Glog on Apple Silicon #32486
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you move this to a separate file? That can make it easier to read and iterate on in the future.
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.
sure! any preference on where that file lives? and do you know where this script is run relative to?
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.
Hmm… maybe you can create that file as a sibling to this one (
scripts/
) and reference it by fetching the path to the current file?Something like this…
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.
@yungsters so i did some experimenting, and the issue is that we aren't actually calling this script directly, but rather reading the contents and passing that directly into the podspec:
https://github.com/facebook/react-native/blob/main/third-party-podspecs/glog.podspec#L14
therefore there is no
${BASH_SOURCE[0]}
, as the script is called directly viabash -c
, basically eval'ing the contents of the file. so i see three solutions:File.read
the script/bin/bash /absolute/path/to/scripts/ios-configure-glog.sh
), and thus be able to infer that pathdo you have a preference? my gut says option 2 because it feels like the "most correct" use of this bash script, but it also is a more fundamental change to how this script is being used and may have ramifications i don't see right now
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.
Reading the contents of the file into the podspec? Oh boy… 😬
Thanks for investigating, haha. Hmm… #1 increases complexity so I prefer not doing that.
I agree that #2 seems more right, but I would (maybe incorrectly) presume that this was done a certain way for some reason. But I am all for trying it out!
How about this… I'll merge this PR as-is, and you can optionally follow-up with #2 to improve general engineering of this. If that ends up being a rabbit hole or if you don't have time for it, then we still resolved the issue you set out to initially resolve.