You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internal/core/adt: keep lookups of settled arcs from forcing unrelated tasks
Vertex.lookup drives the target scheduler whenever not all of its tasks
have started, demanding allTasksCompleted. That also runs pushed-down
comprehensions that cannot affect the arc being looked up: a
comprehension whose body consists of literal fields only contributes
conjuncts to the arcs it pre-created at scheduling time, none of which
is the requested one.
Running such a comprehension is not just unnecessary work. Its guard may
resolve a disjunction, which evaluates its disjuncts in finalize mode;
that mode force-freezes blocked tasks, permanently recording incomplete
errors on vertices whose dependencies are still being computed further
up the evaluation stack.
In the reproducer, a reference to a settled member arc _port forced the
comprehension guard on its parent struct. Resolving the sibling spec
disjunction finalized a "\(port)" interpolation elsewhere in the tree
while the port vertex was mid-lookup on the stack, freezing it as an
"invalid interpolation: non-concrete value" error even though port
resolved to a concrete value immediately afterwards.
When the requested arc is already a member and provably cannot gain
conjuncts from a pushed-down comprehension, drop allTasksCompleted from
the needs mask when driving the scheduler: the task selection in process
then leaves such comprehensions unforced while other pending tasks still
run.
Fixes#4448
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I7513822cb7a536efe84ef975db5d79a25fca8093
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1242735
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>
0 commit comments