blob: b57abc5016ce2535826f3aac259d2d7d63f68354 [file] [log] [blame]
Josh Bleecher Snyder26b6f9b2025-07-01 01:41:11 +00001Tests related files caching with a working relationship pattern
2
3-- a.go --
4package main
5
6func a() {}
7
8-- b.go --
9package main
10
11func b() {}
12
13-- c.go --
14package main
15
16func c() {}
17
18-- p.go --
19package p
20
21func d() {}
22
23-- .commit --
24Add functions to a.go and b.go
25
26-- a.go --
27package main
28
29func a() {
30 // Update 1
31}
32
33-- b.go --
34package main
35
36func b() {
37 // Update 1
38}
39
40-- .commit --
41Add functions to a.go and b.go again
42
43-- a.go --
44package main
45
46func a() {
47 // Update 2
48}
49
50-- b.go --
51package main
52
53func b() {
54 // Update 2
55}
56
57-- .commit --
58Add functions to a.go and c.go
59
60-- a.go --
61package main
62
63func a() {
64 // Update 3
65}
66
67-- c.go --
68package main
69
70func c() {
71 // Update 1
72}
73
74-- .commit --
75Update file a.go only (first time)
76
77-- a.go --
78package main
79
80func a() {
81 // Update 4 - first analysis
82}
83
84-- .commit --
85First analysis
86
87-- .run_test --
88# Info
89
90Potentially related files:
91
92- p.go (30%)
93
94These files have historically changed with the files you have modified. Consider whether they require updates as well.
95
96
97-- a.go --
98package main
99
100func a() {
101 // Update 5 - second analysis (should cache related files)
102}
103
104-- .commit --
105Second analysis (should cache related files)
106
107-- .run_test --
108OK