This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/cue/cmd: prevent infinite loops while building dependency graph
The existing implementatin resulted in an infinite loop in two cases: 1. In the v.Equals(after) call when the 'after' dependencies were cyclic 2. In the task.Walk function when task fields cyclically referenced other tasks This commit solves both cases by - stepping out of the Walk lambda when it had already been evaluated with the given parameter; and - removing the special case for 'after' dependencies as it is no longer necessary. Relevent tests are included. Updates #245 Change-Id: I914ff9aad96eb43ae89964000dea60ccd44c38a2 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/4910 Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
- Loading branch information