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

Skip processing exec configuration targets in incremental generation mode #2968

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions xcodeproj/internal/incremental_xcodeprojinfos.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,6 @@ def _make_non_skipped_target_xcodeprojinfo(
A `dict` of fields to be merged into the `XcodeProjInfo`. See
`_target_info_fields`.
"""
if not _should_create_provider(rule_kind = rule_kind, target = target):
return None

valid_transitive_infos = [
info
for attr, info in transitive_infos
Expand Down Expand Up @@ -660,9 +657,11 @@ def _make_non_skipped_target_xcodeprojinfo(
),
)

# Just a slight optimization to not process things we know don't need to have
# our provider
def _should_create_provider(*, rule_kind, target):
def _should_create_provider(*, bin_dir_path, rule_kind, target):
if "-exec-" in bin_dir_path:
# We don't want to include "tools" (exec configuration) targets
return False

if rule_kind in _INTERNAL_RULE_KINDS:
return False
if BuildSettingInfo in target:
Expand Down Expand Up @@ -716,6 +715,13 @@ def _make_xcodeprojinfo(
An `XcodeProjInfo` populated with information from `target` and
`transitive_infos`.
"""
if not _should_create_provider(
bin_dir_path = ctx.bin_dir.path,
rule_kind = rule_kind,
target = target
):
return None

automatic_target_info = calculate_automatic_target_info(
ctx = ctx,
rule_attr = rule_attr,
Expand Down Expand Up @@ -748,9 +754,6 @@ def _make_xcodeprojinfo(
transitive_infos = transitive_infos,
)

if not info_fields:
return None

return XcodeProjInfo(
**info_fields
)
Expand Down
Loading