1 parent 59daf28 commit 517fd31Copy full SHA for 517fd31
1 file changed
main.go
@@ -159,7 +159,11 @@ func (s *state) sawMod(path string) {
159
160
func (s *state) transitiveReduction() {
161
noPath := make(map[string]map[string]struct{}) // [path][path]
162
- for m, deps := range s.deps {
+
163
+ // Iterate modules in a stable order
164
+ mods := slices.Sorted(maps.Keys(s.deps))
165
+ for _, m := range mods {
166
+ deps := s.deps[m]
167
s.deps[m] = slices.DeleteFunc(deps, func(d string) bool {
168
// BFS for indirect paths to d, tracking nodes we touch along the way
169
var touched []string
0 commit comments