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

[7.2.0] Cherry-pick 3e2a3c1ffdbbcc20b6e88c1fa8cb62e8b95df87c #21939

Merged

Conversation

illicitonion
Copy link
Contributor

No description provided.

cushon and others added 3 commits April 9, 2024 15:39
This is required to be able to cherry-pick further commits changing
these tests.
…input`

This is an iteration of bazelbuild#15038. That PR added the concept of `configured_rule_input`, where `--output=proto` rules include both the labels and configurations of their dependencies.

That used `CqueryTransitionResolver` to find the dependencies. `CqueryTransitionResolver` does this by directly querying the Skyframe graph. However, cquery's view of the graph doesn't directly match the Skyframe graph.

For example, cquery doesn't explicitly list aspects: if CT `//foo` depends on aspect A which has an implicit dep on CT `//bar`, the Skyframe graph shows `//foo -> A -> //bar`.

Since cquery can't directly show `A` (see [More accurate cquery](https://docs.google.com/document/d/1x-RqFFEcGIzVgtYHIq6s6Qt4vYtJWz3nuHIuqeI89dU/edit#heading=h.5mcn15i0e1ch)), cquery instead shows `//foo -> //bar`.

For any cquery use we want to use cquery's interpretation of the graph as a consistent source of truth. This change refactors `--output=proto` to do that.

This means, for example, that `cquery --output=proto` will now have `configured_rule_input` entries  for deps like `//bar`. Before this change there's no way to tell where the dependency on `//bar` comes from.

Also correctly includes aliases (doesn't dereference them as either outputs or `configured_rule_input` entries of other outputs).

Also updates the API contract for `configured_rule_input`. Before, "same configuration" deps had their configuration fields omitted. Now they're always included, except for source files which have no configuration.

PiperOrigin-RevId: 621245620
Change-Id: Ia19a2544a82652f196c03c3ca439ef620927b5f9
@illicitonion illicitonion requested a review from a team as a code owner April 9, 2024 14:40
@github-actions github-actions bot added awaiting-review PR is awaiting review from an assigned reviewer team-Configurability platforms, toolchains, cquery, select(), config transitions labels Apr 9, 2024
@iancha1992 iancha1992 requested review from gregestren and aranguyen and removed request for aranguyen April 9, 2024 16:19
@iancha1992 iancha1992 added this pull request to the merge queue Apr 9, 2024
@gregestren gregestren added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Apr 9, 2024
Merged via the queue into bazelbuild:release-7.2.0 with commit 165a5f7 Apr 9, 2024
33 checks passed
@iancha1992 iancha1992 added this to the 7.2.0 release blockers milestone Apr 9, 2024
@iancha1992 iancha1992 removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Apr 9, 2024
@illicitonion illicitonion deleted the cherry-pick-cquery-cri branch May 9, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Configurability platforms, toolchains, cquery, select(), config transitions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants