MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj

Bug: Multiple top-level targets with the same name and architecture result in invalid `swift_debug_settings.py`

Open
#1,795 0 comments 0 reactions 1 assignee View on GitHub

@brentleyjones is already working on this.

Since Feb 28, 2023.

bug
Dominant language
Swift
Stars
626
Forks
124
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When we generate swift_debug_settings.py, we map settings for top-level targets to an lldb_context_key. This key is comprised of a versionless target triple plus the executable name. So if two targets generate the same key, only one of them will have their settings written to swift_debug_settings.py, and both will use those settings. This can result in broken debugging.

Expected behavior

The debug settings are correctly set for each top-level target.

Additional context

I don't believe we have any additional information that we can use in the StopHook to make the key have higher fidelity, which means that we will either have to:

  • Generate different versions of swift_debug_settings.py and use the correct one depending on which target is being debugged
  • Generate a single swift_debug_settings.py, with higher fidelity keys in _SETTINGS, and pass in some information in the stop hook's extra_args in order to adjust the key we generate

I would like to do the second one if possible.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.