Conversation
yushan8
force-pushed
the
yushan/itg-bzlmod-external-collapse
branch
from
October 2, 2026 23:04
0d14495 to
b106ba4
Compare
… updates core/itg/graph.UpdateGraph always called the legacy HashExternalTargets helper, which matches on //external:* rule names and is a no-op for bzlmod repos (no such rules exist under bzlmod). Every bzlmod external source file then fell through to computeAvailableHashes, which unconditionally re-hashed it from disk, reintroducing the per-file hashing cost that #312's marker-based collapse was meant to eliminate for the full-graph path. Branch on UseBzlmod and call targethasher.HashExternalTargetsBzlmod with the repo marker hashes/mapping, and make computeAvailableHashes skip source files that already have a hash (e.g. from the collapse) instead of overwriting it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
yushan8
force-pushed
the
yushan/itg-bzlmod-external-collapse
branch
from
October 2, 2026 23:27
b106ba4 to
8fc0ae4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why?
core/itg/graph.UpdateGraph always called the legacy HashExternalTargets
helper, which matches on //external:* rule names and is a no-op for bzlmod
repos (no such rules exist under bzlmod). Every bzlmod external source file
then fell through to computeAvailableHashes, which unconditionally re-hashed
it from disk, reintroducing the per-file hashing cost that #312's marker-based
collapse was meant to eliminate for the full-graph path.
What?
Branch on UseBzlmod and call targethasher.HashExternalTargetsBzlmod with the
repo marker hashes/mapping, and make computeAvailableHashes skip source files
that already have a hash (e.g. from the collapse) instead of overwriting it.
Stacked on #322, which adds the repo-mapping argument to
HashExternalTargetsBzlmod.Issue
None.
🤖 Generated with Claude Code
Test Plan
Adds unit tests in
core/itg/graph/update_test.go. Not exercised against a real repository.Issue
None.
🤖 Generated with Claude Code
Issues
Stack