this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/core/adt: always add disjunctionTask on builtin arg eval

https://review.gerrithub.io/c/cue-lang/cue/+/1206321 conditionally
added the `disjunctionTask` flag when the run mode is `finalize`,
along with a TODO to add the flag unconditionally.

Since then, the need for the condition seems to have gone away:
the tests all still pass, and the original issue (https://cuelang.org/cl/3584)
passes too.

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I0678b8b906a24c80f77d3e3196c9e0a3a5e80cbd
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1232479
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>

+3 -12
+3 -12
internal/core/adt/expr.go
··· 1517 1517 mode: state.mode, 1518 1518 }) 1519 1519 } else { 1520 - state := Flags{ 1520 + expr = c.value(a, Flags{ 1521 1521 status: state.status, 1522 - condition: state.condition | fieldSetKnown | concreteKnown, 1522 + condition: state.condition | fieldSetKnown | concreteKnown | disjunctionTask, 1523 1523 mode: state.mode, 1524 - } 1525 - // Be sure to process disjunctions at the very least when 1526 - // finalizing. Requiring disjunctions earlier may lead to too eager 1527 - // evaluation. 1528 - // 1529 - // TODO: Ideally we would always add this flag regardless of mode. 1530 - if state.mode == finalize { 1531 - state.condition |= disjunctionTask 1532 - } 1533 - expr = c.value(a, state) 1524 + }) 1534 1525 } 1535 1526 1536 1527 switch v := expr.(type) {