cue: treat cycle errors as normal incomplete errors
Reference cycles are no different from any other
non-concrete values that can still be resolved.
Reflect this accordingly.
Not doing so can cause unfication to fail in the
validation step done after it.
Add an option to explicitly disallow cycles in
Validate. This may be useful if applications
want to ensure there are no cycles but otherwise
don't care about the precense of non-concrete
values.
Change-Id: Ib718081067e230d8eabd37b9169e292cefec8536
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/2708
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/doc/ref/spec.md b/doc/ref/spec.md
index 0e3439b..b822e6c 100644
--- a/doc/ref/spec.md
+++ b/doc/ref/spec.md
@@ -2315,7 +2315,7 @@
that `a == e`.
```
-// Config Evaluates to
+// Config Evaluates to (requiring concrete values)
x: { x: {
a: b + 100 a: _|_ // cycle detected
b: a - 100 b: _|_ // cycle detected