Skip to content

Commit

Permalink
Selective Debugging: fix bug with SelectedDebugPaths.txt containing u…
Browse files Browse the repository at this point in the history
…nselected/unfocused targets

Summary:
**Problem**

The `SelectedDebugPaths.txt` contains a list of targets which are not actually focused due to how Swift files are treated. Any targets which include Swift debug info would end up being in `SelectedDebugPaths.txt`, even if not selected/focused.

**Solution**

Ensure that `SelectedDebugPaths.txt` is only computed using the targets which are selected, excluding any targets for debug info purposes.

Reviewed By: chatura-atapattu, manicaesar

Differential Revision: D68146690

fbshipit-source-id: 343adc398bface18b6de91598686e0097dee9702
  • Loading branch information
milend authored and facebook-github-bot committed Jan 14, 2025
1 parent 67a0b3a commit ab209e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apple/apple_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ def _maybe_scrub_binary(ctx, binary_dep: Dependency) -> AppleBundleBinaryOutput:
dsym_artifact = _get_scrubbed_binary_dsym(ctx, binary, debug_info_tset)

filtered_map = {}
for info in filtered_debug_info.infos:
filtered_map.setdefault(info.label, []).extend(info.artifacts)
for selected_target_info in filtered_debug_info.selected_target_infos:
filtered_map.setdefault(selected_target_info.label, []).extend(selected_target_info.artifacts)

debuggable_info = AppleDebuggableInfo(
dsyms = [dsym_artifact],
Expand Down

0 comments on commit ab209e9

Please sign in to comment.