Skip to content

Commit 98692a5

Browse files
committed
internal/core/adt: fix completion-related counter issue
We want to fix any incoming dependency as much as possible before processing. See comment in change. Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: I41291cdfa3103c37180fb00abe93bac5e8a2e856 Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1207750 Reviewed-by: Matthew Sackman <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
1 parent 105b8b7 commit 98692a5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

internal/core/adt/disjunct2.go

+8
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,14 @@ func (n *nodeContext) doDisjunct(c Conjunct, m defaultMode, mode runMode, hole i
490490
// and then swapping it with disjunctCCs in the new nodeContext.
491491
holes := make([]disjunctHole, 0, len(n.disjunctCCs))
492492

493+
// Complete as much of the pending work of this node and its parent before
494+
// copying. Note that once a copy is made, the disjunct is no longer able
495+
// to receive conjuncts from the original.
496+
n.completeNodeTasks(mode)
497+
// TODO: we may need to process incoming notifications for all arcs in
498+
// the copied disjunct, but only those notifications not coming from
499+
// within the arc itself.
500+
493501
// Clone the closeContexts of all open disjunctions and dependencies.
494502
for _, d := range n.disjunctCCs {
495503
// TODO: remove filled holes.

internal/core/adt/eval_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ var needFix = map[string]string{
7777
// TODO: These counters should all go to zero.
7878
var skipDebugDepErrors = map[string]int{
7979
"disjunctions/elimination": 4,
80-
"eval/issue545": 1,
8180
"eval/notify": 3,
8281
}
8382

0 commit comments

Comments
 (0)