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

Propagate AppleFrameworkImportInfo from iOS extensions #2633

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aaronsky
Copy link
Contributor

@aaronsky aaronsky commented Jan 16, 2025

I am attempting to cover for a seemingly specific edge-case. Maybe misguided, but it can be validated with the tests on this PR. Here goes:

Given an ios_extension that depends on an apple_dynamic_xcframework_import (I assume this also affects apple_dynamic_framework_import but have not tested it), and given an ios_application that bundles this extension but does not depend on the imported framework, then the Mach-O load command is added to the extension binary, but the framework is not bundled in $BUNDLE_ROOT/Frameworks. This causes the extension to crash at launch. Slack thread for additional context.

Based on my read of the code in ios_rules.bzl, this feels like an oversight, given that this line takes ctx.attr.extensions and attempts to load AppleFrameworkImportInfo providers on this line, but without this PR that doesn't seem as though it will never happen based on this line. Happy to discuss if my interpretation is off-base!

aaronsky and others added 2 commits January 16, 2025 15:48
@aaronsky aaronsky changed the title wip: propagate AppleFrameworkImportInfo from extensions so non-overlapping frameworks get imported into the main bundle propagate AppleFrameworkImportInfo from extensions Jan 17, 2025
@aaronsky aaronsky changed the title propagate AppleFrameworkImportInfo from extensions propagate AppleFrameworkImportInfo from extensions Jan 17, 2025
@aaronsky aaronsky changed the title propagate AppleFrameworkImportInfo from extensions Propagate AppleFrameworkImportInfo from iOS extensions Jan 17, 2025
@aaronsky aaronsky marked this pull request as ready for review January 17, 2025 03:11
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