Skip to content

Track aliases reached through external dependencies - #643

Merged
tinder-maxwellelliott merged 1 commit into
Tinder:masterfrom
tamird:codex/bazel-diff-overlapping-alias-20261109
Nov 9, 2026
Merged

tinder-maxwellelliott merged 1 commit into
Tinder:masterfrom
tamird:codex/bazel-diff-overlapping-alias-20261109

Conversation

@tamird

@tamird tamird commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

A supplementary dependency query in #630 can follow an external alias into a filegroup and back to another alias in the original package. Bazel returns that second alias, but bazel-diff discards the duplicate row before reading its actual binding.

The regression swaps two branches of a select(). The build changes from before to other while the set of dependency labels stays the same. With --proto:output_rule_attrs=tags, the alias and its consumer previously kept the same hashes. Callers that include Bazel’s synthetic attribute fingerprint already detect this particular edit.

Record the native aliases reached by the dependency query and apply their evaluated bindings to the retained rows. Advance the cache and partial recipe versions so cached results also reflect the correction.

Assisted by Codex.

When following a fine-grained external alias, deps() can return to
another alias already in the primary query. Its duplicate row is
discarded before bazel-diff reads the mapping from select conditions to
destinations.

Keep the name of each native alias reached in that query. Reread its
actual attribute and apply it to the original row before hashing.

Extend the Tinder#630 fixture with a filegroup that leads back into the hub.
The build switches between two files whose labels stay in the input set.
With a tags-only projection the alias and its consumer used to keep the
same hash. A caller including Bazel's synthetic attribute fingerprint
already detects this edit. Advance the cache and partial recipe versions
so older alias hashes are regenerated.
@tinder-maxwellelliott
tinder-maxwellelliott merged commit b5af1ea into Tinder:master Nov 9, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants