| Josh Bleecher Snyder | 26b6f9b | 2025-07-01 01:41:11 +0000 | [diff] [blame] | 1 | Tests related files caching when the exact same set of changed files is processed multiple times |
| 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 | -- .commit -- |
| 19 | Create initial commit |
| 20 | |
| 21 | -- a.go -- |
| 22 | package main |
| 23 | |
| 24 | func a() { |
| 25 | // Update 1 |
| 26 | } |
| 27 | |
| 28 | -- b.go -- |
| 29 | package main |
| 30 | |
| 31 | func b() { |
| 32 | // Update 1 |
| 33 | } |
| 34 | |
| 35 | -- .commit -- |
| 36 | Update both a.go and b.go together (creates relationship) |
| 37 | |
| 38 | -- a.go -- |
| 39 | package main |
| 40 | |
| 41 | func a() { |
| 42 | // Update 2 |
| 43 | } |
| 44 | |
| 45 | -- b.go -- |
| 46 | package main |
| 47 | |
| 48 | func b() { |
| 49 | // Update 2 |
| 50 | } |
| 51 | |
| 52 | -- .commit -- |
| 53 | Update both a.go and b.go together again (strengthens relationship) |
| 54 | |
| 55 | -- a.go -- |
| 56 | package main |
| 57 | |
| 58 | func a() { |
| 59 | // Update 3 |
| 60 | } |
| 61 | |
| 62 | -- c.go -- |
| 63 | package main |
| 64 | |
| 65 | func c() { |
| 66 | // Update 1 |
| 67 | } |
| 68 | |
| 69 | -- .commit -- |
| 70 | Update a.go and c.go together (creates another relationship) |
| 71 | |
| 72 | -- a.go -- |
| 73 | package main |
| 74 | |
| 75 | func a() { |
| 76 | // Update 4 - first time processing this exact set |
| 77 | } |
| 78 | |
| 79 | -- .commit -- |
| 80 | First time changing just a.go |
| 81 | |
| 82 | -- .run_test -- |
| 83 | OK |
| 84 | -- a.go -- |
| 85 | package main |
| 86 | |
| 87 | func a() { |
| 88 | // Update 5 - second time processing this exact same set, should be cached |
| 89 | } |
| 90 | |
| 91 | -- .commit -- |
| 92 | Second time changing just a.go (should be cached) |
| 93 | |
| 94 | -- .run_test -- |
| 95 | OK |