Check-in [3861ae4c57]
Overview
SHA1:3861ae4c575d3bbac6c53dd476191574ed73154d
Date: 2015-01-26 21:32:47
User: spaskalev
Comment:Added missing depends interation in the collecting handler
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2015-01-26
23:02
[bca8ee3e12] full dep traversal in the collecting handler (user: spaskalev, tags: trunk)
21:32
[3861ae4c57] Added missing depends interation in the collecting handler (user: spaskalev, tags: trunk)
20:40
[96db071674] Added tbd.slide as well (user: spaskalev, tags: trunk)
Changes

Modified src/0dev.org/commands/tbd/tbd.go from [2085cbcbc6] to [00e85b5d82].

219
220
221
222
223
224
225



226
227
228
229
230
231
232
233
234
235
}

// Returns a handler that stores every seen task and an ancillary function to retrieve those
func collecting() (handler, func() tasks) {
	var seen = make(map[*task]struct{})
	return func(t *task) action {
			seen[t] = struct{}{}



			return action{}
		}, func() tasks {
			seq := make(tasks, 0, len(seen))
			for k, _ := range seen {
				seq = append(seq, k)
			}
			sort.Stable(seq)
			return seq
		}
}







>
>
>










219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
}

// Returns a handler that stores every seen task and an ancillary function to retrieve those
func collecting() (handler, func() tasks) {
	var seen = make(map[*task]struct{})
	return func(t *task) action {
			seen[t] = struct{}{}
			for _, dep := range t.depends {
				seen[dep] = struct{}{}
			}
			return action{}
		}, func() tasks {
			seq := make(tasks, 0, len(seen))
			for k, _ := range seen {
				seq = append(seq, k)
			}
			sort.Stable(seq)
			return seq
		}
}