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
Rewrite XCFramework slice selection using plist metadata #11229
Rewrite XCFramework slice selection using plist metadata #11229
Conversation
cf8b6d5
to
19d8fcb
Compare
0390db8
to
2c6d4a4
Compare
@amorde can you tell me if you have any concrete examples of oddly named slices? |
going to remove the change to error |
2c6d4a4
to
47b66de
Compare
# We also match _armv7$ to handle that case. | ||
local target_arch_regex="[_\\-]${target_arch}([\\/_\\-]|$)" | ||
if ! [[ "${paths[$i]}" =~ $target_arch_regex ]]; then | ||
if ! echo "${slice_archs}" | tr " " "\\n" | grep -F -q -x "$target_arch"; then |
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.
do you have some context on this change? it's unclear to me what this is doing. is it splitting the archs into separate lines and then using grep
to see if any lines match?
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.
@amorde exactly - it's an internet-suggested way to check that $target_arch
is in the $slice_archs
list (which is space-separated).
I would not do this in the 1.11 branch imo. Should we consider 1.12? |
I wanted it for 1.11 because it's not adding new functionality and it's making the behavior more correct. (Also, since we don't have a release schedule, it's hard to know when 1.12 will actually ship) WDYT @dnkoutso? |
OK we can try it. It is true there is never a release schedule |
47b66de
to
35b7e2e
Compare
Merged CocoaPods/cocoapods-integration-specs#332 - now merging this. |
This PR modifies the XCFramework selection script in such a way that it uses the actual Info.plist values of the XCF to determine slice eligibility.
I've seen a while ago that the script was using directory names for differentiation and I had a feeling that this is not entirely correct.
I've added 2 new examples to the build and verified that they are testing the right stuff:
Excluded-Archs-Example
- tests the common exclusion method ofEXCLUDED_ARCHS
when a company doesn't want to make an XCFramework for all the platforms.Oddly-Named-XCF-Slices-Example
- has slices with odd names. This would not have worked in the previous script.note: integration spec PR CocoaPods/cocoapods-integration-specs#332