Skip to content

Import XCFramework dSYMs named after the framework binary - #3155

Open
iamgirya wants to merge 1 commit into
bazelbuild:mainfrom
iamgirya:fix/xcframework-binary-named-dsyms
Open

iamgirya wants to merge 1 commit into
bazelbuild:mainfrom
iamgirya:fix/xcframework-binary-named-dsyms

Conversation

@iamgirya

Copy link
Copy Markdown

An XCFramework can name a dSYM after the framework binary rather than the framework: xcodebuild -create-xcframework -debug-symbols keeps the name it is given, and the WebRTC XCFramework we use ships dSYMs/WebRTC.dSYM. apple_dynamic_xcframework_import only takes *.framework.dSYM as dSYMs, so such a dSYM is silently left out of the dsyms output group and the framework can't be symbolicated.

This takes any .dSYM bundle of the XCFramework as a dSYM, and get_debug_info_binaries maps <binary>.dSYM to <binary>.framework like <binary>.framework.dSYM. It also replaces rstrip(".dSYM") there, which strips a set of characters rather than the suffix.

For the tests, generate_dynamic_xcframework gets dsym_named_after_binary, and the xcodebuild tool passes a dSYM of either name.

Repro: https://github.com/iamgirya/bazel-rules-repros/tree/main/rules_apple/xcframework_binary_named_dsym

Tested:

  • New apple_dynamic_xcframework_import_imported_xcframework_binary_named_dsyms_output_group_files_test and its _with_xcframework_import_tool variant: on main the dSYM is missing from the dsyms output group; with this change both pass.
  • bazel test //test/starlark_tests/... --config=ci for the XCFramework and framework import, XCFramework generation, framework, application and xcarchive suites: 551 of 559 pass; the other 8 are tvOS and watchOS app tests that need platforms I don't have installed.

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.

1 participant