Skip to content

fix(itg): preserve dependency edges when re-synthesizing external rule targets - #315

Merged
yushan8 merged 1 commit into
mainfrom
itg-external-deps-preserve
Sep 22, 2026
Merged

yushan8 merged 1 commit into
mainfrom
itg-external-deps-preserve

Conversation

@yushan8

@yushan8 yushan8 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

UpdateGraph re-synthesizes a targethasher.Target for each external rule target already present in the optimized graph but absent from the current query result (i.e. carried over unchanged). That reconstruction previously left Deps unset, so upsertTarget treated the target as having zero dependencies and dropped its existing dependency edges on every update where the target wasn't freshly re-queried. This silently broke reverse-dep invalidation for anything depending on that external target transitively.

Rebuild Deps from the target's recorded dependency IDs via TargetIDToString so the edges survive being carried over.

Test Plan

Unit test and internal testing

…e targets

UpdateGraph re-synthesizes a targethasher.Target for each external rule
target already present in the optimized graph but absent from the current
query result (i.e. carried over unchanged). That reconstruction previously
left Deps unset, so upsertTarget treated the target as having zero
dependencies and dropped its existing dependency edges on every update
where the target wasn't freshly re-queried. This silently broke reverse-dep
invalidation for anything depending on that external target transitively.

Rebuild Deps from the target's recorded dependency IDs via
TargetIDToString so the edges survive being carried over.

Co-Authored-By: Claude Sonnet 5 <ANONYMIZED_EMAIL_ADDRESS_0_6>
@yushan8
yushan8 requested review from a team as code owners September 22, 2026 19:12
@yushan8
yushan8 merged commit 1264659 into main Sep 22, 2026
10 checks passed
@yushan8
yushan8 deleted the itg-external-deps-preserve branch September 22, 2026 20:39
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