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: Ignore invalid xcframework paths #1440

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

luispadron
Copy link
Collaborator

@luispadron luispadron commented Jan 13, 2025

The rules should ignore invalid .xcframework paths like SPM does (see here). Unlike SPM however, in Starlark we do not have a readily available .plist decoder so we will simply ensure that an Info.plist file exists and let the build rules handle potential issues.

This fixes cases where I was getting warnings because our .zip file contains a __MACOSX directory that contains a .xcframework directory (this is used for metadata by macOS). All the files are prefixed with ._ so the Info.plist check here fixes including these bad paths in our search.

DEBUG: /private/var/tmp/_bazel_lpadron/9ae9416857eb79bb978de35a53d54970/external/rules_swift_package_manager~/swiftpkg/internal/repo_rules.bzl:156:14: WARNING: Found multiple XCFramework binary artifacts in the downloaded artifact: ["remote/archive/AppsFlyerLib-Dynamic.xcframework.zip/__MACOSX/AppsFlyerLib.xcframework", "remote/archive/AppsFlyerLib-Dynamic.xcframework.zip/AppsFlyerLib.xcframework"], using the last one.

@luispadron luispadron force-pushed the luis/fix-warnings-for-multi-xcframeworks branch 2 times, most recently from 59ce227 to cd507b3 Compare January 13, 2025 18:46
@luispadron luispadron force-pushed the luis/fix-warnings-for-multi-xcframeworks branch from cd507b3 to b56b770 Compare January 14, 2025 02:06
@luispadron luispadron changed the title fix: Ignore bad xcframework paths fix: Ignore invalid xcframework paths Jan 14, 2025
@luispadron luispadron requested a review from cgrindel January 14, 2025 02:09
@cgrindel
Copy link
Owner

@Mergifyio queue

Copy link
Contributor

mergify bot commented Jan 14, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at b194745

@mergify mergify bot merged commit b194745 into main Jan 14, 2025
33 checks passed
@mergify mergify bot deleted the luis/fix-warnings-for-multi-xcframeworks branch January 14, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants