Skip to content

Commit

Permalink
Adjust is_exec_configuration heuristic (#2349)
Browse files Browse the repository at this point in the history
Instead of looking for "-exec-" look for "-exec" since that portion may
be the last component of the output path mneumonic.

Ultimately fixes issues with --experimental_platforms_in_output_dir that
had sufficiently improved calculations to remove the need for an ST-hash
and thus surfaced this issue.

Ideally, in the long term, this heuristic would not be used and whether
an artifact is in the exec configuration would be determined by tracking
the provenance of that artifact. However, this would likely require a
more significant rework.
  • Loading branch information
sdtwigg authored Dec 22, 2023
1 parent 443192a commit 48d32a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/private/utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def is_exec_configuration(ctx):
"""

# TODO(djmarcin): Is there any better way to determine cfg=exec?
return ctx.genfiles_dir.path.find("-exec-") != -1
return ctx.genfiles_dir.path.find("-exec") != -1

def transform_deps(deps):
"""Transforms a [Target] into [DepVariantInfo].
Expand Down

0 comments on commit 48d32a0

Please sign in to comment.