From ec6e562d2113b34e4c6440ec43cf88182e3c6bd3 Mon Sep 17 00:00:00 2001 From: Justin Won Date: Tue, 30 Jun 2026 16:27:07 -0700 Subject: [PATCH] Delete unused function hashRule is never called --- core/targethasher/sourcehasher.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/core/targethasher/sourcehasher.go b/core/targethasher/sourcehasher.go index bf2b0b2..5c1c7f2 100644 --- a/core/targethasher/sourcehasher.go +++ b/core/targethasher/sourcehasher.go @@ -172,19 +172,6 @@ func pathForTarget(root, target string) string { return filepath.Join(root, parts[0], parts[1]) } -func hashRule(f *buildpb.Rule, targetHashes map[string]*Target) ([]byte, error) { - h := newHash() - HashRuleCommon(f, h) - for _, dep := range f.GetRuleInput() { - if dephash, ok := targetHashes[dep]; ok { - h.Write(dephash.Hash) - } else { - return nil, fmt.Errorf("%q missing hash for dependency %q", f.GetName(), dep) - } - } - return h.Sum(nil), nil -} - // HashRuleCommon hashes the common elements of a buildpb.Rule. func HashRuleCommon(r *buildpb.Rule, h hash.Hash) { // Name *string