diff --git a/cue/testdata/builtins/incomplete.txtar b/cue/testdata/builtins/incomplete.txtar index bc944089857..4b88886e4f8 100644 --- a/cue/testdata/builtins/incomplete.txtar +++ b/cue/testdata/builtins/incomplete.txtar @@ -242,15 +242,18 @@ Result: x: (_|_){ // [incomplete] incompleteListError.x: non-concrete value _ in operand to +: // ./in.cue:72:11 + // ./in.cue:73:11 } y: (_){ _ } decimal: (_|_){ // [incomplete] incompleteListError.x: non-concrete value _ in operand to +: // ./in.cue:72:11 + // ./in.cue:73:11 } str: (_|_){ // [incomplete] incompleteListError.x: non-concrete value _ in operand to +: // ./in.cue:72:11 + // ./in.cue:73:11 } } badListType: (_|_){ @@ -320,6 +323,29 @@ diff old new // ./in.cue:59:16 // ./in.cue:58:16 } +@@ -129,15 +129,18 @@ + x: (_|_){ + // [incomplete] incompleteListError.x: non-concrete value _ in operand to +: + // ./in.cue:72:11 ++ // ./in.cue:73:11 + } + y: (_){ _ } + decimal: (_|_){ + // [incomplete] incompleteListError.x: non-concrete value _ in operand to +: + // ./in.cue:72:11 +- } +- str: (_|_){ +- // [incomplete] incompleteListError.x: non-concrete value _ in operand to +: +- // ./in.cue:72:11 ++ // ./in.cue:73:11 ++ } ++ str: (_|_){ ++ // [incomplete] incompleteListError.x: non-concrete value _ in operand to +: ++ // ./in.cue:72:11 ++ // ./in.cue:73:11 + } + } + badListType: (_|_){ -- out/eval -- Errors: badListType.decimal: cannot use 2 (type int) as list in argument 1 to list.Max: diff --git a/cue/testdata/builtins/matchif.txtar b/cue/testdata/builtins/matchif.txtar index 964cab4057b..0ecd8adb839 100644 --- a/cue/testdata/builtins/matchif.txtar +++ b/cue/testdata/builtins/matchif.txtar @@ -20,65 +20,6 @@ Retain: 24 Unifications: 98 Conjuncts: 154 Disjuncts: 98 --- diff/-out/evalalpha<==>+out/eval -- -diff old new ---- old -+++ new -@@ -2,22 +2,18 @@ - regularFields.err1: invalid value {x:10,y:6} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 5 and 6: - ./in.cue:2:7 - ./in.cue:2:30 -- ./in.cue:7:8 - ./in.cue:7:19 - regularFields.err2: invalid value {x:11,y:6} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 5 and 6: - ./in.cue:2:7 - ./in.cue:2:30 -- ./in.cue:8:8 - ./in.cue:8:19 - regularFields.err3: invalid value {x:2,y:5} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 1 and 5: - ./in.cue:2:7 - ./in.cue:2:39 -- ./in.cue:9:8 - ./in.cue:9:18 - regularFields.err4: invalid value {x:1,y:2} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 1 and 2: - ./in.cue:2:7 - ./in.cue:2:39 -- ./in.cue:10:8 - ./in.cue:10:18 - - Result: -@@ -45,7 +41,6 @@ - // [eval] regularFields.err1: invalid value {x:10,y:6} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 5 and 6: - // ./in.cue:2:7 - // ./in.cue:2:30 -- // ./in.cue:7:8 - // ./in.cue:7:19 - x: (int){ 10 } - y: (int){ 6 } -@@ -54,7 +49,6 @@ - // [eval] regularFields.err2: invalid value {x:11,y:6} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 5 and 6: - // ./in.cue:2:7 - // ./in.cue:2:30 -- // ./in.cue:8:8 - // ./in.cue:8:19 - x: (int){ 11 } - y: (int){ 6 } -@@ -63,7 +57,6 @@ - // [eval] regularFields.err3: invalid value {x:2,y:5} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 1 and 5: - // ./in.cue:2:7 - // ./in.cue:2:39 -- // ./in.cue:9:8 - // ./in.cue:9:18 - x: (int){ 2 } - y: (int){ 5 } -@@ -72,7 +65,6 @@ - // [eval] regularFields.err4: invalid value {x:1,y:2} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 1 and 2: - // ./in.cue:2:7 - // ./in.cue:2:39 -- // ./in.cue:10:8 - // ./in.cue:10:18 - x: (int){ 1 } - y: (int){ 2 } -- out/eval -- Errors: regularFields.err1: invalid value {x:10,y:6} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 5 and 6: @@ -161,80 +102,6 @@ Result: } } } --- out/evalalpha -- -Errors: -regularFields.err1: invalid value {x:10,y:6} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 5 and 6: - ./in.cue:2:7 - ./in.cue:2:30 - ./in.cue:7:19 -regularFields.err2: invalid value {x:11,y:6} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 5 and 6: - ./in.cue:2:7 - ./in.cue:2:30 - ./in.cue:8:19 -regularFields.err3: invalid value {x:2,y:5} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 1 and 5: - ./in.cue:2:7 - ./in.cue:2:39 - ./in.cue:9:18 -regularFields.err4: invalid value {x:1,y:2} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 1 and 2: - ./in.cue:2:7 - ./in.cue:2:39 - ./in.cue:10:18 - -Result: -(_|_){ - // [eval] - regularFields: (_|_){ - // [eval] - ok1: (struct){ - x: (int){ 10 } - y: (int){ 5 } - } - ok2: (struct){ - x: (int){ 11 } - y: (int){ 5 } - } - ok3: (struct){ - x: (int){ 2 } - y: (int){ 1 } - } - ok4: (struct){ - x: (int){ 1 } - y: (int){ 1 } - } - err1: (_|_){ - // [eval] regularFields.err1: invalid value {x:10,y:6} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 5 and 6: - // ./in.cue:2:7 - // ./in.cue:2:30 - // ./in.cue:7:19 - x: (int){ 10 } - y: (int){ 6 } - } - err2: (_|_){ - // [eval] regularFields.err2: invalid value {x:11,y:6} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 5 and 6: - // ./in.cue:2:7 - // ./in.cue:2:30 - // ./in.cue:8:19 - x: (int){ 11 } - y: (int){ 6 } - } - err3: (_|_){ - // [eval] regularFields.err3: invalid value {x:2,y:5} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 1 and 5: - // ./in.cue:2:7 - // ./in.cue:2:39 - // ./in.cue:9:18 - x: (int){ 2 } - y: (int){ 5 } - } - err4: (_|_){ - // [eval] regularFields.err4: invalid value {x:1,y:2} (does not satisfy matchIf({x!:>2}, {y!:5}, {y!:1})): conflicting values 1 and 2: - // ./in.cue:2:7 - // ./in.cue:2:39 - // ./in.cue:10:18 - x: (int){ 1 } - y: (int){ 2 } - } - } -} -- out/compile -- --- in.cue { diff --git a/cue/testdata/builtins/matchn.txtar b/cue/testdata/builtins/matchn.txtar index 0892e5572d3..304430477ba 100644 --- a/cue/testdata/builtins/matchn.txtar +++ b/cue/testdata/builtins/matchn.txtar @@ -632,21 +632,27 @@ Errors: match.singleErr: invalid value {a:"foo"} (does not satisfy matchN(1, [~(#Foo)])): 0 matched, expected 1: ./in.cue:8:17 ./in.cue:8:24 + ./in.cue:10:13 match.incompleteErr: invalid value {a:string} (does not satisfy matchN(1, [~(#Foo)])): 0 matched, expected 1: ./in.cue:12:21 ./in.cue:12:28 + ./in.cue:14:17 match.defaults.pickNested1Err: invalid value {a:*3 | int} (does not satisfy matchN(1, [{a:2}])): 0 matched, expected 1: ./in.cue:36:23 ./in.cue:36:30 + ./in.cue:39:19 match.defaults.pickNested2Err: invalid value {a:*3 | int} (does not satisfy matchN(1, [{a:<=2}])): 0 matched, expected 1: ./in.cue:41:23 ./in.cue:41:30 + ./in.cue:44:19 not.singleErr: invalid value {a:2} (does not satisfy matchN(0, [~(#Foo)])): 1 matched, expected 0: ./in.cue:74:17 ./in.cue:74:24 + ./in.cue:76:13 not.doubleErr: invalid value {a:"foo"} (does not satisfy matchN(0, [matchN(0, [#Foo])])): 1 matched, expected 0: ./in.cue:78:17 ./in.cue:78:24 + ./in.cue:80:13 oneOf.multiple1Err1: invalid value 1 (does not satisfy matchN(1, [math.MultipleOf(3),math.MultipleOf(5)])): 0 matched, expected 1: ./in.cue:84:20 ./in.cue:84:27 @@ -674,18 +680,23 @@ allOf.multiple1Err3: invalid value 5 (does not satisfy matchN(2, [math.MultipleO incomplete.err1.x: invalid value {bar:2} (does not satisfy matchN(1, [{bar!:string}])): 0 matched, expected 1: ./incomplete.cue:34:6 ./incomplete.cue:34:13 + ./incomplete.cue:35:6 incomplete.err2.x: invalid value {bar:2} (does not satisfy matchN(0, [{bar!:int},{foo!:int}])): 1 matched, expected 0: ./incomplete.cue:40:6 ./incomplete.cue:40:13 + ./incomplete.cue:41:6 incomplete.err3.x: invalid value {bar:2} (does not satisfy matchN(2, [{bar!:string},{foo!:string}])): 0 matched, expected 2: ./incomplete.cue:46:6 ./incomplete.cue:46:13 + ./incomplete.cue:47:6 incomplete.err4.x: invalid value {bar:2} (does not satisfy matchN(>1, [{bar!:string},{foo!:string}])): 0 matched, expected >1: ./incomplete.cue:51:6 ./incomplete.cue:51:13 + ./incomplete.cue:52:6 incomplete.err5.x: invalid value {bar:2} (does not satisfy matchN(<1, [{bar!:int},{foo!:int}])): 1 matched, expected <1: ./incomplete.cue:55:6 ./incomplete.cue:55:13 + ./incomplete.cue:56:6 Result: (_|_){ @@ -702,6 +713,7 @@ Result: // [eval] match.singleErr: invalid value {a:"foo"} (does not satisfy matchN(1, [~(#Foo)])): 0 matched, expected 1: // ./in.cue:8:17 // ./in.cue:8:24 + // ./in.cue:10:13 a: (string){ "foo" } } incompleteOK: (struct){ @@ -711,6 +723,7 @@ Result: // [eval] match.incompleteErr: invalid value {a:string} (does not satisfy matchN(1, [~(#Foo)])): 0 matched, expected 1: // ./in.cue:12:21 // ./in.cue:12:28 + // ./in.cue:14:17 a: (string){ string } } #A: (#struct){ @@ -739,6 +752,7 @@ Result: // [eval] match.defaults.pickNested1Err: invalid value {a:*3 | int} (does not satisfy matchN(1, [{a:2}])): 0 matched, expected 1: // ./in.cue:36:23 // ./in.cue:36:30 + // ./in.cue:39:19 a: (int){ |(*(int){ 3 }, (int){ int }) } } pickNested2OK1: (struct){ @@ -751,6 +765,7 @@ Result: // [eval] match.defaults.pickNested2Err: invalid value {a:*3 | int} (does not satisfy matchN(1, [{a:<=2}])): 0 matched, expected 1: // ./in.cue:41:23 // ./in.cue:41:30 + // ./in.cue:44:19 a: (int){ |(*(int){ 3 }, (int){ int }) } } } @@ -785,6 +800,7 @@ Result: // [eval] not.singleErr: invalid value {a:2} (does not satisfy matchN(0, [~(#Foo)])): 1 matched, expected 0: // ./in.cue:74:17 // ./in.cue:74:24 + // ./in.cue:76:13 a: (int){ 2 } } doubleOK: (struct){ @@ -794,6 +810,7 @@ Result: // [eval] not.doubleErr: invalid value {a:"foo"} (does not satisfy matchN(0, [matchN(0, [#Foo])])): 1 matched, expected 0: // ./in.cue:78:17 // ./in.cue:78:24 + // ./in.cue:80:13 a: (string){ "foo" } } } @@ -921,6 +938,7 @@ Result: // [incomplete] incomplete.incomplete1.x: invalid value {bar:2} (does not satisfy matchN(1, [{foo!:string}])): 0 matched, expected 1: // ./incomplete.cue:7:6 // ./incomplete.cue:7:13 + // ./incomplete.cue:8:6 bar: (int){ 2 } } } @@ -937,6 +955,7 @@ Result: // [incomplete] incomplete.incomplete3.x: invalid value {bar:2} (does not satisfy matchN(math.MultipleOf(2), [{bar!:int},{foo!:int}])): 1 matched, expected math.MultipleOf(2): // ./incomplete.cue:16:6 // ./incomplete.cue:16:13 + // ./incomplete.cue:17:6 bar: (int){ 2 } } } @@ -945,6 +964,7 @@ Result: // [incomplete] incomplete.incomplete4.x: invalid value {bar:2} (does not satisfy matchN(math.MultipleOf(2), [{bar!:int},{foo!:int},{baz!:int}])): 1 matched, expected math.MultipleOf(2): // ./incomplete.cue:20:6 // ./incomplete.cue:20:13 + // ./incomplete.cue:21:6 bar: (int){ 2 } } } @@ -953,6 +973,7 @@ Result: // [incomplete] incomplete.incomplete5.x: invalid value {bar:2} (does not satisfy matchN(>1 & <=3, [{bar!:int},{foo!:int},{baz!:int}])): 1 matched, expected >1 & <=3: // ./incomplete.cue:24:6 // ./incomplete.cue:24:13 + // ./incomplete.cue:25:6 bar: (int){ 2 } } } @@ -961,6 +982,7 @@ Result: // [incomplete] incomplete.incomplete6.x: invalid value {bar:2} (does not satisfy matchN(2 | 3, [{bar!:int},{foo!:int},{baz!:int}])): 1 matched, expected 2 | 3: // ./incomplete.cue:28:6 // ./incomplete.cue:28:13 + // ./incomplete.cue:29:6 bar: (int){ 2 } } } @@ -970,6 +992,7 @@ Result: // [eval] incomplete.err1.x: invalid value {bar:2} (does not satisfy matchN(1, [{bar!:string}])): 0 matched, expected 1: // ./incomplete.cue:34:6 // ./incomplete.cue:34:13 + // ./incomplete.cue:35:6 bar: (int){ 2 } } } @@ -979,6 +1002,7 @@ Result: // [eval] incomplete.err2.x: invalid value {bar:2} (does not satisfy matchN(0, [{bar!:int},{foo!:int}])): 1 matched, expected 0: // ./incomplete.cue:40:6 // ./incomplete.cue:40:13 + // ./incomplete.cue:41:6 bar: (int){ 2 } } } @@ -988,6 +1012,7 @@ Result: // [eval] incomplete.err3.x: invalid value {bar:2} (does not satisfy matchN(2, [{bar!:string},{foo!:string}])): 0 matched, expected 2: // ./incomplete.cue:46:6 // ./incomplete.cue:46:13 + // ./incomplete.cue:47:6 bar: (int){ 2 } } } @@ -997,6 +1022,7 @@ Result: // [eval] incomplete.err4.x: invalid value {bar:2} (does not satisfy matchN(>1, [{bar!:string},{foo!:string}])): 0 matched, expected >1: // ./incomplete.cue:51:6 // ./incomplete.cue:51:13 + // ./incomplete.cue:52:6 bar: (int){ 2 } } } @@ -1006,6 +1032,7 @@ Result: // [eval] incomplete.err5.x: invalid value {bar:2} (does not satisfy matchN(<1, [{bar!:int},{foo!:int}])): 1 matched, expected <1: // ./incomplete.cue:55:6 // ./incomplete.cue:55:13 + // ./incomplete.cue:56:6 bar: (int){ 2 } } } @@ -1015,63 +1042,28 @@ Result: diff old new --- old +++ new -@@ -1,28 +1,22 @@ +@@ -1,9 +1,9 @@ Errors: -match.singleErr: invalid value {a:"foo"} (does not satisfy matchN(1, [{a:int}])): 0 matched, expected 1: +match.singleErr: invalid value {a:"foo"} (does not satisfy matchN(1, [~(#Foo)])): 0 matched, expected 1: ./in.cue:8:17 ./in.cue:8:24 -- ./in.cue:10:13 + ./in.cue:10:13 -match.incompleteErr: invalid value {a:string} (does not satisfy matchN(1, [{a:int}])): 0 matched, expected 1: +match.incompleteErr: invalid value {a:string} (does not satisfy matchN(1, [~(#Foo)])): 0 matched, expected 1: ./in.cue:12:21 ./in.cue:12:28 -- ./in.cue:14:17 - match.defaults.pickNested1Err: invalid value {a:*3 | int} (does not satisfy matchN(1, [{a:2}])): 0 matched, expected 1: - ./in.cue:36:23 - ./in.cue:36:30 -- ./in.cue:39:19 - match.defaults.pickNested2Err: invalid value {a:*3 | int} (does not satisfy matchN(1, [{a:<=2}])): 0 matched, expected 1: + ./in.cue:14:17 +@@ -15,7 +15,7 @@ ./in.cue:41:23 ./in.cue:41:30 -- ./in.cue:44:19 + ./in.cue:44:19 -not.singleErr: invalid value {a:2} (does not satisfy matchN(0, [{a:int}])): 1 matched, expected 0: +not.singleErr: invalid value {a:2} (does not satisfy matchN(0, [~(#Foo)])): 1 matched, expected 0: ./in.cue:74:17 ./in.cue:74:24 -- ./in.cue:76:13 - not.doubleErr: invalid value {a:"foo"} (does not satisfy matchN(0, [matchN(0, [#Foo])])): 1 matched, expected 0: - ./in.cue:78:17 - ./in.cue:78:24 -- ./in.cue:80:13 - oneOf.multiple1Err1: invalid value 1 (does not satisfy matchN(1, [math.MultipleOf(3),math.MultipleOf(5)])): 0 matched, expected 1: - ./in.cue:84:20 - ./in.cue:84:27 -@@ -50,23 +44,18 @@ - incomplete.err1.x: invalid value {bar:2} (does not satisfy matchN(1, [{bar!:string}])): 0 matched, expected 1: - ./incomplete.cue:34:6 - ./incomplete.cue:34:13 -- ./incomplete.cue:35:6 - incomplete.err2.x: invalid value {bar:2} (does not satisfy matchN(0, [{bar!:int},{foo!:int}])): 1 matched, expected 0: - ./incomplete.cue:40:6 - ./incomplete.cue:40:13 -- ./incomplete.cue:41:6 - incomplete.err3.x: invalid value {bar:2} (does not satisfy matchN(2, [{bar!:string},{foo!:string}])): 0 matched, expected 2: - ./incomplete.cue:46:6 - ./incomplete.cue:46:13 -- ./incomplete.cue:47:6 - incomplete.err4.x: invalid value {bar:2} (does not satisfy matchN(>1, [{bar!:string},{foo!:string}])): 0 matched, expected >1: - ./incomplete.cue:51:6 - ./incomplete.cue:51:13 -- ./incomplete.cue:52:6 - incomplete.err5.x: invalid value {bar:2} (does not satisfy matchN(<1, [{bar!:int},{foo!:int}])): 1 matched, expected <1: - ./incomplete.cue:55:6 - ./incomplete.cue:55:13 -- ./incomplete.cue:56:6 - - Result: - (_|_){ -@@ -80,10 +69,9 @@ + ./in.cue:76:13 +@@ -80,7 +80,7 @@ a: (int){ 2 } } singleErr: (_|_){ @@ -1079,11 +1071,8 @@ diff old new + // [eval] match.singleErr: invalid value {a:"foo"} (does not satisfy matchN(1, [~(#Foo)])): 0 matched, expected 1: // ./in.cue:8:17 // ./in.cue:8:24 -- // ./in.cue:10:13 - a: (string){ "foo" } - } - incompleteOK: (struct){ -@@ -90,10 +78,9 @@ + // ./in.cue:10:13 +@@ -90,7 +90,7 @@ a: (int){ int } } incompleteErr: (_|_){ @@ -1091,11 +1080,8 @@ diff old new + // [eval] match.incompleteErr: invalid value {a:string} (does not satisfy matchN(1, [~(#Foo)])): 0 matched, expected 1: // ./in.cue:12:21 // ./in.cue:12:28 -- // ./in.cue:14:17 - a: (string){ string } - } - #A: (#struct){ -@@ -106,7 +93,7 @@ + // ./in.cue:14:17 +@@ -106,7 +106,7 @@ 0: (int){ 2 } }), int) }) } pickTopOK2: (int){ &(matchN(1, (#list){ @@ -1104,23 +1090,7 @@ diff old new } }), int) } pickTopErr: (int){ &(matchN(1, (#list){ -@@ -122,7 +109,6 @@ - // [eval] match.defaults.pickNested1Err: invalid value {a:*3 | int} (does not satisfy matchN(1, [{a:2}])): 0 matched, expected 1: - // ./in.cue:36:23 - // ./in.cue:36:30 -- // ./in.cue:39:19 - a: (int){ |(*(int){ 3 }, (int){ int }) } - } - pickNested2OK1: (struct){ -@@ -135,7 +121,6 @@ - // [eval] match.defaults.pickNested2Err: invalid value {a:*3 | int} (does not satisfy matchN(1, [{a:<=2}])): 0 matched, expected 1: - // ./in.cue:41:23 - // ./in.cue:41:30 -- // ./in.cue:44:19 - a: (int){ |(*(int){ 3 }, (int){ int }) } - } - } -@@ -167,10 +152,9 @@ +@@ -167,7 +167,7 @@ a: (string){ "foo" } } singleErr: (_|_){ @@ -1128,19 +1098,8 @@ diff old new + // [eval] not.singleErr: invalid value {a:2} (does not satisfy matchN(0, [~(#Foo)])): 1 matched, expected 0: // ./in.cue:74:17 // ./in.cue:74:24 -- // ./in.cue:76:13 - a: (int){ 2 } - } - doubleOK: (struct){ -@@ -180,7 +164,6 @@ - // [eval] not.doubleErr: invalid value {a:"foo"} (does not satisfy matchN(0, [matchN(0, [#Foo])])): 1 matched, expected 0: - // ./in.cue:78:17 - // ./in.cue:78:24 -- // ./in.cue:80:13 - a: (string){ "foo" } - } - } -@@ -239,21 +222,21 @@ + // ./in.cue:76:13 +@@ -239,21 +239,21 @@ embed: (struct){ t1: (struct){ a: (_){ matchN(1, (#list){ @@ -1177,7 +1136,7 @@ diff old new } }) } } -@@ -261,21 +244,21 @@ +@@ -261,21 +261,21 @@ direct: (struct){ t1: (struct){ a: (_){ matchN(1, (#list){ @@ -1214,7 +1173,7 @@ diff old new } }) } } -@@ -289,9 +272,9 @@ +@@ -289,9 +289,9 @@ } ok2: (struct){ x: (_){ matchN(0, (#list){ @@ -1227,13 +1186,7 @@ diff old new } }) } } -@@ -308,15 +291,14 @@ - // [incomplete] incomplete.incomplete1.x: invalid value {bar:2} (does not satisfy matchN(1, [{foo!:string}])): 0 matched, expected 1: - // ./incomplete.cue:7:6 - // ./incomplete.cue:7:13 -- // ./incomplete.cue:8:6 - bar: (int){ 2 } - } +@@ -314,9 +314,9 @@ } incomplete2: (struct){ x: (_){ matchN(1, (#list){ @@ -1246,78 +1199,6 @@ diff old new } }) } } -@@ -325,7 +307,6 @@ - // [incomplete] incomplete.incomplete3.x: invalid value {bar:2} (does not satisfy matchN(math.MultipleOf(2), [{bar!:int},{foo!:int}])): 1 matched, expected math.MultipleOf(2): - // ./incomplete.cue:16:6 - // ./incomplete.cue:16:13 -- // ./incomplete.cue:17:6 - bar: (int){ 2 } - } - } -@@ -334,7 +315,6 @@ - // [incomplete] incomplete.incomplete4.x: invalid value {bar:2} (does not satisfy matchN(math.MultipleOf(2), [{bar!:int},{foo!:int},{baz!:int}])): 1 matched, expected math.MultipleOf(2): - // ./incomplete.cue:20:6 - // ./incomplete.cue:20:13 -- // ./incomplete.cue:21:6 - bar: (int){ 2 } - } - } -@@ -343,7 +323,6 @@ - // [incomplete] incomplete.incomplete5.x: invalid value {bar:2} (does not satisfy matchN(>1 & <=3, [{bar!:int},{foo!:int},{baz!:int}])): 1 matched, expected >1 & <=3: - // ./incomplete.cue:24:6 - // ./incomplete.cue:24:13 -- // ./incomplete.cue:25:6 - bar: (int){ 2 } - } - } -@@ -352,7 +331,6 @@ - // [incomplete] incomplete.incomplete6.x: invalid value {bar:2} (does not satisfy matchN(2 | 3, [{bar!:int},{foo!:int},{baz!:int}])): 1 matched, expected 2 | 3: - // ./incomplete.cue:28:6 - // ./incomplete.cue:28:13 -- // ./incomplete.cue:29:6 - bar: (int){ 2 } - } - } -@@ -362,7 +340,6 @@ - // [eval] incomplete.err1.x: invalid value {bar:2} (does not satisfy matchN(1, [{bar!:string}])): 0 matched, expected 1: - // ./incomplete.cue:34:6 - // ./incomplete.cue:34:13 -- // ./incomplete.cue:35:6 - bar: (int){ 2 } - } - } -@@ -372,7 +349,6 @@ - // [eval] incomplete.err2.x: invalid value {bar:2} (does not satisfy matchN(0, [{bar!:int},{foo!:int}])): 1 matched, expected 0: - // ./incomplete.cue:40:6 - // ./incomplete.cue:40:13 -- // ./incomplete.cue:41:6 - bar: (int){ 2 } - } - } -@@ -382,7 +358,6 @@ - // [eval] incomplete.err3.x: invalid value {bar:2} (does not satisfy matchN(2, [{bar!:string},{foo!:string}])): 0 matched, expected 2: - // ./incomplete.cue:46:6 - // ./incomplete.cue:46:13 -- // ./incomplete.cue:47:6 - bar: (int){ 2 } - } - } -@@ -392,7 +367,6 @@ - // [eval] incomplete.err4.x: invalid value {bar:2} (does not satisfy matchN(>1, [{bar!:string},{foo!:string}])): 0 matched, expected >1: - // ./incomplete.cue:51:6 - // ./incomplete.cue:51:13 -- // ./incomplete.cue:52:6 - bar: (int){ 2 } - } - } -@@ -402,7 +376,6 @@ - // [eval] incomplete.err5.x: invalid value {bar:2} (does not satisfy matchN(<1, [{bar!:int},{foo!:int}])): 1 matched, expected <1: - // ./incomplete.cue:55:6 - // ./incomplete.cue:55:13 -- // ./incomplete.cue:56:6 - bar: (int){ 2 } - } - } -- diff/explanation -- The old evaluator does not correctly handle ToDataAll if a node is mid-evaluation. The new evaluator does. diff --git a/cue/testdata/builtins/validators.txtar b/cue/testdata/builtins/validators.txtar index d7bbbc627a6..d27a8a8fd72 100644 --- a/cue/testdata/builtins/validators.txtar +++ b/cue/testdata/builtins/validators.txtar @@ -216,6 +216,7 @@ issue3418.t2: invalid value "foo" (does not satisfy matchN(1, _|_(0: conflicting issue3418.t3.x: invalid value "foo" (does not satisfy matchN(1, _|_(0: conflicting values 2 and 1))): conflicting values 2 and 1: ./issue3418.cue:6:5 ./issue3418.cue:4:5 + ./issue3418.cue:5:5 ./issue3418.cue:6:12 ./issue3418.cue:6:16 ./issue3418.cue:6:18 @@ -225,19 +226,24 @@ issue3418.t4.x: invalid value "foo" (does not satisfy matchN(1, _|_(0: conflicti ./issue3418.cue:10:12 ./issue3418.cue:10:16 ./issue3418.cue:10:18 + ./issue3418.cue:11:5 issue3474.structValidator.failAfter.A: invalid value {C:true,B:true} (does not satisfy struct.MaxFields(1)): len(fields) > MaxFields(1) (2 > 1): ./issue3474.cue:12:5 ./issue3474.cue:12:22 + ./issue3474.cue:13:5 issue3474.structValidator.failClosed.#A: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): ./issue3474.cue:27:6 ./issue3474.cue:27:23 + ./issue3474.cue:28:6 issue3474.topValidator.fail.A: invalid value 1 (does not satisfy matchN(1, [>10])): 0 matched, expected 1: ./issue3474.cue:41:5 ./issue3474.cue:41:12 + ./issue3474.cue:42:5 ./issue3474.cue:43:12 issue3474.topValidator.failType.A: invalid value {C:1} (does not satisfy matchN(1, [>10])): 0 matched, expected 1: ./issue3474.cue:53:5 ./issue3474.cue:53:12 + ./issue3474.cue:54:5 Result: (_|_){ @@ -257,6 +263,7 @@ Result: kv: (_|_){ // [incomplete] incompleteError2.MyType.kv: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): // ./in.cue:22:7 + // ./in.cue:21:7 // ./in.cue:22:24 } } @@ -280,6 +287,7 @@ Result: kv: (_|_){ // [incomplete] violation.#MyType.kv: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): // ./in.cue:49:7 + // ./in.cue:48:7 // ./in.cue:49:24 } } @@ -330,6 +338,7 @@ Result: _a: (_|_){ // [incomplete] issue2098.incomplete1._a: invalid value [] (does not satisfy list.MinItems(1)): len(list) < MinItems(1) (0 < 1): // ./in.cue:112:6 + // ./in.cue:111:6 // ./in.cue:112:20 } } @@ -358,6 +367,7 @@ Result: // [eval] issue3418.t3.x: invalid value "foo" (does not satisfy matchN(1, _|_(0: conflicting values 2 and 1))): conflicting values 2 and 1: // ./issue3418.cue:6:5 // ./issue3418.cue:4:5 + // ./issue3418.cue:5:5 // ./issue3418.cue:6:12 // ./issue3418.cue:6:16 // ./issue3418.cue:6:18 @@ -372,6 +382,7 @@ Result: // ./issue3418.cue:10:12 // ./issue3418.cue:10:16 // ./issue3418.cue:10:18 + // ./issue3418.cue:11:5 } } } @@ -390,6 +401,7 @@ Result: // [eval] issue3474.structValidator.failAfter.A: invalid value {C:true,B:true} (does not satisfy struct.MaxFields(1)): len(fields) > MaxFields(1) (2 > 1): // ./issue3474.cue:12:5 // ./issue3474.cue:12:22 + // ./issue3474.cue:13:5 C: (bool){ true } B: (bool){ true } } @@ -399,6 +411,7 @@ Result: // [incomplete] issue3474.structValidator.incomplete.A: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): // ./issue3474.cue:20:5 // ./issue3474.cue:20:22 + // ./issue3474.cue:21:5 } } failClosed: (_|_){ @@ -407,6 +420,7 @@ Result: // [eval] issue3474.structValidator.failClosed.#A: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): // ./issue3474.cue:27:6 // ./issue3474.cue:27:23 + // ./issue3474.cue:28:6 } } } @@ -421,6 +435,7 @@ Result: // [eval] issue3474.topValidator.fail.A: invalid value 1 (does not satisfy matchN(1, [>10])): 0 matched, expected 1: // ./issue3474.cue:41:5 // ./issue3474.cue:41:12 + // ./issue3474.cue:42:5 // ./issue3474.cue:43:12 } } @@ -436,6 +451,7 @@ Result: // [eval] issue3474.topValidator.failType.A: invalid value {C:1} (does not satisfy matchN(1, [>10])): 0 matched, expected 1: // ./issue3474.cue:53:5 // ./issue3474.cue:53:12 + // ./issue3474.cue:54:5 C: (int){ 1 } } } @@ -446,7 +462,7 @@ Result: diff old new --- old +++ new -@@ -1,49 +1,43 @@ +@@ -1,19 +1,19 @@ Errors: callOfCallToValidator.e: cannot call previously called validator b: ./in.cue:94:5 @@ -468,7 +484,8 @@ diff old new +issue3418.t3.x: invalid value "foo" (does not satisfy matchN(1, _|_(0: conflicting values 2 and 1))): conflicting values 2 and 1: ./issue3418.cue:6:5 ./issue3418.cue:4:5 -- ./issue3418.cue:5:5 + ./issue3418.cue:5:5 +@@ -20,7 +20,7 @@ ./issue3418.cue:6:12 ./issue3418.cue:6:16 ./issue3418.cue:6:18 @@ -477,47 +494,16 @@ diff old new ./issue3418.cue:10:5 ./issue3418.cue:9:5 ./issue3418.cue:10:12 +@@ -27,7 +27,7 @@ ./issue3418.cue:10:16 ./issue3418.cue:10:18 -- ./issue3418.cue:11:5 + ./issue3418.cue:11:5 -issue3474.structValidator.failAfter.A: invalid value {C:true,B*:if true true} (does not satisfy struct.MaxFields(1)): len(fields) > MaxFields(1) (2 > 1): +issue3474.structValidator.failAfter.A: invalid value {C:true,B:true} (does not satisfy struct.MaxFields(1)): len(fields) > MaxFields(1) (2 > 1): ./issue3474.cue:12:5 ./issue3474.cue:12:22 -- ./issue3474.cue:13:5 - issue3474.structValidator.failClosed.#A: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): - ./issue3474.cue:27:6 - ./issue3474.cue:27:23 -- ./issue3474.cue:28:6 - issue3474.topValidator.fail.A: invalid value 1 (does not satisfy matchN(1, [>10])): 0 matched, expected 1: - ./issue3474.cue:41:5 - ./issue3474.cue:41:12 -- ./issue3474.cue:42:5 - ./issue3474.cue:43:12 - issue3474.topValidator.failType.A: invalid value {C:1} (does not satisfy matchN(1, [>10])): 0 matched, expected 1: - ./issue3474.cue:53:5 - ./issue3474.cue:53:12 -- ./issue3474.cue:54:5 - - Result: - (_|_){ -@@ -63,7 +57,6 @@ - kv: (_|_){ - // [incomplete] incompleteError2.MyType.kv: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): - // ./in.cue:22:7 -- // ./in.cue:21:7 - // ./in.cue:22:24 - } - } -@@ -87,7 +80,6 @@ - kv: (_|_){ - // [incomplete] violation.#MyType.kv: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): - // ./in.cue:49:7 -- // ./in.cue:48:7 - // ./in.cue:49:24 - } - } -@@ -134,15 +126,10 @@ + ./issue3474.cue:13:5 +@@ -134,11 +134,7 @@ 0: (int){ 1 } } } @@ -530,11 +516,7 @@ diff old new _a: (_|_){ // [incomplete] issue2098.incomplete1._a: invalid value [] (does not satisfy list.MinItems(1)): len(list) < MinItems(1) (0 < 1): // ./in.cue:112:6 -- // ./in.cue:111:6 - // ./in.cue:112:20 - } - } -@@ -150,7 +137,7 @@ +@@ -150,7 +146,7 @@ issue3418: (_|_){ // [eval] t1: (_|_){ @@ -543,7 +525,7 @@ diff old new // ./issue3418.cue:1:24 // ./issue3418.cue:1:16 // ./issue3418.cue:1:31 -@@ -158,7 +145,7 @@ +@@ -158,7 +154,7 @@ // ./issue3418.cue:1:37 } t2: (_|_){ @@ -552,7 +534,7 @@ diff old new // ./issue3418.cue:2:41 // ./issue3418.cue:2:16 // ./issue3418.cue:2:48 -@@ -168,10 +155,9 @@ +@@ -168,7 +164,7 @@ t3: (_|_){ // [eval] x: (_|_){ @@ -560,11 +542,8 @@ diff old new + // [eval] issue3418.t3.x: invalid value "foo" (does not satisfy matchN(1, _|_(0: conflicting values 2 and 1))): conflicting values 2 and 1: // ./issue3418.cue:6:5 // ./issue3418.cue:4:5 -- // ./issue3418.cue:5:5 - // ./issue3418.cue:6:12 - // ./issue3418.cue:6:16 - // ./issue3418.cue:6:18 -@@ -180,13 +166,12 @@ + // ./issue3418.cue:5:5 +@@ -180,7 +176,7 @@ t4: (_|_){ // [eval] x: (_|_){ @@ -573,13 +552,7 @@ diff old new // ./issue3418.cue:10:5 // ./issue3418.cue:9:5 // ./issue3418.cue:10:12 - // ./issue3418.cue:10:16 - // ./issue3418.cue:10:18 -- // ./issue3418.cue:11:5 - } - } - } -@@ -202,10 +187,9 @@ +@@ -202,7 +198,7 @@ failAfter: (_|_){ // [eval] A: (_|_){ @@ -587,33 +560,8 @@ diff old new + // [eval] issue3474.structValidator.failAfter.A: invalid value {C:true,B:true} (does not satisfy struct.MaxFields(1)): len(fields) > MaxFields(1) (2 > 1): // ./issue3474.cue:12:5 // ./issue3474.cue:12:22 -- // ./issue3474.cue:13:5 - C: (bool){ true } - B: (bool){ true } - } -@@ -215,7 +199,6 @@ - // [incomplete] issue3474.structValidator.incomplete.A: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): - // ./issue3474.cue:20:5 - // ./issue3474.cue:20:22 -- // ./issue3474.cue:21:5 - } - } - failClosed: (_|_){ -@@ -224,7 +207,6 @@ - // [eval] issue3474.structValidator.failClosed.#A: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): - // ./issue3474.cue:27:6 - // ./issue3474.cue:27:23 -- // ./issue3474.cue:28:6 - } - } - } -@@ -239,13 +221,12 @@ - // [eval] issue3474.topValidator.fail.A: invalid value 1 (does not satisfy matchN(1, [>10])): 0 matched, expected 1: - // ./issue3474.cue:41:5 - // ./issue3474.cue:41:12 -- // ./issue3474.cue:42:5 - // ./issue3474.cue:43:12 - } + // ./issue3474.cue:13:5 +@@ -245,7 +241,7 @@ } incomplete: (struct){ A: (int){ &(matchN(1, (#list){ @@ -622,14 +570,6 @@ diff old new } }), int) } } -@@ -255,7 +236,6 @@ - // [eval] issue3474.topValidator.failType.A: invalid value {C:1} (does not satisfy matchN(1, [>10])): 0 matched, expected 1: - // ./issue3474.cue:53:5 - // ./issue3474.cue:53:12 -- // ./issue3474.cue:54:5 - C: (int){ 1 } - } - } -- out/eval -- Errors: callOfCallToValidator.e: cannot call previously called validator b: diff --git a/cue/testdata/comprehensions/issue837.txtar b/cue/testdata/comprehensions/issue837.txtar index fa788ff611c..0a13b3c49cd 100644 --- a/cue/testdata/comprehensions/issue837.txtar +++ b/cue/testdata/comprehensions/issue837.txtar @@ -88,7 +88,9 @@ _params.hsize.$_instances.$_instances: field not allowed: ./in.cue:51:14 _params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int): ./in.cue:56:15 + ./in.cue:29:20 ./in.cue:56:17 + ./in.cue:61:39 _params.hsize.$_instances.$_instances: field not allowed: ./in.cue:56:15 ./in.cue:56:2 @@ -150,7 +152,9 @@ Result: // ./in.cue:56:2 // _params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int): // ./in.cue:56:15 + // ./in.cue:29:20 // ./in.cue:56:17 + // ./in.cue:61:39 // _params.hsize.$_instances.$_instances: field not allowed: // ./in.cue:56:15 // ./in.cue:56:2 @@ -180,6 +184,7 @@ Result: // ./in.cue:56:2 // _params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int): // ./in.cue:56:15 + // ./in.cue:29:20 // ./in.cue:56:17 // _params.hsize.$_instances.$_instances: field not allowed: // ./in.cue:56:15 @@ -197,6 +202,7 @@ Result: // ./in.cue:56:2 // _params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int): // ./in.cue:56:15 + // ./in.cue:29:20 // ./in.cue:56:17 // _params.hsize.$_instances.$_instances: field not allowed: // ./in.cue:56:15 @@ -242,7 +248,7 @@ Result: diff old new --- old +++ new -@@ -1,10 +1,21 @@ +@@ -1,10 +1,23 @@ Errors: -#Configure.service.description.role: undefined field: role: - ./in.cue:40:19 @@ -261,14 +267,16 @@ diff old new ./in.cue:51:14 +_params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int): + ./in.cue:56:15 ++ ./in.cue:29:20 + ./in.cue:56:17 ++ ./in.cue:61:39 +_params.hsize.$_instances.$_instances: field not allowed: + ./in.cue:56:15 + ./in.cue:56:2 Result: (_|_){ -@@ -13,24 +24,10 @@ +@@ -13,24 +26,10 @@ ref: (#struct){ kind: (string){ "deployment" } } @@ -295,7 +303,7 @@ diff old new description: (_|_){ // [incomplete] #Manifest.description: unresolved disjunction "service" | "deployment" (type string): // ./in.cue:5:15 -@@ -42,16 +39,10 @@ +@@ -42,16 +41,10 @@ #KindsNames: (string){ |((string){ "service" }, (string){ "deployment" }) } #KumoriKinds: (#struct){ deployment: (#struct){ @@ -316,7 +324,7 @@ diff old new } } } -@@ -58,24 +49,7 @@ +@@ -58,24 +51,7 @@ #DoDeploy: (_|_){ // [eval] _params: (#struct){ @@ -342,7 +350,7 @@ diff old new } deployment: (_|_){ // [eval] -@@ -82,34 +56,28 @@ +@@ -82,34 +58,30 @@ description: (_|_){ // [eval] let dep#1 = (#struct){ @@ -389,14 +397,16 @@ diff old new + // ./in.cue:56:2 + // _params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int): + // ./in.cue:56:15 ++ // ./in.cue:29:20 + // ./in.cue:56:17 ++ // ./in.cue:61:39 + // _params.hsize.$_instances.$_instances: field not allowed: + // ./in.cue:56:15 + // ./in.cue:56:2 } } } -@@ -125,15 +93,38 @@ +@@ -125,15 +97,40 @@ description: (_|_){ // [eval] let configed#2 = (_|_){ @@ -416,6 +426,7 @@ diff old new + // ./in.cue:56:2 + // _params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int): + // ./in.cue:56:15 ++ // ./in.cue:29:20 + // ./in.cue:56:17 + // _params.hsize.$_instances.$_instances: field not allowed: + // ./in.cue:56:15 @@ -435,6 +446,7 @@ diff old new + // ./in.cue:56:2 + // _params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int): + // ./in.cue:56:15 ++ // ./in.cue:29:20 + // ./in.cue:56:17 + // _params.hsize.$_instances.$_instances: field not allowed: + // ./in.cue:56:15 @@ -442,7 +454,7 @@ diff old new } } } -@@ -141,9 +132,7 @@ +@@ -141,9 +138,7 @@ #RelabelService: (_|_){ // [eval] _params: (#struct){ @@ -453,7 +465,7 @@ diff old new } out: (_|_){ // [eval] -@@ -157,16 +146,10 @@ +@@ -157,16 +152,10 @@ $_instances: (number){ |(*(int){ 1 }, (number){ >=0 }) } } #Deployment: (#struct){ diff --git a/cue/testdata/comprehensions/pushdown.txtar b/cue/testdata/comprehensions/pushdown.txtar index 6029b642c53..96d05d37842 100644 --- a/cue/testdata/comprehensions/pushdown.txtar +++ b/cue/testdata/comprehensions/pushdown.txtar @@ -884,6 +884,7 @@ Result: // [incomplete] embed.incomplete7.p: non-concrete value int in operand to +: // ./in.cue:93:6 // ./in.cue:94:6 + // ./in.cue:95:3 } q: (int){ int } } @@ -1479,15 +1480,7 @@ diff old new // ./in.cue:74:4 q: (int){ 1 } } -@@ -130,7 +111,6 @@ - // [incomplete] embed.incomplete7.p: non-concrete value int in operand to +: - // ./in.cue:93:6 - // ./in.cue:94:6 -- // ./in.cue:95:3 - } - q: (int){ int } - } -@@ -179,8 +159,7 @@ +@@ -179,8 +160,7 @@ // [structural cycle] noStackOverflowStructCycle.list.tail: structural cycle } } @@ -1497,7 +1490,7 @@ diff old new t1: (struct){ #a: (_|_){ // [incomplete] provideIncompleteSuccess.t1.#a: incomplete bool: bool: -@@ -188,16 +167,12 @@ +@@ -188,16 +168,12 @@ b: (bool){ bool } } x: (#struct){ @@ -1520,7 +1513,7 @@ diff old new #a: (#struct){ c: (int){ 4 } b: (bool){ true } -@@ -204,17 +179,8 @@ +@@ -204,17 +180,8 @@ } #c: (#struct){ } @@ -1540,7 +1533,7 @@ diff old new } b: (bool){ true } } -@@ -244,9 +210,22 @@ +@@ -244,9 +211,22 @@ } cyclicError: (struct){ a: (_|_){ @@ -1566,7 +1559,7 @@ diff old new } } midwayReferences: (struct){ -@@ -260,24 +239,9 @@ +@@ -260,24 +240,9 @@ } } } @@ -1594,7 +1587,7 @@ diff old new } closedCheck: (struct){ success1: (struct){ -@@ -380,13 +344,7 @@ +@@ -380,13 +345,7 @@ } } } @@ -1609,7 +1602,7 @@ diff old new #F: (#struct){ e: (bool){ bool } f: (_|_){ -@@ -403,17 +361,10 @@ +@@ -403,17 +362,10 @@ } } E: (_|_){ @@ -1628,7 +1621,7 @@ diff old new } } derefDisj2: (struct){ -@@ -424,17 +375,10 @@ +@@ -424,17 +376,10 @@ } } E: (_|_){ @@ -1647,7 +1640,7 @@ diff old new } } bulk1: (struct){ -@@ -557,9 +501,7 @@ +@@ -557,9 +502,7 @@ // [eval] e: (_|_){ // [eval] structShare.err1.x.d.e: field not allowed: @@ -1658,7 +1651,7 @@ diff old new // ./in.cue:578:9 } } -@@ -583,13 +525,13 @@ +@@ -583,13 +526,13 @@ } envs: (struct){ e1: (#struct){ @@ -1676,7 +1669,7 @@ diff old new } } } -@@ -626,9 +568,8 @@ +@@ -626,9 +569,8 @@ _c: (struct){ y: (int){ 1 } } diff --git a/cue/testdata/cycle/builtins.txtar b/cue/testdata/cycle/builtins.txtar index 3ff553d5862..c583dcc4beb 100644 --- a/cue/testdata/cycle/builtins.txtar +++ b/cue/testdata/cycle/builtins.txtar @@ -177,6 +177,8 @@ issue3443.matchIf.#S: cannot call non-function matchIf (type struct): issue3443.cycle1.cycle.s: invalid value {n:{n:_}} (does not satisfy matchN(1, [{n:matchN(1, [{n:#S}])}])): 0 matched, expected 1: ./matchn.cue:35:7 ./matchn.cue:35:14 + ./matchn.cue:47:7 + ./matchn.cue:48:7 issue3443.cycle2.fail.#S: invalid value {n:{n:{n:_}}} (does not satisfy matchN(1, [{n:~(issue3443.cycle2.fail.#S)}])): 0 matched, expected 1: ./matchn.cue:55:13 ./matchn.cue:55:20 @@ -323,6 +325,8 @@ Result: // [eval] issue3443.cycle1.cycle.s: invalid value {n:{n:_}} (does not satisfy matchN(1, [{n:matchN(1, [{n:#S}])}])): 0 matched, expected 1: // ./matchn.cue:35:7 // ./matchn.cue:35:14 + // ./matchn.cue:47:7 + // ./matchn.cue:48:7 n: (struct){ n: (_){ _ } } @@ -351,7 +355,7 @@ Result: diff old new --- old +++ new -@@ -1,7 +1,10 @@ +@@ -1,7 +1,12 @@ Errors: issue3443.matchIf.#S: cannot call non-function matchIf (type struct): ./matchn.cue:16:7 @@ -359,11 +363,13 @@ diff old new +issue3443.cycle1.cycle.s: invalid value {n:{n:_}} (does not satisfy matchN(1, [{n:matchN(1, [{n:#S}])}])): 0 matched, expected 1: + ./matchn.cue:35:7 + ./matchn.cue:35:14 ++ ./matchn.cue:47:7 ++ ./matchn.cue:48:7 +issue3443.cycle2.fail.#S: invalid value {n:{n:{n:_}}} (does not satisfy matchN(1, [{n:~(issue3443.cycle2.fail.#S)}])): 0 matched, expected 1: ./matchn.cue:55:13 ./matchn.cue:55:20 -@@ -65,20 +68,20 @@ +@@ -65,20 +70,20 @@ issue3410: (struct){ _s: (struct){ #x: (_){ matchN(1, (#list){ @@ -392,7 +398,7 @@ diff old new } }) } } -@@ -85,9 +88,9 @@ +@@ -85,9 +90,9 @@ issue3420: (struct){ matches1: (struct){ #S: (_){ matchN(1, (#list){ @@ -405,7 +411,7 @@ diff old new } }) } s: (int){ 2 } -@@ -104,13 +107,13 @@ +@@ -104,13 +109,13 @@ } noCycle: (struct){ #S: (_){ matchN(1, (#list){ @@ -422,7 +428,7 @@ diff old new n: (struct){ n: (_){ _ } } -@@ -119,29 +122,34 @@ +@@ -119,29 +124,36 @@ } noCycle2: (struct){ #S: (_){ matchN(1, (#list){ @@ -467,10 +473,12 @@ diff old new + // [eval] issue3443.cycle1.cycle.s: invalid value {n:{n:_}} (does not satisfy matchN(1, [{n:matchN(1, [{n:#S}])}])): 0 matched, expected 1: + // ./matchn.cue:35:7 + // ./matchn.cue:35:14 ++ // ./matchn.cue:47:7 ++ // ./matchn.cue:48:7 n: (struct){ n: (_){ _ } } -@@ -153,7 +161,7 @@ +@@ -153,7 +165,7 @@ fail: (_|_){ // [eval] #S: (_|_){ diff --git a/cue/testdata/cycle/disjunction.txtar b/cue/testdata/cycle/disjunction.txtar index 5998e43c0ed..0377a8b73b0 100644 --- a/cue/testdata/cycle/disjunction.txtar +++ b/cue/testdata/cycle/disjunction.txtar @@ -184,6 +184,8 @@ issue3042.data.secret.infra.0.name: field not allowed: ./issue3042.cue:10:6 issue3042.data.secret.infra.0.name: invalid value "bar1" (out of bound =~"^foo"): ./issue3042.cue:4:8 + ./issue3042.cue:5:29 + ./issue3042.cue:5:45 ./issue3042.cue:10:12 issue3042.data.secret: field not allowed: ./issue3042.cue:5:57 @@ -302,6 +304,8 @@ Result: // ./issue3042.cue:10:6 // issue3042.data.secret.infra.0.name: invalid value "bar1" (out of bound =~"^foo"): // ./issue3042.cue:4:8 + // ./issue3042.cue:5:29 + // ./issue3042.cue:5:45 // ./issue3042.cue:10:12 // issue3042.data.secret: field not allowed: // ./issue3042.cue:5:57 @@ -322,7 +326,7 @@ Result: diff old new --- old +++ new -@@ -1,9 +1,59 @@ +@@ -1,9 +1,61 @@ Errors: cycle.a: structural cycle +issue3042.data: conflicting values [...#nesting] and {secret:{infra:[{name:"bar1"}]}} (mismatched types list and struct): @@ -365,6 +369,8 @@ diff old new + ./issue3042.cue:10:6 +issue3042.data.secret.infra.0.name: invalid value "bar1" (out of bound =~"^foo"): + ./issue3042.cue:4:8 ++ ./issue3042.cue:5:29 ++ ./issue3042.cue:5:45 + ./issue3042.cue:10:12 +issue3042.data.secret: field not allowed: + ./issue3042.cue:5:57 @@ -383,7 +389,7 @@ diff old new cycle: (_|_){ // [structural cycle] a: (_|_){ -@@ -58,22 +108,69 @@ +@@ -58,22 +110,71 @@ x: (#list){ } } @@ -447,6 +453,8 @@ diff old new + // ./issue3042.cue:10:6 + // issue3042.data.secret.infra.0.name: invalid value "bar1" (out of bound =~"^foo"): + // ./issue3042.cue:4:8 ++ // ./issue3042.cue:5:29 ++ // ./issue3042.cue:5:45 + // ./issue3042.cue:10:12 + // issue3042.data.secret: field not allowed: + // ./issue3042.cue:5:57 diff --git a/cue/testdata/cycle/issue3118.txtar b/cue/testdata/cycle/issue3118.txtar index 91dcdb8602c..70236a769c4 100644 --- a/cue/testdata/cycle/issue3118.txtar +++ b/cue/testdata/cycle/issue3118.txtar @@ -76,9 +76,11 @@ Disjuncts: 19 // #TimeSpan.start: non-concrete value float in operand to -: // ./in.cue:6:12 // ./in.cue:4:12 + // ./in.cue:8:12 // #TimeSpan.duration: non-concrete value float in operand to -: // ./in.cue:7:12 // ./in.cue:4:12 + // ./in.cue:8:12 } duration: (_|_){ // [incomplete] #TimeSpan.start: non-concrete value end for bound <=: @@ -86,6 +88,7 @@ Disjuncts: 19 // #TimeSpan.duration: non-concrete value float in operand to -: // ./in.cue:7:12 // ./in.cue:4:12 + // ./in.cue:8:12 } end: (_|_){ // [incomplete] #TimeSpan.start: non-concrete value end for bound <=: @@ -93,9 +96,11 @@ Disjuncts: 19 // #TimeSpan.start: non-concrete value float in operand to -: // ./in.cue:6:12 // ./in.cue:4:12 + // ./in.cue:8:12 // #TimeSpan.duration: non-concrete value float in operand to -: // ./in.cue:7:12 // ./in.cue:4:12 + // ./in.cue:8:12 } } examples: (struct){ @@ -111,6 +116,7 @@ Disjuncts: 19 // examples.eg2.duration: non-concrete value float in operand to -: // ./in.cue:7:12 // ./in.cue:4:12 + // ./in.cue:8:12 } duration: (_|_){ // [incomplete] examples.eg2.start: non-concrete value end for bound <=: @@ -118,6 +124,7 @@ Disjuncts: 19 // examples.eg2.duration: non-concrete value float in operand to -: // ./in.cue:7:12 // ./in.cue:4:12 + // ./in.cue:8:12 } end: (_|_){ // [incomplete] examples.eg2.start: non-concrete value end for bound <=: @@ -125,22 +132,29 @@ Disjuncts: 19 // examples.eg2.duration: non-concrete value float in operand to -: // ./in.cue:7:12 // ./in.cue:4:12 + // ./in.cue:8:12 } } eg3: (#struct){ end: (_|_){ // [incomplete] examples.eg3.duration: non-concrete value <=10.0 & float in operand to -: // ./in.cue:7:12 + // ./in.cue:2:12 + // ./in.cue:6:12 // ./in.cue:10:9 } start: (_|_){ // [incomplete] examples.eg3.duration: non-concrete value <=10.0 & float in operand to -: // ./in.cue:7:12 + // ./in.cue:2:12 + // ./in.cue:6:12 // ./in.cue:10:9 } duration: (_|_){ // [incomplete] examples.eg3.duration: non-concrete value <=10.0 & float in operand to -: // ./in.cue:7:12 + // ./in.cue:2:12 + // ./in.cue:6:12 // ./in.cue:10:9 } } @@ -152,7 +166,7 @@ the new evaluator includes positions with the cycle error and the old evaluator diff old new --- old +++ new -@@ -1,15 +1,31 @@ +@@ -1,14 +1,35 @@ (struct){ #TimeSpan: (#struct){ start: (_|_){ @@ -162,9 +176,11 @@ diff old new + // #TimeSpan.start: non-concrete value float in operand to -: + // ./in.cue:6:12 + // ./in.cue:4:12 ++ // ./in.cue:8:12 + // #TimeSpan.duration: non-concrete value float in operand to -: + // ./in.cue:7:12 + // ./in.cue:4:12 ++ // ./in.cue:8:12 } duration: (_|_){ - // [cycle] cycle error: @@ -174,22 +190,23 @@ diff old new + // #TimeSpan.duration: non-concrete value float in operand to -: + // ./in.cue:7:12 + // ./in.cue:4:12 ++ // ./in.cue:8:12 } end: (_|_){ - // [cycle] cycle error: -- // ./in.cue:8:12 + // [incomplete] #TimeSpan.start: non-concrete value end for bound <=: + // ./in.cue:10:11 + // #TimeSpan.start: non-concrete value float in operand to -: + // ./in.cue:6:12 + // ./in.cue:4:12 ++ // ./in.cue:8:12 + // #TimeSpan.duration: non-concrete value float in operand to -: + // ./in.cue:7:12 + // ./in.cue:4:12 + // ./in.cue:8:12 } } - examples: (struct){ -@@ -20,26 +36,42 @@ +@@ -20,26 +41,51 @@ } eg2: (#struct){ start: (_|_){ @@ -206,6 +223,7 @@ diff old new + // examples.eg2.duration: non-concrete value float in operand to -: + // ./in.cue:7:12 + // ./in.cue:4:12 ++ // ./in.cue:8:12 + } + duration: (_|_){ + // [incomplete] examples.eg2.start: non-concrete value end for bound <=: @@ -213,6 +231,7 @@ diff old new + // examples.eg2.duration: non-concrete value float in operand to -: + // ./in.cue:7:12 + // ./in.cue:4:12 ++ // ./in.cue:8:12 + } + end: (_|_){ + // [incomplete] examples.eg2.start: non-concrete value end for bound <=: @@ -220,6 +239,7 @@ diff old new + // examples.eg2.duration: non-concrete value float in operand to -: + // ./in.cue:7:12 + // ./in.cue:4:12 ++ // ./in.cue:8:12 } } eg3: (#struct){ @@ -234,16 +254,22 @@ diff old new - // [cycle] cycle error + // [incomplete] examples.eg3.duration: non-concrete value <=10.0 & float in operand to -: + // ./in.cue:7:12 ++ // ./in.cue:2:12 ++ // ./in.cue:6:12 + // ./in.cue:10:9 + } + start: (_|_){ + // [incomplete] examples.eg3.duration: non-concrete value <=10.0 & float in operand to -: + // ./in.cue:7:12 ++ // ./in.cue:2:12 ++ // ./in.cue:6:12 + // ./in.cue:10:9 + } + duration: (_|_){ + // [incomplete] examples.eg3.duration: non-concrete value <=10.0 & float in operand to -: + // ./in.cue:7:12 ++ // ./in.cue:2:12 ++ // ./in.cue:6:12 + // ./in.cue:10:9 } } diff --git a/cue/testdata/cycle/structural.txtar b/cue/testdata/cycle/structural.txtar index 16cc0a120c4..307fe4bf62e 100644 --- a/cue/testdata/cycle/structural.txtar +++ b/cue/testdata/cycle/structural.txtar @@ -690,12 +690,24 @@ z1.z.g.h: structural cycle ./in.cue:371:9 e4.a.0.0: cannot combine regular field "c" with [1,{c:1} & (a|{}) & [{c:1}]]: ./in.cue:409:11 + ./in.cue:408:6 + ./in.cue:409:6 + ./in.cue:409:7 e4.a.0.0.0: cannot combine regular field "c" with [1,{c:1}]: ./in.cue:409:11 + ./in.cue:408:6 + ./in.cue:409:6 + ./in.cue:409:7 e4.b.0.0: cannot combine regular field "c" with [1,{c:1} & [{c:1}] & (b|{})]: ./in.cue:411:11 + ./in.cue:411:6 + ./in.cue:411:7 + ./in.cue:412:6 e4.b.0.0.0: cannot combine regular field "c" with [1,{c:1}]: ./in.cue:411:11 + ./in.cue:411:6 + ./in.cue:411:7 + ./in.cue:412:6 nestedList.v1e.y.0.0: incompatible list lengths (1 and 2): ./in.cue:426:6 nestedList.v2e.y.0.0: incompatible list lengths (1 and 2): @@ -1434,8 +1446,14 @@ Result: // e4.a.0.0.0: structural cycle // e4.a.0.0: cannot combine regular field "c" with [1,{c:1} & (a|{}) & [{c:1}]]: // ./in.cue:409:11 + // ./in.cue:408:6 + // ./in.cue:409:6 + // ./in.cue:409:7 // e4.a.0.0.0: cannot combine regular field "c" with [1,{c:1}]: // ./in.cue:409:11 + // ./in.cue:408:6 + // ./in.cue:409:6 + // ./in.cue:409:7 } } b: (_|_){ @@ -1459,8 +1477,14 @@ Result: // e4.b.0.0.0: structural cycle // e4.b.0.0: cannot combine regular field "c" with [1,{c:1} & [{c:1}] & (b|{})]: // ./in.cue:411:11 + // ./in.cue:411:6 + // ./in.cue:411:7 + // ./in.cue:412:6 // e4.b.0.0.0: cannot combine regular field "c" with [1,{c:1}]: // ./in.cue:411:11 + // ./in.cue:411:6 + // ./in.cue:411:7 + // ./in.cue:412:6 } } } @@ -1785,7 +1809,7 @@ diff old new e1.a.c: structural cycle e1.b.c: structural cycle e2.a.c: structural cycle -@@ -32,61 +36,72 @@ +@@ -32,61 +36,84 @@ ./in.cue:403:5 ./in.cue:404:5 e3.b.c: structural cycle @@ -1872,12 +1896,24 @@ diff old new + ./in.cue:371:9 +e4.a.0.0: cannot combine regular field "c" with [1,{c:1} & (a|{}) & [{c:1}]]: + ./in.cue:409:11 ++ ./in.cue:408:6 ++ ./in.cue:409:6 ++ ./in.cue:409:7 +e4.a.0.0.0: cannot combine regular field "c" with [1,{c:1}]: + ./in.cue:409:11 ++ ./in.cue:408:6 ++ ./in.cue:409:6 ++ ./in.cue:409:7 +e4.b.0.0: cannot combine regular field "c" with [1,{c:1} & [{c:1}] & (b|{})]: + ./in.cue:411:11 ++ ./in.cue:411:6 ++ ./in.cue:411:7 ++ ./in.cue:412:6 +e4.b.0.0.0: cannot combine regular field "c" with [1,{c:1}]: + ./in.cue:411:11 ++ ./in.cue:411:6 ++ ./in.cue:411:7 ++ ./in.cue:412:6 +nestedList.v1e.y.0.0: incompatible list lengths (1 and 2): + ./in.cue:426:6 +nestedList.v2e.y.0.0: incompatible list lengths (1 and 2): @@ -1885,7 +1921,7 @@ diff old new Result: (_|_){ -@@ -128,10 +143,7 @@ +@@ -128,10 +155,7 @@ a7: (struct){ a: (string){ "foo" } b: (struct){ @@ -1897,7 +1933,7 @@ diff old new y: (string){ "foo" } } c: (struct){ -@@ -168,11 +180,17 @@ +@@ -168,11 +192,17 @@ } } b4: (_|_){ @@ -1920,7 +1956,7 @@ diff old new } } x: (_|_){ -@@ -240,10 +258,9 @@ +@@ -240,10 +270,9 @@ // [eval] 0: (_|_){ // [eval] b6.b.a.0: conflicting values 1 and [1] (mismatched types int and list): @@ -1932,7 +1968,7 @@ diff old new 0: (_|_){ // [structural cycle] b6.b.a.0.0: structural cycle } -@@ -261,11 +278,20 @@ +@@ -261,11 +290,20 @@ } } b7: (_|_){ @@ -1958,7 +1994,7 @@ diff old new } } a: (_|_){ -@@ -276,9 +302,7 @@ +@@ -276,9 +314,7 @@ } } b8: (struct){ @@ -1969,7 +2005,7 @@ diff old new a: (struct){ f: (string){ string } } -@@ -304,7 +328,7 @@ +@@ -304,7 +340,7 @@ #ref: (#struct){ ref: (string){ string } } @@ -1978,7 +2014,7 @@ diff old new c: (#list){ 0: ((string|struct)){ |((string){ string }, (#struct){ ref: (string){ string } -@@ -327,7 +351,13 @@ +@@ -327,7 +363,13 @@ }) } } c: (#struct){ @@ -1993,7 +2029,7 @@ diff old new } d: (struct){ d: (struct){ -@@ -337,9 +367,7 @@ +@@ -337,9 +379,7 @@ } b11: (struct){ #list: (#struct){ @@ -2004,7 +2040,7 @@ diff old new } } b12: (struct){ -@@ -356,7 +384,11 @@ +@@ -356,7 +396,11 @@ value: (int){ 3 } tail: (#struct){ value: (int){ 4 } @@ -2017,7 +2053,7 @@ diff old new sum: (int){ 4 } } sum: (int){ 7 } -@@ -428,10 +460,7 @@ +@@ -428,10 +472,7 @@ link: (#struct){ a: (#struct){ two: (#struct){ @@ -2029,7 +2065,7 @@ diff old new } } } -@@ -505,10 +534,7 @@ +@@ -505,10 +546,7 @@ link: (#struct){ a: (#list){ 0: (#struct){ @@ -2041,7 +2077,7 @@ diff old new } } } -@@ -578,12 +604,7 @@ +@@ -578,12 +616,7 @@ b: (struct){ } c: (_|_){ @@ -2055,7 +2091,7 @@ diff old new } } } -@@ -599,56 +620,26 @@ +@@ -599,56 +632,26 @@ // [structural cycle] h: (int){ int } t: (_|_){ @@ -2132,7 +2168,7 @@ diff old new } } } -@@ -666,28 +657,25 @@ +@@ -666,28 +669,25 @@ } x: (_|_){ // [structural cycle] @@ -2166,7 +2202,7 @@ diff old new #List: (#struct){ Next: (null){ null } } -@@ -696,9 +684,7 @@ +@@ -696,9 +696,7 @@ // [structural cycle] t1: (struct){ #Foo: (#struct){ @@ -2177,7 +2213,7 @@ diff old new } } t2: (_|_){ -@@ -706,10 +692,7 @@ +@@ -706,10 +704,7 @@ Foo: (_|_){ // [structural cycle] ref: (_|_){ @@ -2189,7 +2225,7 @@ diff old new } } } -@@ -716,9 +699,7 @@ +@@ -716,9 +711,7 @@ } comprehension: (struct){ #list: (#struct){ @@ -2200,7 +2236,7 @@ diff old new } } } -@@ -740,12 +721,11 @@ +@@ -740,12 +733,11 @@ schema: (_|_){ // [structural cycle] next: (_|_){ @@ -2215,7 +2251,7 @@ diff old new } } fieldsSumInfinite: (_|_){ -@@ -756,7 +736,8 @@ +@@ -756,7 +748,8 @@ fries: (float){ 2.00 } sprite: (float){ 1.00 } total: (_|_){ @@ -2225,7 +2261,7 @@ diff old new } } } -@@ -771,9 +752,7 @@ +@@ -771,9 +764,7 @@ head: (int){ 3 } tail: (struct){ head: (int){ 2 } @@ -2236,7 +2272,7 @@ diff old new } } } -@@ -813,11 +792,12 @@ +@@ -813,11 +804,12 @@ // [eval] e3.a: conflicting values [a] and {c:a} (mismatched types list and struct): // ./in.cue:400:5 // ./in.cue:401:5 @@ -2254,7 +2290,7 @@ diff old new } } b: (_|_){ -@@ -824,11 +804,12 @@ +@@ -824,11 +816,12 @@ // [eval] e3.b: conflicting values [b] and {c:b} (mismatched types list and struct): // ./in.cue:403:5 // ./in.cue:404:5 @@ -2272,7 +2308,7 @@ diff old new } } } -@@ -837,41 +818,51 @@ +@@ -837,41 +830,63 @@ a: (_|_){ // [eval] 0: (_|_){ @@ -2320,8 +2356,14 @@ diff old new + // e4.a.0.0.0: structural cycle + // e4.a.0.0: cannot combine regular field "c" with [1,{c:1} & (a|{}) & [{c:1}]]: + // ./in.cue:409:11 ++ // ./in.cue:408:6 ++ // ./in.cue:409:6 ++ // ./in.cue:409:7 + // e4.a.0.0.0: cannot combine regular field "c" with [1,{c:1}]: + // ./in.cue:409:11 ++ // ./in.cue:408:6 ++ // ./in.cue:409:6 ++ // ./in.cue:409:7 + } + } + b: (_|_){ @@ -2350,12 +2392,18 @@ diff old new + // e4.b.0.0.0: structural cycle + // e4.b.0.0: cannot combine regular field "c" with [1,{c:1} & [{c:1}] & (b|{})]: + // ./in.cue:411:11 ++ // ./in.cue:411:6 ++ // ./in.cue:411:7 ++ // ./in.cue:412:6 + // e4.b.0.0.0: cannot combine regular field "c" with [1,{c:1}]: + // ./in.cue:411:11 ++ // ./in.cue:411:6 ++ // ./in.cue:411:7 ++ // ./in.cue:412:6 } } } -@@ -894,19 +885,14 @@ +@@ -894,19 +909,14 @@ y: (_|_){ // [eval] 0: (_|_){ @@ -2378,7 +2426,7 @@ diff old new } 1: (int){ 1 } } -@@ -916,19 +902,14 @@ +@@ -916,19 +926,14 @@ y: (_|_){ // [eval] 0: (_|_){ @@ -2401,7 +2449,7 @@ diff old new } 1: (int){ 1 } } -@@ -981,7 +962,10 @@ +@@ -981,7 +986,10 @@ head: (int){ 3 } tail: (struct){ head: (int){ 4 } @@ -2413,7 +2461,7 @@ diff old new } } } -@@ -995,7 +979,10 @@ +@@ -995,7 +1003,10 @@ head: (int){ 2 } tail: (struct){ head: (int){ 3 } @@ -2425,7 +2473,7 @@ diff old new } } } -@@ -1009,8 +996,12 @@ +@@ -1009,8 +1020,12 @@ head: (int){ 2 } tail: (struct){ |((struct){ head: (int){ 3 } @@ -2440,7 +2488,7 @@ diff old new }, (struct){ head: (int){ 3 } }) } -@@ -1032,9 +1023,7 @@ +@@ -1032,9 +1047,7 @@ // [structural cycle] f: (_|_){ // [structural cycle] @@ -2451,7 +2499,7 @@ diff old new } g: (_|_){ // [structural cycle] -@@ -1055,10 +1044,7 @@ +@@ -1055,10 +1068,7 @@ x: (_){ _ } y: (_){ _ } } @@ -2463,7 +2511,7 @@ diff old new } } t2: (struct){ -@@ -1071,10 +1057,7 @@ +@@ -1071,10 +1081,7 @@ x: (_){ _ } y: (_){ _ } } @@ -2475,7 +2523,7 @@ diff old new } } t3: (struct){ -@@ -1089,16 +1072,8 @@ +@@ -1089,16 +1096,8 @@ y: (_){ _ } z: (_){ _ } } @@ -2494,7 +2542,7 @@ diff old new } } t4: (struct){ -@@ -1114,51 +1089,11 @@ +@@ -1114,51 +1113,11 @@ y: (_){ _ } z: (_){ _ } } @@ -2551,7 +2599,7 @@ diff old new } } t5: (struct){ -@@ -1169,6 +1104,7 @@ +@@ -1169,6 +1128,7 @@ } } C: (struct){ @@ -2559,7 +2607,7 @@ diff old new y: (struct){ y: (_|_){ // [incomplete] crossRefNoCycle.t5.C.y.y: undefined field: x: -@@ -1175,12 +1111,6 @@ +@@ -1175,12 +1135,6 @@ // ./in.cue:544:8 } } @@ -2572,7 +2620,7 @@ diff old new } } } -@@ -1203,19 +1133,19 @@ +@@ -1203,19 +1157,19 @@ } } n4: (struct){ diff --git a/cue/testdata/disjunctions/elimination.txtar b/cue/testdata/disjunctions/elimination.txtar index 78fc10cbe12..dd5733e65ba 100644 --- a/cue/testdata/disjunctions/elimination.txtar +++ b/cue/testdata/disjunctions/elimination.txtar @@ -617,6 +617,7 @@ issue770: { // [incomplete] nestedNonMonotonic.incomplete.a.n2.p1.x.a.b: invalid value {c:1} (does not satisfy struct.MinFields(2)): len(fields) < MinFields(2) (1 < 2): // ./in.cue:96:15 // ./in.cue:96:32 + // ./in.cue:97:12 c: (int){ 1 } } } @@ -628,6 +629,7 @@ issue770: { b: (_|_){ // [incomplete] nestedNonMonotonic.incomplete.a.n2.p2.x.a.b: invalid value {c:1} (does not satisfy struct.MinFields(2)): len(fields) < MinFields(2) (1 < 2): // ./in.cue:102:15 + // ./in.cue:101:12 // ./in.cue:102:32 c: (int){ 1 } } @@ -655,6 +657,14 @@ issue770: { b: (_|_){ // [incomplete] nestedNonMonotonic.incomplete.b.n2.p1.x.a.b: invalid value {c:1,d:1} (does not satisfy struct.MinFields(3)): len(fields) < MinFields(3) (2 < 3): // ./in.cue:138:15 + // ./in.cue:124:15 + // ./in.cue:125:12 + // ./in.cue:126:12 + // ./in.cue:130:12 + // ./in.cue:131:15 + // ./in.cue:132:12 + // ./in.cue:136:12 + // ./in.cue:137:12 // ./in.cue:138:32 c: (int){ 1 } d: (int){ 1 } @@ -1469,41 +1479,16 @@ diff old new disambiguateClosed: (struct){ b: (#struct){ |((#struct){ x: (bool){ true } -@@ -143,7 +89,6 @@ - // [incomplete] nestedNonMonotonic.incomplete.a.n2.p1.x.a.b: invalid value {c:1} (does not satisfy struct.MinFields(2)): len(fields) < MinFields(2) (1 < 2): - // ./in.cue:96:15 - // ./in.cue:96:32 -- // ./in.cue:97:12 - c: (int){ 1 } - } - } -@@ -155,7 +100,6 @@ - b: (_|_){ - // [incomplete] nestedNonMonotonic.incomplete.a.n2.p2.x.a.b: invalid value {c:1} (does not satisfy struct.MinFields(2)): len(fields) < MinFields(2) (1 < 2): - // ./in.cue:102:15 -- // ./in.cue:101:12 - // ./in.cue:102:32 - c: (int){ 1 } - } -@@ -181,16 +125,8 @@ +@@ -181,7 +127,7 @@ x: ((null|struct)){ |((struct){ a: (struct){ b: (_|_){ - // [incomplete] nestedNonMonotonic.incomplete.b.n2.p1.x.a.b: invalid value {c:1 & 1 & 1,d:1 & 1 & 1} (does not satisfy struct.MinFields(3)): len(fields) < MinFields(3) (2 < 3): + // [incomplete] nestedNonMonotonic.incomplete.b.n2.p1.x.a.b: invalid value {c:1,d:1} (does not satisfy struct.MinFields(3)): len(fields) < MinFields(3) (2 < 3): // ./in.cue:138:15 -- // ./in.cue:124:15 -- // ./in.cue:125:12 -- // ./in.cue:126:12 -- // ./in.cue:130:12 -- // ./in.cue:131:15 -- // ./in.cue:132:12 -- // ./in.cue:136:12 -- // ./in.cue:137:12 - // ./in.cue:138:32 - c: (int){ 1 } - d: (int){ 1 } -@@ -205,24 +141,24 @@ + // ./in.cue:124:15 + // ./in.cue:125:12 +@@ -205,24 +151,24 @@ preserveClosedness: (struct){ small: (struct){ p1: (struct){ @@ -1546,7 +1531,7 @@ diff old new a: (string){ string } }, (#struct){ a: (string){ string } -@@ -241,40 +177,40 @@ +@@ -241,40 +187,40 @@ } medium: (struct){ p1: (struct){ @@ -1621,7 +1606,7 @@ diff old new a: (string){ string } }, (#struct){ a: (string){ string } -@@ -307,7 +243,7 @@ +@@ -307,7 +253,7 @@ }) } } p3: (struct){ @@ -1630,7 +1615,7 @@ diff old new a: (string){ string } }, (#struct){ a: (string){ string } -@@ -349,10 +285,6 @@ +@@ -349,10 +295,6 @@ #type: (#struct){ fieldName: ((string|struct)){ |((string){ string }, (#struct){ foo: (string){ string } @@ -1641,7 +1626,7 @@ diff old new }) } } #subtype: ((string|struct)){ |((string){ string }, (#struct){ -@@ -432,12 +364,8 @@ +@@ -432,12 +374,8 @@ #T: (list){ 0: (string){ "d" } } @@ -1656,7 +1641,7 @@ diff old new } issue1940: (struct){ #T: (#list){ -@@ -446,53 +374,24 @@ +@@ -446,53 +384,24 @@ } } #A: (#struct){ @@ -1722,7 +1707,7 @@ diff old new t1: (struct){ #SpecFoo: (#struct){ foo: (#struct){ -@@ -510,36 +409,20 @@ +@@ -510,36 +419,20 @@ } } out: (struct){ |((struct){ @@ -1773,7 +1758,7 @@ diff old new nullBar: (null){ null } }) } } -@@ -555,48 +438,45 @@ +@@ -555,48 +448,45 @@ x: (int){ 1 } } } @@ -1861,7 +1846,7 @@ diff old new Foo: (#struct){ spec: (#struct){ foo: (#struct){ -@@ -605,135 +485,52 @@ +@@ -605,135 +495,52 @@ } } resource: (#struct){ @@ -2043,7 +2028,7 @@ diff old new } } #Abstract: (#struct){ -@@ -749,34 +546,34 @@ +@@ -749,34 +556,34 @@ } }) } resource: (#struct){ @@ -2106,7 +2091,7 @@ diff old new } } _#Spec: (#struct){ |(*(#struct){ -@@ -803,36 +600,36 @@ +@@ -803,36 +610,36 @@ } } _Thing: (#struct){ @@ -2172,7 +2157,7 @@ diff old new } #Constrained: (#struct){ spec: (#struct){ |(*(#struct){ -@@ -916,19 +713,19 @@ +@@ -916,19 +723,19 @@ common: (int){ 3 } } #FormFoo: (#struct){ @@ -2199,7 +2184,7 @@ diff old new }) } } #Input: (#struct){ -@@ -936,18 +733,12 @@ +@@ -936,18 +743,12 @@ } } #summarizeReturn: (#struct){ @@ -2220,7 +2205,7 @@ diff old new out: (#list){ } } -@@ -977,10 +768,23 @@ +@@ -977,10 +778,23 @@ } full: (struct){ metrics: (#list){ @@ -2248,7 +2233,7 @@ diff old new 1: (#struct){ id: (string){ "bar" } value: (int){ 80 } -@@ -1031,13 +835,11 @@ +@@ -1031,13 +845,11 @@ } } } @@ -2264,7 +2249,7 @@ diff old new 0: (#struct){ name: (string){ "FooBarFoo" } } -@@ -1047,19 +849,8 @@ +@@ -1047,19 +859,8 @@ 2: (#struct){ name: (string){ "FooQuuxFoo" } } @@ -2286,7 +2271,7 @@ diff old new } } } -@@ -1078,10 +869,10 @@ +@@ -1078,10 +879,10 @@ v: (string){ |(*(string){ "a" }, (string){ "b" }, (string){ "c" }) } } c: (#struct){ diff --git a/cue/testdata/eval/incomplete.txtar b/cue/testdata/eval/incomplete.txtar index eefb372edb7..4d8b9f54ea5 100644 --- a/cue/testdata/eval/incomplete.txtar +++ b/cue/testdata/eval/incomplete.txtar @@ -159,21 +159,26 @@ Disjuncts: 29 a: (_|_){ // [incomplete] E.b: non-concrete value >=5 in operand to -: // ./in.cue:13:5 + // ./in.cue:14:5 // ./in.cue:14:11 // E.c: non-concrete value _ in operand to +: // ./in.cue:14:5 + // ./in.cue:12:5 } b: (_|_){ // [incomplete] E.b: non-concrete value >=5 in operand to -: // ./in.cue:13:5 + // ./in.cue:14:5 // ./in.cue:14:11 } c: (_|_){ // [incomplete] E.b: non-concrete value >=5 in operand to -: // ./in.cue:13:5 + // ./in.cue:14:5 // ./in.cue:14:11 // E.c: non-concrete value _ in operand to +: // ./in.cue:14:5 + // ./in.cue:12:5 } } a: (int){ int } @@ -215,7 +220,7 @@ Disjuncts: 29 diff old new --- old +++ new -@@ -20,22 +20,28 @@ +@@ -20,22 +20,33 @@ // ./in.cue:1:4 } e5: (_|_){ @@ -226,18 +231,20 @@ diff old new E: (struct){ a: (_|_){ - // [cycle] cycle error: -- // ./in.cue:12:5 + // [incomplete] E.b: non-concrete value >=5 in operand to -: + // ./in.cue:13:5 ++ // ./in.cue:14:5 + // ./in.cue:14:11 + // E.c: non-concrete value _ in operand to +: + // ./in.cue:14:5 + // ./in.cue:12:5 } b: (_|_){ - // [cycle] cycle error: - // ./in.cue:13:5 + // [incomplete] E.b: non-concrete value >=5 in operand to -: + // ./in.cue:13:5 ++ // ./in.cue:14:5 + // ./in.cue:14:11 } c: (_|_){ @@ -247,9 +254,11 @@ diff old new - // ./in.cue:13:5 + // [incomplete] E.b: non-concrete value >=5 in operand to -: + // ./in.cue:13:5 ++ // ./in.cue:14:5 + // ./in.cue:14:11 + // E.c: non-concrete value _ in operand to +: + // ./in.cue:14:5 ++ // ./in.cue:12:5 } } a: (int){ int } diff --git a/cue/testdata/eval/resolve_basic.txtar b/cue/testdata/eval/resolve_basic.txtar index 7dbf907940e..8fea5ccf9e3 100644 --- a/cue/testdata/eval/resolve_basic.txtar +++ b/cue/testdata/eval/resolve_basic.txtar @@ -18,36 +18,6 @@ Retain: 0 Unifications: 9 Conjuncts: 16 Disjuncts: 9 --- out/evalalpha -- -(struct){ - a: (int){ 1 } - b: (int){ 2 } - d: (struct){ - x: (_){ _ } - y: (_|_){ - // [incomplete] d.y: non-concrete value _ in operand to +: - // ./in.cue:5:5 - } - } - e: (struct){ - x: (int){ 5 } - y: (int){ 7 } - } -} --- diff/-out/evalalpha<==>+out/eval -- -diff old new ---- old -+++ new -@@ -6,7 +6,6 @@ - y: (_|_){ - // [incomplete] d.y: non-concrete value _ in operand to +: - // ./in.cue:5:5 -- // ./in.cue:4:5 - } - } - e: (struct){ --- diff/todo/p2 -- -missing error positions -- out/eval -- (struct){ a: (int){ 1 } diff --git a/cue/testdata/eval/selectors.txtar b/cue/testdata/eval/selectors.txtar index 4c4f8bc74e6..54f3520efed 100644 --- a/cue/testdata/eval/selectors.txtar +++ b/cue/testdata/eval/selectors.txtar @@ -26,50 +26,6 @@ Retain: 0 Unifications: 18 Conjuncts: 27 Disjuncts: 18 --- out/evalalpha -- -(struct){ - a: (int){ 1 } - b: (int){ 2 } - d: (struct){ - x: (_){ _ } - y: (_|_){ - // [incomplete] d.y: non-concrete value _ in operand to +: - // ./in.cue:5:5 - } - } - e: (struct){ - x: (int){ 5 } - y: (int){ 7 } - } - f: (struct){ - a: (struct){ - "foo-bar": (int){ 3 } - } - b: (int){ 3 } - } - g: (struct){ - a: (struct){ - "foo-bar": (struct){ - c: (int){ 3 } - } - } - b: (int){ 3 } - } -} --- diff/-out/evalalpha<==>+out/eval -- -diff old new ---- old -+++ new -@@ -6,7 +6,6 @@ - y: (_|_){ - // [incomplete] d.y: non-concrete value _ in operand to +: - // ./in.cue:5:5 -- // ./in.cue:4:5 - } - } - e: (struct){ --- diff/todo/p2 -- -Missing error positions. -- out/eval -- (struct){ a: (int){ 1 } diff --git a/cue/testdata/export/issue2119.txtar b/cue/testdata/export/issue2119.txtar index 59a47330261..3c62da02e56 100644 --- a/cue/testdata/export/issue2119.txtar +++ b/cue/testdata/export/issue2119.txtar @@ -42,54 +42,6 @@ Retain: 4 Unifications: 24 Conjuncts: 42 Disjuncts: 24 --- out/evalalpha -- -(struct){ - simplified: (struct){ - x: (struct){ - d: (string){ ".*" } - } - out: (string){ "d: .*\n" } - } - original: (struct){ - #testableRegexp: (string){ - string - #test: (#struct){ - in: (string){ string } - out: (_|_){ - // [incomplete] original.#testableRegexp.#test.out: non-concrete value string in operand to +: - // ./in.cue:20:29 - // ./in.cue:16:3 - } - } - } - rule: (struct){ - #patterns: (#struct){ - bar: (string){ - "(.*)" - #test: (#struct){ - in: (string){ "testcontent" } - out: (string){ "testcontent" } - } - } - } - } - out: (string){ "{}\n" } - } -} --- diff/-out/evalalpha<==>+out/eval -- -diff old new ---- old -+++ new -@@ -13,7 +13,6 @@ - out: (_|_){ - // [incomplete] original.#testableRegexp.#test.out: non-concrete value string in operand to +: - // ./in.cue:20:29 -- // ./in.cue:15:21 - // ./in.cue:16:3 - } - } --- diff/todo/p2 -- -Missing error position. -- out/eval -- (struct){ simplified: (struct){ diff --git a/cue/testdata/fulleval/005_conditional_field.txtar b/cue/testdata/fulleval/005_conditional_field.txtar index e9f4125bb1a..64574767d24 100644 --- a/cue/testdata/fulleval/005_conditional_field.txtar +++ b/cue/testdata/fulleval/005_conditional_field.txtar @@ -73,10 +73,12 @@ Disjuncts: 7 // [incomplete] d: non-concrete value int in operand to >: // ./in.cue:14:5 // ./in.cue:13:5 + // ./in.cue:14:2 a: (_|_){ // [incomplete] d: non-concrete value int in operand to >: // ./in.cue:14:5 // ./in.cue:13:5 + // ./in.cue:14:2 } } } @@ -84,7 +86,7 @@ Disjuncts: 7 diff old new --- old +++ new -@@ -5,7 +5,13 @@ +@@ -5,7 +5,15 @@ a: (int){ 3 } } d: (_|_){ @@ -92,10 +94,12 @@ diff old new + // [incomplete] d: non-concrete value int in operand to >: // ./in.cue:14:5 + // ./in.cue:13:5 ++ // ./in.cue:14:2 + a: (_|_){ + // [incomplete] d: non-concrete value int in operand to >: + // ./in.cue:14:5 + // ./in.cue:13:5 ++ // ./in.cue:14:2 + } } } diff --git a/cue/testdata/fulleval/020_complex_interaction_of_groundness.txtar b/cue/testdata/fulleval/020_complex_interaction_of_groundness.txtar index e54f70ea18f..07751d36312 100644 --- a/cue/testdata/fulleval/020_complex_interaction_of_groundness.txtar +++ b/cue/testdata/fulleval/020_complex_interaction_of_groundness.txtar @@ -67,41 +67,6 @@ Retain: 5 Unifications: 10 Conjuncts: 33 Disjuncts: 15 --- out/evalalpha -- -(struct){ - res: (#list){ - 0: (struct){ - d: (string){ "b" } - s: (string){ "ab" } - } - } - a: (struct){ - b: (struct){ - c: (struct){ - d: (string){ string } - s: (_|_){ - // [incomplete] a.b.c.s: non-concrete value string in operand to +: - // ./in.cue:4:34 - // ./in.cue:5:13 - } - } - } - } -} --- diff/-out/evalalpha<==>+out/eval -- -diff old new ---- old -+++ new -@@ -12,7 +12,6 @@ - s: (_|_){ - // [incomplete] a.b.c.s: non-concrete value string in operand to +: - // ./in.cue:4:34 -- // ./in.cue:4:23 - // ./in.cue:5:13 - } - } --- diff/todo/p2 -- -Missing error position -- out/eval -- (struct){ res: (#list){ diff --git a/cue/testdata/fulleval/021_complex_groundness_2.txtar b/cue/testdata/fulleval/021_complex_groundness_2.txtar index fe91c7c1449..3052df77e62 100644 --- a/cue/testdata/fulleval/021_complex_groundness_2.txtar +++ b/cue/testdata/fulleval/021_complex_groundness_2.txtar @@ -77,84 +77,6 @@ Retain: 6 Unifications: 16 Conjuncts: 63 Disjuncts: 22 --- out/evalalpha -- -(struct){ - r1: (struct){ - y: (string){ "c" } - res: (struct){ - d: (string){ "c" } - s: (string){ "ac" } - } - } - f1: (struct){ - y: (string){ string } - res: (struct){ - d: (string){ string } - s: (_|_){ - // [incomplete] f1.res.s: non-concrete value string in operand to +: - // ./in.cue:5:25 - // ./in.cue:5:14 - // f1.res.s: non-concrete value string in operand to +: - // ./in.cue:6:34 - // ./in.cue:5:14 - } - } - } - a: (struct){ - b: (struct){ - c: (struct){ - d: (string){ string } - s: (_|_){ - // [incomplete] a.b.c.s: non-concrete value string in operand to +: - // ./in.cue:5:25 - // ./in.cue:5:14 - // a.b.c.s: non-concrete value string in operand to +: - // ./in.cue:6:34 - // ./in.cue:5:14 - } - } - } - } -} --- diff/-out/evalalpha<==>+out/eval -- -diff old new ---- old -+++ new -@@ -13,16 +13,10 @@ - s: (_|_){ - // [incomplete] f1.res.s: non-concrete value string in operand to +: - // ./in.cue:5:25 -- // ./in.cue:3:34 -- // ./in.cue:5:14 -- // ./in.cue:6:23 -- // ./in.cue:7:13 -+ // ./in.cue:5:14 - // f1.res.s: non-concrete value string in operand to +: - // ./in.cue:6:34 -- // ./in.cue:3:34 -- // ./in.cue:5:14 -- // ./in.cue:6:23 -- // ./in.cue:7:13 -+ // ./in.cue:5:14 - } - } - } -@@ -34,13 +28,9 @@ - // [incomplete] a.b.c.s: non-concrete value string in operand to +: - // ./in.cue:5:25 - // ./in.cue:5:14 -- // ./in.cue:6:23 -- // ./in.cue:7:13 - // a.b.c.s: non-concrete value string in operand to +: - // ./in.cue:6:34 - // ./in.cue:5:14 -- // ./in.cue:6:23 -- // ./in.cue:7:13 - } - } - } --- diff/todo/p2 -- -Missing error positions. -- out/eval -- (struct){ r1: (struct){ diff --git a/cue/testdata/fulleval/035_optionals_with_label_filters.txtar b/cue/testdata/fulleval/035_optionals_with_label_filters.txtar index fa01fe761e5..034dfe67c4a 100644 --- a/cue/testdata/fulleval/035_optionals_with_label_filters.txtar +++ b/cue/testdata/fulleval/035_optionals_with_label_filters.txtar @@ -119,6 +119,7 @@ jobs3.fooTest1: field not allowed: ./in.cue:23:8 jobs2.fooTest.name: invalid value "badName" (out of bound =~"^test"): ./in.cue:9:22 + ./in.cue:3:8 ./in.cue:19:23 Result: @@ -151,6 +152,7 @@ Result: name: (_|_){ // [eval] jobs2.fooTest.name: invalid value "badName" (out of bound =~"^test"): // ./in.cue:9:22 + // ./in.cue:3:8 // ./in.cue:19:23 } cmd: (string){ string } @@ -170,7 +172,7 @@ Result: diff old new --- old +++ new -@@ -1,20 +1,13 @@ +@@ -1,15 +1,9 @@ Errors: jobs1.foo1: field not allowed: - ./in.cue:6:8 @@ -188,12 +190,7 @@ diff old new ./in.cue:22:8 ./in.cue:23:8 jobs2.fooTest.name: invalid value "badName" (out of bound =~"^test"): - ./in.cue:9:22 -- ./in.cue:3:8 - ./in.cue:19:23 - - Result: -@@ -36,10 +29,7 @@ +@@ -36,10 +30,7 @@ // [eval] foo1: (_|_){ // [eval] jobs1.foo1: field not allowed: @@ -205,15 +202,7 @@ diff old new // ./in.cue:16:8 } } -@@ -50,7 +40,6 @@ - name: (_|_){ - // [eval] jobs2.fooTest.name: invalid value "badName" (out of bound =~"^test"): - // ./in.cue:9:22 -- // ./in.cue:3:8 - // ./in.cue:19:23 - } - cmd: (string){ string } -@@ -60,14 +49,9 @@ +@@ -60,14 +51,9 @@ // [eval] fooTest1: (_|_){ // [eval] jobs3.fooTest1: field not allowed: diff --git a/cue/testdata/resolve/024_structs.txtar b/cue/testdata/resolve/024_structs.txtar index a1816727b4f..b82c5f197f9 100644 --- a/cue/testdata/resolve/024_structs.txtar +++ b/cue/testdata/resolve/024_structs.txtar @@ -48,47 +48,6 @@ Retain: 2 Unifications: 13 Conjuncts: 33 Disjuncts: 15 --- out/evalalpha -- -(struct){ - a: (struct){ - c: (int){ 5 } - d: (int){ 15 } - } - b: (struct){ - c: (int){ 7 } - d: (int){ 21 } - } - t: (struct){ - c: (number){ number } - d: (_|_){ - // [incomplete] t.d: non-concrete value number in operand to *: - // ./in.cue:3:19 - // ./in.cue:3:8 - } - } - ti: (struct){ - c: (int){ int } - d: (_|_){ - // [incomplete] ti.d: non-concrete value int in operand to *: - // ./in.cue:3:19 - // ./in.cue:4:13 - } - } -} --- diff/-out/evalalpha<==>+out/eval -- -diff old new ---- old -+++ new -@@ -20,7 +20,6 @@ - d: (_|_){ - // [incomplete] ti.d: non-concrete value int in operand to *: - // ./in.cue:3:19 -- // ./in.cue:3:8 - // ./in.cue:4:13 - } - } --- diff/todo/p2 -- -error positions -- out/eval -- (struct){ a: (struct){ diff --git a/cue/testdata/resolve/048_builtins.txtar b/cue/testdata/resolve/048_builtins.txtar index 1d3b7b397fb..e87790ea944 100644 --- a/cue/testdata/resolve/048_builtins.txtar +++ b/cue/testdata/resolve/048_builtins.txtar @@ -97,9 +97,11 @@ o3.a: conflicting values "baz" and "foo": ./in.cue:20:24 a3.a: invalid value "bar" (out of bound =~"oo"): ./in.cue:8:5 + ./in.cue:7:5 ./in.cue:12:14 a3.a: invalid value "bar" (out of bound =~"fo"): ./in.cue:9:5 + ./in.cue:7:5 ./in.cue:12:14 stringListErrors.b.result: invalid list element 0 in argument 0 to call: cannot use value int (int) as string: ./in.cue:31:11 @@ -128,9 +130,11 @@ Result: a: (_|_){ // [eval] a3.a: invalid value "bar" (out of bound =~"oo"): // ./in.cue:8:5 + // ./in.cue:7:5 // ./in.cue:12:14 // a3.a: invalid value "bar" (out of bound =~"fo"): // ./in.cue:9:5 + // ./in.cue:7:5 // ./in.cue:12:14 } b: (string){ =~"oo" } @@ -221,7 +225,7 @@ Result: diff old new --- old +++ new -@@ -1,22 +1,15 @@ +@@ -1,13 +1,8 @@ Errors: -o3.a: 2 errors in empty disjunction: o3.a: conflicting values "bar" and "foo": @@ -235,28 +239,7 @@ diff old new ./in.cue:20:14 ./in.cue:20:24 a3.a: invalid value "bar" (out of bound =~"oo"): - ./in.cue:8:5 -- ./in.cue:7:5 - ./in.cue:12:14 - a3.a: invalid value "bar" (out of bound =~"fo"): - ./in.cue:9:5 -- ./in.cue:7:5 - ./in.cue:12:14 - stringListErrors.b.result: invalid list element 0 in argument 0 to call: cannot use value int (int) as string: - ./in.cue:31:11 -@@ -45,11 +38,9 @@ - a: (_|_){ - // [eval] a3.a: invalid value "bar" (out of bound =~"oo"): - // ./in.cue:8:5 -- // ./in.cue:7:5 - // ./in.cue:12:14 - // a3.a: invalid value "bar" (out of bound =~"fo"): - // ./in.cue:9:5 -- // ./in.cue:7:5 - // ./in.cue:12:14 - } - b: (string){ =~"oo" } -@@ -68,15 +59,10 @@ +@@ -68,15 +63,10 @@ o3: (_|_){ // [eval] a: (_|_){ diff --git a/internal/core/adt/errors.go b/internal/core/adt/errors.go index 0c7da8936a5..40f5bdccfce 100644 --- a/internal/core/adt/errors.go +++ b/internal/core/adt/errors.go @@ -223,14 +223,15 @@ func addPositions(err *ValueError, c Conjunct) { func NewRequiredNotPresentError(ctx *OpContext, v *Vertex) *Bottom { saved := ctx.PushArc(v) err := ctx.Newf("field is required but not present") - for _, c := range v.Conjuncts { + v.VisitLeafConjuncts(func(c Conjunct) bool { if f, ok := c.x.(*Field); ok && f.ArcType == ArcRequired { err.AddPosition(c.x) } if c.CloseInfo.closeInfo != nil { err.AddPosition(c.CloseInfo.location) } - } + return true + }) b := &Bottom{ Code: IncompleteError, @@ -244,9 +245,10 @@ func NewRequiredNotPresentError(ctx *OpContext, v *Vertex) *Bottom { func newRequiredFieldInComprehensionError(ctx *OpContext, x *ForClause, v *Vertex) *Bottom { err := ctx.Newf("missing required field in for comprehension: %v", v.Label) err.AddPosition(x.Src) - for _, c := range v.Conjuncts { + v.VisitLeafConjuncts(func(c Conjunct) bool { addPositions(err, c) - } + return true + }) return &Bottom{ Code: IncompleteError, Err: err, @@ -349,17 +351,10 @@ func appendNodePositions(a []token.Pos, n Node) []token.Pos { a = append(a, p) } if v, ok := n.(*Vertex); ok { - for _, c := range v.Conjuncts { - switch x := c.x.(type) { - case *ConjunctGroup: - for _, c := range *x { - a = appendNodePositions(a, c.Elem()) - } - - default: - a = appendNodePositions(a, c.Elem()) - } - } + v.VisitLeafConjuncts(func(c Conjunct) bool { + a = appendNodePositions(a, c.Elem()) + return true + }) } return a } diff --git a/internal/core/adt/optional.go b/internal/core/adt/optional.go index 91db97c5e5d..cb99dd26c4d 100644 --- a/internal/core/adt/optional.go +++ b/internal/core/adt/optional.go @@ -92,6 +92,8 @@ func (o *StructInfo) MatchAndInsert(c *OpContext, arc *Vertex) { // matchBulk reports whether feature f matches the filter of x. It evaluation of // the filter is erroneous, it returns false and the error will be set in c. func matchBulk(c *OpContext, env *Environment, p *BulkOptionalField, f Feature, label Value) bool { + unreachableForDev(c) + v := env.evalCached(c, p.Filter) v = Unwrap(v) diff --git a/pkg/encoding/yaml/testdata/validate.txtar b/pkg/encoding/yaml/testdata/validate.txtar index 0c88caa9c0e..34bd96d1092 100644 --- a/pkg/encoding/yaml/testdata/validate.txtar +++ b/pkg/encoding/yaml/testdata/validate.txtar @@ -30,100 +30,6 @@ validate: #test & { validatePartial: #test & { fn: yaml.ValidatePartial } --- out/yaml-v3 -- -Errors: -#test.t1.ok1: cannot call non-function fn (type _): - ./in.cue:8:11 -validate.t1.ok1: invalid value "a: 2" (does not satisfy encoding/yaml.Validate({a!:int} | {b!:int})): error in call to encoding/yaml.Validate: incomplete value {a:2} | {a:2,b!:int}: - ./in.cue:8:11 - ./in.cue:6:9 -#test.t1.ok2: cannot call non-function fn (type _): - ./in.cue:9:11 -#test.t1.ok3: cannot call non-function fn (type _): - ./in.cue:13:11 -#test.t2.ok1: cannot call non-function fn (type _): - ./in.cue:17:11 -#test.t2.ok2: cannot call non-function fn (type _): - ./in.cue:18:11 - -Result: -import "encoding/yaml" - -#test: { - fn: _ - data1: "a: 2" - t1: { - ok1: _|_ // #test.t1.ok1: cannot call non-function fn (type _) - ok2: _|_ // #test.t1.ok2: cannot call non-function fn (type _) - ok3: _|_ // #test.t1.ok3: cannot call non-function fn (type _) - } - #A: { - a: int - } - #B: { - b: int - } - data2: "'foo'" - t2: { - ok1: _|_ // #test.t2.ok1: cannot call non-function fn (type _) - ok2: _|_ // #test.t2.ok2: cannot call non-function fn (type _) - } -} -validate: { - fn: yaml.Validate - data1: "a: 2" - - // TODO: fix this test: the second disjunct should be eliminated, so there - // should not be a concreteness error. - t1: { - ok1: _|_ // validate.t1.ok1: invalid value "a: 2" (does not satisfy encoding/yaml.Validate({a!:int} | {b!:int})): validate.t1.ok1: error in call to encoding/yaml.Validate: incomplete value {a:2} | {a:2,b!:int} - ok2: "a: 2" - ok3: "a: 2" - } - #A: { - a: int - } - #B: { - b: int - } - data2: "'foo'" - t2: { - ok1: "'foo'" - ok2: "'foo'" - } -} -validatePartial: { - fn: yaml.ValidatePartial - data1: "a: 2" - t1: { - ok1: "a: 2" - ok2: "a: 2" - ok3: "a: 2" - } - #A: { - a: int - } - #B: { - b: int - } - data2: "'foo'" - t2: { - ok1: "'foo'" - ok2: "'foo'" - } -} --- diff/-out/yaml-v3<==>+out/yaml -- -diff old new ---- old -+++ new -@@ -4,7 +4,6 @@ - validate.t1.ok1: invalid value "a: 2" (does not satisfy encoding/yaml.Validate({a!:int} | {b!:int})): error in call to encoding/yaml.Validate: incomplete value {a:2} | {a:2,b!:int}: - ./in.cue:8:11 - ./in.cue:6:9 -- ./in.cue:7:16 - #test.t1.ok2: cannot call non-function fn (type _): - ./in.cue:9:11 - #test.t1.ok3: cannot call non-function fn (type _): -- diff/todo -- missing position -- out/yaml -- diff --git a/pkg/list/testdata/list.txtar b/pkg/list/testdata/list.txtar index 9ccf2343c92..e9eec3e1668 100644 --- a/pkg/list/testdata/list.txtar +++ b/pkg/list/testdata/list.txtar @@ -70,167 +70,6 @@ reverse: { fail2: x: "bad" } --- out/list-v3 -- -Errors: -repeat.t8.v: error in call to list.Repeat: negative count: - ./in.cue:4:30 -concat.t8.v: error in call to list.Concat: cannot use value 1 (type int) as list: - ./in.cue:19:22 - ./in.cue:31:10 -concat.t7.v: cannot use 1 (type int) as list in argument 1 to list.Concat: - ./in.cue:30:9 -minItems.fail1: invalid value [] (does not satisfy list.MinItems(1)): len(list) < MinItems(1) (0 < 1): - ./in.cue:45:12 - ./in.cue:45:26 -maxItems.fail1: invalid value [0,1] (does not satisfy list.MaxItems(1)): len(list) > MaxItems(1) (2 > 1): - ./in.cue:53:12 - ./in.cue:53:26 -reverse.fail1.v: cannot use 1 (type int) as list in argument 1 to list.Reverse: - ./in.cue:68:15 -reverse.fail2.v: cannot use "bad" (type string) as list in argument 1 to list.Reverse: - ./in.cue:69:15 - -Result: -import "list" - -repeat: { - t1: { - x: [] - n: 0 - v: [] - } - t2: { - x: [1] - n: 0 - v: [] - } - t3: { - x: [1] - n: 1 - v: [1] - } - t4: { - x: [1, 2] - n: 1 - v: [1, 2] - } - t5: { - x: [] - n: 3 - v: [] - } - t6: { - x: [1, 2] - n: 3 - v: [1, 2, 1, 2, 1, 2] - } - t7: { - x: [1, 2, 3, 4] - n: 3 - v: [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4] - } - t8: { - x: [1] - n: -1 - v: _|_ // repeat.t8.v: error in call to list.Repeat: negative count - } -} -concat: { - t1: { - x: [] - v: [] - } - t2: { - x: [[]] - v: [] - } - t3: { - x: [[1]] - v: [1] - } - t4: { - x: [[1, 2]] - v: [1, 2] - } - t5: { - x: [[1], [2]] - v: [1, 2] - } - t6: { - x: [[1, 2], [3, 4]] - v: [1, 2, 3, 4] - } - t7: { - x: 1 - v: _|_ // concat.t7.v: cannot use 1 (type int) as list in argument 1 to list.Concat - } - t8: { - x: [1, [2]] - v: _|_ // concat.t8.v: error in call to list.Concat: cannot use value 1 (type int) as list - } -} -unique: { - issue797: { - mylst: [{ - foo: "bar" - }, { - foo: "baz" - }] - } -} -// Issue #2099 -minItems: { - incomplete1: [...] & list.MinItems(1) - fail1: _|_ // minItems.fail1: invalid value [] (does not satisfy list.MinItems(1)): len(list) < MinItems(1) (0 < 1) - ok1: [0, ...] - ok2: [0] -} -maxItems: { - ok1: [...] - ok2: [0, ...] - ok3: [0, ...] - fail1: _|_ // maxItems.fail1: invalid value [0,1] (does not satisfy list.MaxItems(1)): len(list) > MaxItems(1) (2 > 1) -} -reverse: { - t1: { - x: [] - v: [] - } - t2: { - x: [1] - v: [1] - } - t3: { - x: [1, 2, 3, 4] - v: [4, 3, 2, 1] - } - fail1: { - x: 1 - v: _|_ // reverse.fail1.v: cannot use 1 (type int) as list in argument 1 to list.Reverse - } - fail2: { - x: "bad" - v: _|_ // reverse.fail2.v: cannot use "bad" (type string) as list in argument 1 to list.Reverse - } -} --- diff/-out/list-v3<==>+out/list -- -diff old new ---- old -+++ new -@@ -9,11 +9,9 @@ - minItems.fail1: invalid value [] (does not satisfy list.MinItems(1)): len(list) < MinItems(1) (0 < 1): - ./in.cue:45:12 - ./in.cue:45:26 -- ./in.cue:47:9 - maxItems.fail1: invalid value [0,1] (does not satisfy list.MaxItems(1)): len(list) > MaxItems(1) (2 > 1): - ./in.cue:53:12 - ./in.cue:53:26 -- ./in.cue:58:9 - reverse.fail1.v: cannot use 1 (type int) as list in argument 1 to list.Reverse: - ./in.cue:68:15 - reverse.fail2.v: cannot use "bad" (type string) as list in argument 1 to list.Reverse: --- diff/todo/p2 -- -Missing error positions. -- out/list -- Errors: repeat.t8.v: error in call to list.Repeat: negative count: diff --git a/pkg/list/testdata/matchn_err.txtar b/pkg/list/testdata/matchn_err.txtar index 4073bafc292..11aca75fe9b 100644 --- a/pkg/list/testdata/matchn_err.txtar +++ b/pkg/list/testdata/matchn_err.txtar @@ -13,77 +13,6 @@ t1: { } #TOO: {too: int} --- out/list-v3 -- -Errors: -t1.l1: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(>0, [string])): number of matched elements is 0: does not satisfy >0: - ./in.cue:6:6 - ./in.cue:6:18 -t1.l2: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(1, number)): number of matched elements is 3: does not satisfy 1: - ./in.cue:7:6 - ./in.cue:7:18 - ./in.cue:7:21 -t1.l3: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(>1, string)): number of matched elements is 1: does not satisfy >1: - ./in.cue:8:6 - ./in.cue:8:18 - ./in.cue:8:22 -t1.l4: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(0, number)): number of matched elements is 3: does not satisfy 0: - ./in.cue:9:6 - ./in.cue:9:18 - ./in.cue:9:21 -t1.l5: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(string, [int])): number of matched elements is 1: does not satisfy string: - ./in.cue:10:6 - ./in.cue:10:18 -t1.l6: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(>0, {too:int})): number of matched elements is 0: does not satisfy >0: - ./in.cue:11:6 - ./in.cue:11:18 - -Result: -t1: { - l1: _|_ // t1.l1: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(>0, [string])): number of matched elements is 0: does not satisfy >0 - l2: _|_ // t1.l2: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(1, number)): number of matched elements is 3: does not satisfy 1 - l3: _|_ // t1.l3: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(>1, string)): number of matched elements is 1: does not satisfy >1 - l4: _|_ // t1.l4: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(0, number)): number of matched elements is 3: does not satisfy 0 - l5: _|_ // t1.l5: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(string, [int])): number of matched elements is 1: does not satisfy string - l6: _|_ // t1.l6: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(>0, {too:int})): number of matched elements is 0: does not satisfy >0 -} -#TOO: { - too: int -} --- diff/-out/list-v3<==>+out/list -- -diff old new ---- old -+++ new -@@ -1,30 +1,24 @@ - Errors: - t1.l1: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(>0, [string])): number of matched elements is 0: does not satisfy >0: - ./in.cue:6:6 -- ./in.cue:4:12 - ./in.cue:6:18 - t1.l2: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(1, number)): number of matched elements is 3: does not satisfy 1: - ./in.cue:7:6 -- ./in.cue:4:12 - ./in.cue:7:18 - ./in.cue:7:21 - t1.l3: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(>1, string)): number of matched elements is 1: does not satisfy >1: - ./in.cue:8:6 -- ./in.cue:4:12 - ./in.cue:8:18 - ./in.cue:8:22 - t1.l4: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(0, number)): number of matched elements is 3: does not satisfy 0: - ./in.cue:9:6 -- ./in.cue:4:12 - ./in.cue:9:18 - ./in.cue:9:21 - t1.l5: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(string, [int])): number of matched elements is 1: does not satisfy string: - ./in.cue:10:6 -- ./in.cue:4:12 - ./in.cue:10:18 - t1.l6: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(>0, {too:int})): number of matched elements is 0: does not satisfy >0: - ./in.cue:11:6 -- ./in.cue:4:12 - ./in.cue:11:18 - - Result: -- out/list -- Errors: t1.l1: invalid value [1,2,3,"str",[1],{foo:1}] (does not satisfy list.MatchN(>0, [string])): number of matched elements is 0: does not satisfy >0: diff --git a/pkg/struct/testdata/struct.txtar b/pkg/struct/testdata/struct.txtar index bf897530791..92f0c2e4def 100644 --- a/pkg/struct/testdata/struct.txtar +++ b/pkg/struct/testdata/struct.txtar @@ -47,15 +47,19 @@ Errors: minFields1.fail1: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): ./in.cue:4:12 ./in.cue:4:29 + ./in.cue:9:9 minFields1.failHidden1: invalid value {_a:1} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): ./in.cue:4:12 ./in.cue:4:29 + ./in.cue:11:15 minFields2.fail: invalid value {a?:string} (does not satisfy struct.MinFields(2)): len(fields) < MinFields(2) (0 < 2): ./in.cue:21:12 ./in.cue:21:29 + ./in.cue:28:8 maxFields.fail1: invalid value {a:1,b:2} (does not satisfy struct.MaxFields(1)): len(fields) > MaxFields(1) (2 > 1): ./in.cue:32:12 ./in.cue:32:29 + ./in.cue:41:9 Result: import "struct" @@ -133,26 +137,18 @@ maxFields: { diff old new --- old +++ new -@@ -2,15 +2,15 @@ - minFields1.fail1: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): - ./in.cue:4:12 - ./in.cue:4:29 -- ./in.cue:9:9 - minFields1.failHidden1: invalid value {_a:1} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1): +@@ -7,6 +7,10 @@ ./in.cue:4:12 ./in.cue:4:29 -- ./in.cue:11:15 + ./in.cue:11:15 +minFields2.fail: invalid value {a?:string} (does not satisfy struct.MinFields(2)): len(fields) < MinFields(2) (0 < 2): + ./in.cue:21:12 + ./in.cue:21:29 ++ ./in.cue:28:8 maxFields.fail1: invalid value {a:1,b:2} (does not satisfy struct.MaxFields(1)): len(fields) > MaxFields(1) (2 > 1): ./in.cue:32:12 ./in.cue:32:29 -- ./in.cue:41:9 - - Result: - import "struct" -@@ -61,9 +61,7 @@ +@@ -61,9 +65,7 @@ b?: int c?: int }) & struct.MinFields(2) diff --git a/pkg/uuid/testdata/uuid.txtar b/pkg/uuid/testdata/uuid.txtar index 62d26639feb..a67e049370c 100644 --- a/pkg/uuid/testdata/uuid.txtar +++ b/pkg/uuid/testdata/uuid.txtar @@ -43,103 +43,6 @@ variant: a: uuid.Variant(sha1.a) version: a: uuid.Version(sha1.a) urn: a: uuid.URN(sha1.a) toInt: a: uuid.ToInt(sha1.a) --- out/uuid-v3 -- -Errors: -valid.err.a: invalid value "052ef62d_7223_58b6_a551_c1deee46d401" (does not satisfy uuid.Valid): invalid UUID format: - ./in.cue:16:5 -valid.err.b: invalid value "052ef62d-7223-58b6-a551-c1deee" (does not satisfy uuid.Valid): invalid UUID length: 30: - ./in.cue:17:5 -valid.err.c: invalid value "{123e4567-e89b-12d3-a456-426655440000" (does not satisfy uuid.Valid): invalid UUID length: 37: - ./in.cue:18:5 -parse.err.a: error in call to uuid.Parse: invalid UUID format: - ./in.cue:35:13 -parse.err.b: error in call to uuid.Parse: invalid UUID length: 30: - ./in.cue:35:13 -parse.err.c: error in call to uuid.Parse: invalid UUID length: 37: - ./in.cue:35:13 - -Result: -sha1: { - a: "052ef62d-7223-58b6-a551-c1deee46d401" -} -md5: { - a: "d891d69e-ae5c-39e0-9ead-164abd207f1f" -} -validTable: { - a: "052ef62d-7223-58b6-a551-c1deee46d401" - b: "052EF62D-7223-58B6-A551-C1DEEE46D401" - c: "urn:uuid:123e4567-e89b-12d3-a456-426655440000" - d: "{123e4567-e89b-12d3-a456-426655440000}" - e: "123e4567e89b12d3a456426655440000" -} -invalidTable: { - a: "052ef62d_7223_58b6_a551_c1deee46d401" - b: "052ef62d-7223-58b6-a551-c1deee" - c: "{123e4567-e89b-12d3-a456-426655440000" -} -valid: { - ok: { - a: "052ef62d-7223-58b6-a551-c1deee46d401" - b: "052EF62D-7223-58B6-A551-C1DEEE46D401" - c: "urn:uuid:123e4567-e89b-12d3-a456-426655440000" - d: "{123e4567-e89b-12d3-a456-426655440000}" - e: "123e4567e89b12d3a456426655440000" - } - err: { - a: _|_ // valid.err.a: invalid value "052ef62d_7223_58b6_a551_c1deee46d401" (does not satisfy uuid.Valid): valid.err.a: invalid UUID format - b: _|_ // valid.err.b: invalid value "052ef62d-7223-58b6-a551-c1deee" (does not satisfy uuid.Valid): valid.err.b: invalid UUID length: 30 - c: _|_ // valid.err.c: invalid value "{123e4567-e89b-12d3-a456-426655440000" (does not satisfy uuid.Valid): valid.err.c: invalid UUID length: 37 - } -} -parse: { - ok: { - a: "052ef62d-7223-58b6-a551-c1deee46d401" - b: "052ef62d-7223-58b6-a551-c1deee46d401" - c: "123e4567-e89b-12d3-a456-426655440000" - d: "123e4567-e89b-12d3-a456-426655440000" - e: "123e4567-e89b-12d3-a456-426655440000" - } - err: { - a: _|_ // parse.err.a: error in call to uuid.Parse: invalid UUID format - b: _|_ // parse.err.b: error in call to uuid.Parse: invalid UUID length: 30 - c: _|_ // parse.err.c: error in call to uuid.Parse: invalid UUID length: 37 - } -} -fromInt: { - a: "052ef62d-7223-58b6-a551-c1deee46d401" -} -variant: { - a: 1 -} -version: { - a: 5 -} -urn: { - a: "urn:uuid:052ef62d-7223-58b6-a551-c1deee46d401" -} -toInt: { - a: 93651793875903522077150095950593860979557386807737776869062002310283964632724204171313 -} --- diff/-out/uuid-v3<==>+out/uuid -- -diff old new ---- old -+++ new -@@ -1,13 +1,10 @@ - Errors: - valid.err.a: invalid value "052ef62d_7223_58b6_a551_c1deee46d401" (does not satisfy uuid.Valid): invalid UUID format: - ./in.cue:16:5 -- ./in.cue:26:13 - valid.err.b: invalid value "052ef62d-7223-58b6-a551-c1deee" (does not satisfy uuid.Valid): invalid UUID length: 30: - ./in.cue:17:5 -- ./in.cue:26:13 - valid.err.c: invalid value "{123e4567-e89b-12d3-a456-426655440000" (does not satisfy uuid.Valid): invalid UUID length: 37: - ./in.cue:18:5 -- ./in.cue:26:13 - parse.err.a: error in call to uuid.Parse: invalid UUID format: - ./in.cue:35:13 - parse.err.b: error in call to uuid.Parse: invalid UUID length: 30: --- diff/todo/p2 -- -Missing error positions. -- out/uuid -- Errors: valid.err.a: invalid value "052ef62d_7223_58b6_a551_c1deee46d401" (does not satisfy uuid.Valid): invalid UUID format: