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 dSYM bundles discovered within dynamic xcframeworks #2625

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

Conversation

aaronsky
Copy link
Contributor

@aaronsky aaronsky commented Dec 15, 2024

Fixes #2512

This PR attempts to add automatic dSYM imports per target-triple for dynamic xcframeworks. It is a rough implementation with some appropriately sharp edges, due to my still-nascent familiarity with the codebase, but I've managed to prove it out at the day job. Hopefully this is acceptable!

Note: dSYMs for dynamic xcframeworks imported from outside the root module are not copied into bazel-out and their paths as viewed with cquery are under external/ relative to the output base. This is consistent with how dsym_imports are handled by apple_dynamic_framework_import.

@aaronsky aaronsky force-pushed the aaronsky/2512-dynamic-xcframework-dsym-outputs branch from fa84986 to 767820d Compare December 15, 2024 13:12
@@ -374,6 +400,9 @@ def _get_xcframework_library_with_xcframework_processor(

return struct(
binary = binary,
# TODO(asky)
debug_info_binaries = [],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't actually think this can be implemented as-is, since the outputs are opaque

Comment on lines +432 to +433
if ".framework/" not in file.short_path:
continue
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed to add this to keep static frameworks from failing in bundle_paths.farthest_parent (not sure if fail-by-default is the right call for that method)

@@ -180,32 +168,6 @@ def _framework_search_paths(header_imports):
else:
return []

def _debug_info_binaries(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to framework_import_support.bzl

test/starlark_tests/rules/generate_xcframework.bzl Outdated Show resolved Hide resolved
test/starlark_tests/rules/generate_xcframework.bzl Outdated Show resolved Hide resolved
@aaronsky aaronsky force-pushed the aaronsky/2512-dynamic-xcframework-dsym-outputs branch from d4a85d4 to 5aa55b5 Compare December 15, 2024 13:54
@aaronsky aaronsky changed the title WIP: propagate dSYM bundles discovered within dynamic xcframeworks propagate dSYM bundles discovered within dynamic xcframeworks Dec 20, 2024
@aaronsky aaronsky marked this pull request as ready for review December 20, 2024 11:44
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.

dSYMs imported with dynamic xcframeworks are not part of the dsyms output group
1 participant