Mirror of https://github.com/cue-lang/cue cuelang.org
cue go

internal/core/adt: propagate cycle errors via state in reportFieldError master

When a vertex has a CycleError recorded in its scheduler state (for example, from a failed comprehension task) but the error has not yet been promoted to BaseValue, reportFieldError now adopts that code so that lookups against the vertex surface CycleError rather than the generic IncompleteError. This allows validate to propagate the cycle through to the consumer. Pulled out of the upcoming dependency-tracking comprehension pushdown change so the diff there is smaller and so any regression introduced by this rule alone can be bisected independently. Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com> Change-Id: I120b96b2e141bb5cae40cbf34f6f28dee56d1e6b Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1236931 Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>


+8 -1
2 changed files