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