-
Notifications
You must be signed in to change notification settings - Fork 4.4k
bazel query output order is wrong for rules with attr specifying aspects that depend on utility target #12320
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)query bugsBugs related to "bazel (c)query"Bugs related to "bazel (c)query"staleIssues or PRs that are stale (no activity for 30 days)Issues or PRs that are stale (no activity for 30 days)team-PerformanceIssues for Performance teamsIssues for Performance teamstype: bugunder investigation
Description
Description of the problem:
We've been using bazel query --output=proto --order_output=full approach to calculate the targethash for our repo. This has been working relatively well until we introduced a custom rule (target instance A) that:
- has an attr that that supports aspect propagation (
attr.label(aspect=...))) - The underlying aspect implementation relies on another target (
B)
This forms dependency from A to B, and by invoking GetRuleInput on A seems to confirm that, but the output order is wrong despite --order_output=full is specified.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I've forked the bazel example repo and made some small changes to simplify the case.
bazel query --output=proto --order_output=full "deps(//aspect:example_rule)" and check the output proto file to see the issue
What operating system are you running Bazel on?
macos 10.15.6
What's the output of bazel info release?
3.3.1
Have you found anything relevant by searching the web?
No
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)query bugsBugs related to "bazel (c)query"Bugs related to "bazel (c)query"staleIssues or PRs that are stale (no activity for 30 days)Issues or PRs that are stale (no activity for 30 days)team-PerformanceIssues for Performance teamsIssues for Performance teamstype: bugunder investigation