MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj
Bug: Multiple top-level targets with the same name and architecture result in invalid `swift_debug_settings.py`
@brentleyjones is already working on this.
Since Feb 28, 2023.
- 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.pyand 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'sextra_argsin order to adjust the key we generate
I would like to do the second one if possible.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.