cue
cue copied to clipboard
evaluator: cycle-related infinite evaluation
What version of CUE are you using (cue version)?
$ cue version cue version +c942d0af linux/arm64
Does this issue reproduce with the latest release?
Yes
What did you do?
Follow up from https://github.com/cue-lang/cue/discussions/1679.
exec cue eval -H x.cue y.cue
cmp stdout stdout.x.golden
-- x.cue --
package y
#Secret: {
$secret: id: string
}
#secrets: #Secret | {[string]: #secrets}
out: #secrets & {
FOO: $secret: id: "100"
ONE: TWO: THREE: $secret: id: "123"
}
-- y.cue --
package y
#Secret: {
$secret: _id: string
}
#secrets: #Secret | {[string]: #secrets}
out: #secrets & {
FOO: $secret: _id: "100"
ONE: TWO: THREE: $secret: _id: "123"
}
-- stdout.golden --
FOO: {
$secret: {
id: "100"
_id: "100"
}
}
ONE: {
TWO: {
THREE: {
$secret: {
id: "123"
_id: "123"
}
}
}
}
What did you expect to see?
A passing test.
What did you see instead?
Indefinite hang with growing memory usage and no output.
Upon closer inspection, this seems more like a disjunction problem than a cycle problem per se.