this repo has no description
0
fork

Configure Feed

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

internal/core/adt: carry over more task types over disjunction boundaries

With the old closedness it was very hard to
carry over tasks as this would often lead to
counter issues. With new closedness this is
more straightforward.

This may fix 3770, but this CL only fixes a
reducer, so this should still be verified.

Issue #3770

Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: Ib3b0a7af2a15038f9b4fc3a3917b376c3c4fe763
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1211753
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>

+12 -33
+10 -29
cue/testdata/eval/counters.txtar
··· 197 197 } 198 198 } 199 199 -- out/evalalpha/stats -- 200 - Leaks: 225 200 + Leaks: 229 201 201 Freed: 0 202 202 Reused: 0 203 - Allocs: 225 203 + Allocs: 229 204 204 Retain: 0 205 205 206 - Unifications: 172 207 - Conjuncts: 257 206 + Unifications: 176 207 + Conjuncts: 265 208 208 Disjuncts: 34 209 209 -- diff/-out/evalalpha/stats<==>+out/eval/stats -- 210 210 diff old new ··· 216 216 -Reused: 138 217 217 -Allocs: 13 218 218 -Retain: 35 219 - +Leaks: 225 219 + +Leaks: 229 220 220 +Freed: 0 221 221 +Reused: 0 222 - +Allocs: 225 222 + +Allocs: 229 223 223 +Retain: 0 224 224 225 225 -Unifications: 125 226 226 -Conjuncts: 229 227 227 -Disjuncts: 186 228 - +Unifications: 172 229 - +Conjuncts: 257 228 + +Unifications: 176 229 + +Conjuncts: 265 230 230 +Disjuncts: 34 231 231 -- out/eval/stats -- 232 232 Leaks: 0 ··· 360 360 } 361 361 x: (struct){ 362 362 b: (int){ 1 } 363 + a: (int){ 1 } 363 364 } 364 365 } 365 - out: (_|_){ 366 - // [incomplete] issue3770.task.out: undefined field: a: 367 - // ./issue3770.cue:10:11 368 - } 366 + out: (int){ 1 } 369 367 } 370 368 } 371 369 issue3780: (struct){ ··· 501 499 a: (struct){ 502 500 b: (_){ _ } 503 501 } 504 - @@ -95,10 +119,12 @@ 505 - } 506 - x: (struct){ 507 - b: (int){ 1 } 508 - - a: (int){ 1 } 509 - - } 510 - - } 511 - - out: (int){ 1 } 512 - + } 513 - + } 514 - + out: (_|_){ 515 - + // [incomplete] issue3770.task.out: undefined field: a: 516 - + // ./issue3770.cue:10:11 517 - + } 518 - } 519 - } 520 - issue3780: (struct){ 521 502 -- out/eval -- 522 503 (struct){ 523 504 issue3750: (struct){
+2 -4
internal/core/adt/overlay.go
··· 241 241 ds.tasks = append(ds.tasks, t) 242 242 243 243 case taskRUNNING: 244 - if t.run != handleResolver && t.run != handleExpr { 245 - // TODO: consider whether this is also necessary for other 246 - // types of tasks. 247 - break 244 + if t.run == handleDisjunctions { 245 + continue 248 246 } 249 247 250 248 t.defunct = true