Skip to content

Commit e8a0476

Browse files
honnixclaude
andauthored
fix: adapt walker_test to NewTargetHashCache 5-arg signature (#4)
## Summary Main is broken: `//pkg:pkg_test` fails to compile because `pkg/walker_test.go` still calls the 4-arg `NewTargetHashCache`, while the [`--rule-class-fingerprint` feature](#2) added a 5th parameter (\`ruleClassFingerprints []RuleClassFingerprintDigests\`). Failing CI: https://github.com/spotify/target-determinator/actions/runs/24855629042/job/72767594737 \`\`\` pkg/walker_test.go:33:63: not enough arguments in call to NewTargetHashCache have (nil, *Normalizer, string, bool) want (map[label.Label]map[Configuration]*analysis.ConfiguredTarget, *Normalizer, string, bool, []RuleClassFingerprintDigests) \`\`\` \`walker_test.go\` is a fork-local test file that I missed when updating call sites during #2. Pass \`nil\` for the new parameter — the test doesn't exercise fingerprints. ## Test plan - [x] \`bazel test //pkg:pkg_test\` passes locally. - [x] CI presubmit green. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6faaa03 commit e8a0476

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/walker_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestDiffSingleLabel_NoDifferenceWhenBothFromCache(t *testing.T) {
3030
hashKey := lbl.String() + "\x00" + config.String()
3131

3232
makeFromCache := func() *QueryResults {
33-
thc := NewTargetHashCache(nil, &Normalizer{}, bazelRelease, false)
33+
thc := NewTargetHashCache(nil, &Normalizer{}, bazelRelease, false, nil)
3434
if err := thc.RestoreHashes(map[string][]byte{hashKey: fakeHash}); err != nil {
3535
t.Fatalf("RestoreHashes: %v", err)
3636
}

0 commit comments

Comments
 (0)