# Working set of tests that unit test specifics of the aspect of the # comprehension algorithm that pushes down evaluation to the arcs. -- in.cue -- linkChildren: { w: 1 v: { x: 1 if true { y: 1 if true { z: 1 rw: w rx: x ry: y rz: z n1a: na: [w, x, y, z] n2a: n1a: na: [w, x, y, z] n2z: n1z: nz: z } } } } fail: { a: { // Condition of comprehensions must still hold after its evaluation. // // `b` is not defined, causing this if comprehension to evaluate to // true. However, after inserting the corresponding result in curly // braces, the condition would be true. This is not allowed. if a.b == _|_ { b: 1 } } } embed: { fail1: #C1 #C1: { // TODO(errors): don't include all positions of p in the normal list of // positions, or rather categorize the positions to show: // 1) position of denied fields // 2) position of structs that deny them // 3) points at which those structs where mixed in (perhaps as tree) // 4) conditionals that could enable allowing a field. if false { p: _ } } fail1: p: "foo" // this should fail, as p is not present. success2: #C2 #C2: { if true { p: _ } } success2: p: "foo" // this succeeds as p is present. success3: #C3 #C3: {} success3: { if false { // p does not exist in success3, but it is okay, as it is not added. p: q: 1 } } fail4: #C4 #C4: {} fail4: { if true { // error as p is not allowed in fail4 p: q: 1 } } incomplete5: { a: bool if a { p: q: 1 } } incomplete6: { if false { p: 1 } p: q + 1 q: int } incomplete7: { p: q + 1 q: int if false { q: 1 // do not inadvertently pick up a void arc. } } } // Mix of both dynamic and static fields. mixedFieldsSuccess: { a: { for _, s in ["foo"] { "\(s)": 1 X: 1 } } b: #Def: { for _, s in ["foo"] { "\(s)": 1 X: 1 } } b: x: b.#Def b: x: X: _ b: x: foo: _ c: #Def: { X: int foo: int } c: x: c.#Def c: x: { for _, s in ["foo"] { "\(s)": 1 X: 1 } } } // fieldMismatch tests that an embedded scalar cannot be mixed with regular // fields, even if they are added by a comprehension. fieldMismatch: { a: { 2 if true { x: 3 } } } // b12aStructCycle presents a case that can easily lead to stack overflow in // a naive implementation. It corresponds to test b12a in structural.txtar. noStackOverflowStructCycle: { #list: { tail: #list if tail != null { sum: tail.sum } } list: { tail: list if tail != null { sum: tail.sum } } } // #a is incomplete, but the missing values are provided by x. provideIncompleteSuccess: { t1: { #a: { if b { c: 4 } b: bool } x: (#a & {b: true}) & {c: 4} y: x } t2: { // c should be allowed #a: { if b { c: 4 } b: true } #c: {} a: { if b { c: d: 4 } b: true // d is disallowed, even though it is added by embedding. // TODO: this seems right, but it may be good to clarify why. c: #c } } } // voidArcs tests that fields are dropped and reference up counts are adjusted // appropriately under various rewrite scenario. voidArcs: { scopes: { x: 1 a: { y: 2 if true { b: x c: d: x e: y f: g: y } } } drop: { x: 1 a: { y: 2 if false { b: x c: d: x e: y f: g: y } } } } cyclicError: { a: { x: bool y: bool if a.x { y: true } if a.y { x: true } b: {} } // The evaluation of `b` in `a` triggers a to be fully evaluated, which // is not possible because the evaluation of `a` depends on incomplete // values. c: a.b } midwayReferences: { a: { for i, j in {a: 1, b: 2} { x: y: z: (i): j } x: y: {} } b: a.x c: a.x.y d: a.x.y.z } // Ensure first closedness check is done after evaluation of // comprehensions. closedCheck: success1: { a: b: [string]: #D #D: { d: string if d != "c" { e: string } } a: b: c: { d: "d" e: "ok" } } closedCheck: success2: { a: b: [string]: #D #D: { d: string if d != "c" { ("foo"+"bar"): string } } a: b: c: { d: "d" foobar: "ok" } } closedCheck: success3: { a: b: [string]: #D #D: { d: string e: { if d != "c" { string } } } a: b: c: { d: "d" e: "ok" } } emptyComprehensionIncomplete: { a: {} b: { // b should be an incomplete error if a.b { } } } // voidEliminationSuccess tests that "conditional" or "void" arcs are eliminated // if their expression does not yield any result. voidEliminationSuccess: t1: { [string]: { b: bool if !b {} } if false { a: b: true } } voidEliminationSuccess: t2: { components: { sinks: [string]: #C & { kind: string configuration: { if kind != "source" { inputs: { required: true } } } } #C: { kind: string configuration: [string]: { required: bool if !required { common: bool } } } } components: sinks: blah: { kind: "source" } } voidEliminationSuccess: derefRef1: { a: [string]: c: [string]: E a: b: c: { if false { d: e: true // resolves } } E: { e: bool f: !e // remains incomplete } } voidEliminationSuccess: derefRef2: { a: [string]: c: [string]: E a: b: c: { if false { d: e: true // resolves } } E: #F #F: { e: bool f: !e // remains incomplete } } voidEliminationSuccess: derefDisj1: { a: [string]: c: [string]: E a: b: c: { if false { d: e: true } } E: { e: bool f: !e } | { g: bool h: !g } } voidEliminationSuccess: derefDisj2: { a: [string]: c: [string]: E & E a: b: c: { if false { d: e: true } } E: { e: bool f: !e } | { g: bool h: !g } } voidEliminationSuccess: bulk1: { a: b: {} a: [string]: { c: { e: string if false { e: "" } } d: c.e } } voidEliminationSuccess: opt1: { a: b: {} a: b?: { c: { e: string if false { e: "" } } d: c.e } } voidEliminationSuccess: noCycle1: { _x: a.b a: { c: h: "stream" b: { if c.g != _|_ {} } c: { if false {g: _} } } } voidEliminationSuccess: noCycle2: { a: { c: h: "stream" b: { if c.g != _|_ {} } c: { if false {g: _} } } _x: a.b } voidLookup: { a: x: z: a.y.z.void a: y: { c: _ z: {} } a: [string]: { c: { for k, v in z { (k): null // don't add this arc anywhere } } z: { if false { err: {} } } } } // Eliminate the top value even if there is an error (especially incomplete // errors). topElimination: { a: int _ if true { x: a+1 } } voidEliminationSuccess: drop1: { // Do not include x in s. t: { #ok: *true | bool if #ok { x: int } } s: t & { #ok: false } } // should be error // issue #465 explicitDefaultError: { a: string | *_|_ if a != "" { } } // Remove arcs for with no for comprehension results. allArcsSuccess: p1: { x: { for k, _ in y { (k): null } } y: { if false { x: {} } } } allArcsSuccess: p2: { y: { if false { x: {} } } x: { for k, _ in y { (k): null } } } -- issue2208.cue -- voidErrorIncomplete: { #Schema: [string]: { required: bool if !required { } } root: #Schema root: { if false { child: required: false } } } // TODO: should these always be errors, or only for cue vet? // voidErrorFatal: pattern: { // #Schema: [string]: { // if "str" + 3 { // } // } // // root: #Schema // root: { // if false { // child: required: false // } // } // } // // voidErrorFatal: field: { // root: { // if false { // child: 2 + "str" // } // } // } -- issue1759.cue -- // Tests derived from Unity. unity: success1: { #Config: { name: string type: string } #AnyConfig: { #Config ... } #Env: { name: string configurations: [string]: #AnyConfig } envs: "e1": #Env & { configurations: c1: #Config } envs: [string]: configurations: [string]: { type: "foo" if type == "terraform" { backend: { type: "s3" } } } } issue1759: { _ports_map: {} if len(_ports_map) > 0 { port: _ports_map.a.port } if true { _ports_map: a: {port: "80"} } } arcAlignment: t1: { [string]: { if true { } } if false { c: _ } } -- issue2111.cue -- // All arc types, not just regular fields, should be pushed down. letPushdown: { _c: y: 1 a: { for k, v in _c { let x = v if x != _|_ { } } } } -- issue2113.cue -- // Ensure that an enclosing Value clause of a nested comprehension is evaluated // before the nested comprehension itself is evaluated. nestedWithEmbeddingOK: { c: [1] a: { for k, v in c { {x: 1} if a.x != _|_ { } } } } nestedWithDynamicFieldOK: { // TODO(broken) _c: y: 1 a: { for k, v in _c { if x != _|_ { } x="\(k)": 1 } } } // Errors in nested comprehensions should also be reported. errorPropagation: { deployment: _ for k, v in deployment { for k1, v2 in v.env2 { // Report this error. deployment: (k): x1: 1 } } for id in ["elem"] { deployment: (id): x2: 2 } } -- issue2131.cue -- import "path" issue2131: tests: { windows: { eg1: in: #"c:\"# eg2: in: #"c:\test"# eg3: in: #"c:\test\"# } for os, examples in tests for k, v in examples { (os): (k): out: "test" } } -- reflect.cue -- import "encoding/json" unifyDynamicReflectSuccess: { for _, s in ["foo"] { X: {...} "\(s)": { X: {...} // cannot be _ Y: json.Marshal(X) // cannot be yaml, X cannot be literal } } [string]: X: { if true {// must be there x: y: {} // at least 2 nestings needed to expose problem } } } -- out/eval/stats -- Leaks: 15 Freed: 394 Reused: 388 Allocs: 21 Retain: 108 Unifications: 395 Conjuncts: 640 Disjuncts: 472 -- out/eval -- Errors: embed.fail1.p: field not allowed: ./in.cue:37:9 ./in.cue:38:7 ./in.cue:45:3 ./in.cue:45:12 ./in.cue:46:4 ./in.cue:49:9 embed.fail4.p: field not allowed: ./in.cue:69:9 ./in.cue:70:7 ./in.cue:71:9 ./in.cue:72:3 ./in.cue:74:4 noStackOverflowStructCycle.#list.tail: structural cycle noStackOverflowStructCycle.list.tail: structural cycle provideIncompleteSuccess.t2.a.c.d: field not allowed: ./in.cue:187:7 ./in.cue:189:4 ./in.cue:190:8 ./in.cue:195:7 fieldMismatch.a: cannot combine regular field "x" with 2: ./in.cue:139:7 ./in.cue:137:3 Result: (_|_){ // [eval] linkChildren: (struct){ w: (int){ 1 } v: (struct){ x: (int){ 1 } y: (int){ 1 } z: (int){ 1 } rw: (int){ 1 } rx: (int){ 1 } ry: (int){ 1 } rz: (int){ 1 } n1a: (struct){ na: (#list){ 0: (int){ 1 } 1: (int){ 1 } 2: (int){ 1 } 3: (int){ 1 } } } n2a: (struct){ n1a: (struct){ na: (#list){ 0: (int){ 1 } 1: (int){ 1 } 2: (int){ 1 } 3: (int){ 1 } } } } n2z: (struct){ n1z: (struct){ nz: (int){ 1 } } } } } fail: (struct){ a: (_|_){ // [cycle] fail.a: cycle with field a.b: // ./in.cue:30:6 } } embed: (_|_){ // [eval] fail1: (_|_){ // [eval] p: (_|_){ // [eval] embed.fail1.p: field not allowed: // ./in.cue:37:9 // ./in.cue:38:7 // ./in.cue:45:3 // ./in.cue:45:12 // ./in.cue:46:4 // ./in.cue:49:9 } } #C1: (#struct){ } success2: (#struct){ p: (string){ "foo" } } #C2: (#struct){ p: (_){ _ } } success3: (#struct){ } #C3: (#struct){ } fail4: (_|_){ // [eval] p: (_|_){ // [eval] embed.fail4.p: field not allowed: // ./in.cue:69:9 // ./in.cue:70:7 // ./in.cue:71:9 // ./in.cue:72:3 // ./in.cue:74:4 q: (int){ 1 } } } #C4: (#struct){ } incomplete5: (_|_){ // [incomplete] embed.incomplete5: incomplete bool: bool: // ./in.cue:79:6 a: (bool){ bool } } incomplete6: (struct){ p: (_|_){ // [incomplete] embed.incomplete6.p: non-concrete value int in operand to +: // ./in.cue:89:6 // ./in.cue:90:6 } q: (int){ int } } incomplete7: (struct){ p: (_|_){ // [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 } } } mixedFieldsSuccess: (struct){ a: (struct){ X: (int){ 1 } foo: (int){ 1 } } b: (struct){ #Def: (#struct){ X: (int){ 1 } foo: (int){ 1 } } x: (#struct){ X: (int){ 1 } foo: (int){ 1 } } } c: (struct){ #Def: (#struct){ X: (int){ int } foo: (int){ int } } x: (#struct){ X: (int){ 1 } foo: (int){ 1 } } } } fieldMismatch: (_|_){ // [eval] a: (_|_){ // [eval] fieldMismatch.a: cannot combine regular field "x" with 2: // ./in.cue:139:7 // ./in.cue:137:3 x: (int){ 3 } } } noStackOverflowStructCycle: (_|_){ // [structural cycle] #list: (_|_){ // [structural cycle] noStackOverflowStructCycle.#list.tail: structural cycle tail: (_|_){ // [structural cycle] noStackOverflowStructCycle.#list.tail: structural cycle } } list: (_|_){ // [structural cycle] noStackOverflowStructCycle.list.tail: structural cycle tail: (_|_){ // [structural cycle] noStackOverflowStructCycle.list.tail: structural cycle } } } provideIncompleteSuccess: (_|_){ // [eval] t1: (struct){ #a: (_|_){ // [incomplete] provideIncompleteSuccess.t1.#a: incomplete bool: bool: // ./in.cue:172:7 b: (bool){ bool } } x: (#struct){ c: (int){ 4 } b: (bool){ true } } y: (#struct){ c: (int){ 4 } b: (bool){ true } } } t2: (_|_){ // [eval] #a: (#struct){ c: (int){ 4 } b: (bool){ true } } #c: (#struct){ } a: (_|_){ // [eval] c: (_|_){ // [eval] d: (_|_){ // [eval] provideIncompleteSuccess.t2.a.c.d: field not allowed: // ./in.cue:187:7 // ./in.cue:189:4 // ./in.cue:190:8 // ./in.cue:195:7 } } b: (bool){ true } } } } voidArcs: (struct){ scopes: (struct){ x: (int){ 1 } a: (struct){ y: (int){ 2 } b: (int){ 1 } c: (struct){ d: (int){ 1 } } e: (int){ 2 } f: (struct){ g: (int){ 2 } } } } drop: (struct){ x: (int){ 1 } a: (struct){ y: (int){ 2 } } } } cyclicError: (struct){ a: (_|_){ // [cycle] cycle error x: (_|_){ // [cycle] cycle error } y: (_|_){ // [cycle] cycle error } b: (struct){ } } c: (struct){ } } midwayReferences: (struct){ a: (struct){ x: (struct){ y: (struct){ z: (struct){ a: (int){ 1 } b: (int){ 2 } } } } } b: (struct){ y: (struct){ z: (struct){ a: (int){ 1 } b: (int){ 2 } } } } c: (struct){ z: (struct){ a: (int){ 1 } b: (int){ 2 } } } d: (struct){ a: (int){ 1 } b: (int){ 2 } } } closedCheck: (struct){ success1: (struct){ a: (struct){ b: (struct){ c: (#struct){ d: (string){ "d" } e: (string){ "ok" } } } } #D: (_|_){ // [incomplete] closedCheck.success1.#D: non-concrete value string in operand to !=: // ./in.cue:267:6 // ./in.cue:266:6 d: (string){ string } } } success2: (struct){ a: (struct){ b: (struct){ c: (#struct){ d: (string){ "d" } foobar: (string){ "ok" } } } } #D: (_|_){ // [incomplete] closedCheck.success2.#D: non-concrete value string in operand to !=: // ./in.cue:283:6 // ./in.cue:282:6 d: (string){ string } } } success3: (struct){ a: (struct){ b: (struct){ c: (#struct){ d: (string){ "d" } e: (string){ "ok" } } } } #D: (#struct){ d: (string){ string } e: (_|_){ // [incomplete] closedCheck.success3.#D.e: non-concrete value string in operand to !=: // ./in.cue:300:7 // ./in.cue:298:6 } } } } emptyComprehensionIncomplete: (struct){ a: (struct){ } b: (_|_){ // [incomplete] emptyComprehensionIncomplete.b: undefined field: b: // ./in.cue:316:8 } } voidEliminationSuccess: (struct){ t1: (struct){ } t2: (struct){ components: (struct){ sinks: (struct){ blah: (#struct){ kind: (string){ "source" } configuration: (#struct){ } } } #C: (#struct){ kind: (string){ string } configuration: (#struct){ } } } } derefRef1: (struct){ a: (struct){ b: (struct){ c: (struct){ } } } E: (struct){ e: (bool){ bool } f: (_|_){ // [incomplete] voidEliminationSuccess.derefRef1.E.f: operand e of '!' not concrete (was bool): // ./in.cue:373:7 } } } derefRef2: (struct){ a: (struct){ b: (struct){ c: (struct){ } } } E: (#struct){ e: (bool){ bool } f: (_|_){ // [incomplete] voidEliminationSuccess.derefRef2.E.f: operand e of '!' not concrete (was bool): // ./in.cue:389:7 } } #F: (#struct){ e: (bool){ bool } f: (_|_){ // [incomplete] voidEliminationSuccess.derefRef2.#F.f: operand e of '!' not concrete (was bool): // ./in.cue:389:7 } } } derefDisj1: (struct){ a: (struct){ b: (struct){ c: (struct){ } } } E: (_|_){ // [incomplete] voidEliminationSuccess.derefDisj1.E: 2 errors in empty disjunction:: // ./in.cue:394:28 // voidEliminationSuccess.derefDisj1.E.f: operand e of '!' not concrete (was bool): // ./in.cue:404:7 // voidEliminationSuccess.derefDisj1.E.h: operand g of '!' not concrete (was bool): // ./in.cue:407:7 g: (bool){ bool } h: (_|_){ // [incomplete] voidEliminationSuccess.derefDisj1.E.h: operand g of '!' not concrete (was bool): // ./in.cue:407:7 } } } derefDisj2: (struct){ a: (struct){ b: (struct){ c: (struct){ } } } E: (_|_){ // [incomplete] voidEliminationSuccess.derefDisj2.E: 2 errors in empty disjunction:: // ./in.cue:412:28 // voidEliminationSuccess.derefDisj2.E.f: operand e of '!' not concrete (was bool): // ./in.cue:422:7 // voidEliminationSuccess.derefDisj2.E.h: operand g of '!' not concrete (was bool): // ./in.cue:425:7 g: (bool){ bool } h: (_|_){ // [incomplete] voidEliminationSuccess.derefDisj2.E.h: operand g of '!' not concrete (was bool): // ./in.cue:425:7 } } } bulk1: (struct){ a: (struct){ b: (struct){ c: (struct){ e: (string){ string } } d: (string){ string } } } } opt1: (struct){ a: (struct){ b: (struct){ c: (struct){ e: (string){ string } } d: (string){ string } } } } noCycle1: (struct){ _x: (struct){ } a: (struct){ c: (struct){ h: (string){ "stream" } } b: (struct){ } } } noCycle2: (struct){ a: (struct){ c: (struct){ h: (string){ "stream" } } b: (struct){ } } _x: (struct){ } } drop1: (struct){ t: (struct){ #ok: (bool){ |(*(bool){ true }, (bool){ bool }) } x: (int){ int } } s: (struct){ #ok: (bool){ false } } } } voidLookup: (struct){ a: (struct){ x: (struct){ z: (_|_){ // [incomplete] voidLookup.a.x.z: undefined field: void: // ./in.cue:482:17 } c: (_|_){ // [incomplete] voidLookup.a.x.z: undefined field: void: // ./in.cue:482:17 } } y: (struct){ c: (_){ _ } z: (struct){ } } } } topElimination: (struct){ a: (int){ int } x: (_|_){ // [incomplete] topElimination.x: non-concrete value int in operand to +: // ./in.cue:510:6 // ./in.cue:507:5 } } explicitDefaultError: (_|_){ // [incomplete] explicitDefaultError: non-concrete value string in operand to !=: // ./in.cue:532:5 // ./in.cue:530:5 a: (string){ string } } allArcsSuccess: (struct){ p1: (struct){ x: (struct){ } y: (struct){ } } p2: (struct){ y: (struct){ } x: (struct){ } } } unity: (struct){ success1: (struct){ #Config: (#struct){ name: (string){ string } type: (string){ string } } #AnyConfig: (#struct){ name: (string){ string } type: (string){ string } } #Env: (#struct){ name: (string){ string } configurations: (#struct){ } } envs: (struct){ e1: (#struct){ name: (string){ string } configurations: (#struct){ c1: (#struct){ name: (string){ string } type: (string){ "foo" } } } } } } } issue1759: (struct){ _ports_map: (struct){ a: (struct){ port: (string){ "80" } } } port: (string){ "80" } } arcAlignment: (struct){ t1: (struct){ } } letPushdown: (struct){ _c: (struct){ y: (int){ 1 } } a: (struct){ let x#1multi = 〈1;v〉 } } nestedWithEmbeddingOK: (struct){ c: (#list){ 0: (int){ 1 } } a: (struct){ x: (int){ 1 } } } nestedWithDynamicFieldOK: (struct){ _c: (struct){ y: (int){ 1 } } a: (_|_){ // [cycle] nestedWithDynamicFieldOK.a: circular dependency in evaluation of conditionals: "\(〈1;k〉)" changed after evaluation: // ./issue2113.cue:19:7 y: (int){ 1 } } } errorPropagation: (_|_){ // [incomplete] errorPropagation: undefined field: env2: // ./issue2113.cue:30:19 deployment: (_|_){ // [incomplete] errorPropagation: undefined field: env2: // ./issue2113.cue:30:19 elem: (struct){ x2: (int){ 2 } } } } issue2131: (struct){ tests: (struct){ windows: (struct){ eg1: (struct){ in: (string){ "c:\\" } out: (string){ "test" } } eg2: (struct){ in: (string){ "c:\\test" } out: (string){ "test" } } eg3: (struct){ in: (string){ "c:\\test\\" } out: (string){ "test" } } } } } voidErrorIncomplete: (struct){ #Schema: (#struct){ } root: (#struct){ } } unifyDynamicReflectSuccess: (struct){ X: (struct){ X: (struct){ x: (struct){ y: (struct){ } } } } foo: (struct){ X: (struct){ x: (struct){ y: (struct){ } } } Y: (string){ "{\"x\":{\"y\":{}}}" } } } } -- out/compile -- --- in.cue { linkChildren: { w: 1 v: { x: 1 if true { y: 1 if true { z: 1 rw: 〈3;w〉 rx: 〈2;x〉 ry: 〈1;y〉 rz: 〈0;z〉 n1a: { na: [ 〈5;w〉, 〈4;x〉, 〈3;y〉, 〈2;z〉, ] } n2a: { n1a: { na: [ 〈6;w〉, 〈5;x〉, 〈4;y〉, 〈3;z〉, ] } } n2z: { n1z: { nz: 〈2;z〉 } } } } } } fail: { a: { if (〈1;a〉.b == _|_(explicit error (_|_ literal) in source)) { b: 1 } } } embed: { fail1: 〈0;#C1〉 #C1: { if false { p: _ } } fail1: { p: "foo" } success2: 〈0;#C2〉 #C2: { if true { p: _ } } success2: { p: "foo" } success3: 〈0;#C3〉 #C3: {} success3: { if false { p: { q: 1 } } } fail4: 〈0;#C4〉 #C4: {} fail4: { if true { p: { q: 1 } } } incomplete5: { a: bool if 〈0;a〉 { p: { q: 1 } } } incomplete6: { if false { p: 1 } p: (〈0;q〉 + 1) q: int } incomplete7: { p: (〈0;q〉 + 1) q: int if false { q: 1 } } } mixedFieldsSuccess: { a: { for _, s in [ "foo", ] { "\(〈1;s〉)": 1 X: 1 } } b: { #Def: { for _, s in [ "foo", ] { "\(〈1;s〉)": 1 X: 1 } } } b: { x: 〈1;b〉.#Def } b: { x: { X: _ } } b: { x: { foo: _ } } c: { #Def: { X: int foo: int } } c: { x: 〈1;c〉.#Def } c: { x: { for _, s in [ "foo", ] { "\(〈1;s〉)": 1 X: 1 } } } } fieldMismatch: { a: { 2 if true { x: 3 } } } noStackOverflowStructCycle: { #list: { tail: 〈1;#list〉 if (〈0;tail〉 != null) { sum: 〈1;tail〉.sum } } list: { tail: 〈1;list〉 if (〈0;tail〉 != null) { sum: 〈1;tail〉.sum } } } provideIncompleteSuccess: { t1: { #a: { if 〈0;b〉 { c: 4 } b: bool } x: ((〈0;#a〉 & { b: true }) & { c: 4 }) y: 〈0;x〉 } t2: { #a: { if 〈0;b〉 { c: 4 } b: true } #c: {} a: { if 〈0;b〉 { c: { d: 4 } } b: true c: 〈1;#c〉 } } } voidArcs: { scopes: { x: 1 a: { y: 2 if true { b: 〈2;x〉 c: { d: 〈3;x〉 } e: 〈1;y〉 f: { g: 〈2;y〉 } } } } drop: { x: 1 a: { y: 2 if false { b: 〈2;x〉 c: { d: 〈3;x〉 } e: 〈1;y〉 f: { g: 〈2;y〉 } } } } } cyclicError: { a: { x: bool y: bool if 〈1;a〉.x { y: true } if 〈1;a〉.y { x: true } b: {} } c: 〈0;a〉.b } midwayReferences: { a: { for i, j in { a: 1 b: 2 } { x: { y: { z: { 〈4;i〉: 〈4;j〉 } } } } x: { y: {} } } b: 〈0;a〉.x c: 〈0;a〉.x.y d: 〈0;a〉.x.y.z } closedCheck: { success1: { a: { b: { [string]: 〈2;#D〉 } } #D: { d: string if (〈0;d〉 != "c") { e: string } } a: { b: { c: { d: "d" e: "ok" } } } } } closedCheck: { success2: { a: { b: { [string]: 〈2;#D〉 } } #D: { d: string if (〈0;d〉 != "c") { ("foo" + "bar"): string } } a: { b: { c: { d: "d" foobar: "ok" } } } } } closedCheck: { success3: { a: { b: { [string]: 〈2;#D〉 } } #D: { d: string e: { if (〈1;d〉 != "c") { string } } } a: { b: { c: { d: "d" e: "ok" } } } } } emptyComprehensionIncomplete: { a: {} b: { if 〈1;a〉.b {} } } voidEliminationSuccess: { t1: { [string]: { b: bool if !〈0;b〉 {} } if false { a: { b: true } } } } voidEliminationSuccess: { t2: { components: { sinks: { [string]: (〈1;#C〉 & { kind: string configuration: { if (〈1;kind〉 != "source") { inputs: { required: true } } } }) } #C: { kind: string configuration: { [string]: { required: bool if !〈0;required〉 { common: bool } } } } } components: { sinks: { blah: { kind: "source" } } } } } voidEliminationSuccess: { derefRef1: { a: { [string]: { c: { [string]: 〈3;E〉 } } } a: { b: { c: { if false { d: { e: true } } } } } E: { e: bool f: !〈0;e〉 } } } voidEliminationSuccess: { derefRef2: { a: { [string]: { c: { [string]: 〈3;E〉 } } } a: { b: { c: { if false { d: { e: true } } } } } E: 〈0;#F〉 #F: { e: bool f: !〈0;e〉 } } } voidEliminationSuccess: { derefDisj1: { a: { [string]: { c: { [string]: 〈3;E〉 } } } a: { b: { c: { if false { d: { e: true } } } } } E: ({ e: bool f: !〈0;e〉 }|{ g: bool h: !〈0;g〉 }) } } voidEliminationSuccess: { derefDisj2: { a: { [string]: { c: { [string]: (〈3;E〉 & 〈3;E〉) } } } a: { b: { c: { if false { d: { e: true } } } } } E: ({ e: bool f: !〈0;e〉 }|{ g: bool h: !〈0;g〉 }) } } voidEliminationSuccess: { bulk1: { a: { b: {} } a: { [string]: { c: { e: string if false { e: "" } } d: 〈0;c〉.e } } } } voidEliminationSuccess: { opt1: { a: { b: {} } a: { b?: { c: { e: string if false { e: "" } } d: 〈0;c〉.e } } } } voidEliminationSuccess: { noCycle1: { _x: 〈0;a〉.b a: { c: { h: "stream" } b: { if (〈1;c〉.g != _|_(explicit error (_|_ literal) in source)) {} } c: { if false { g: _ } } } } } voidEliminationSuccess: { noCycle2: { a: { c: { h: "stream" } b: { if (〈1;c〉.g != _|_(explicit error (_|_ literal) in source)) {} } c: { if false { g: _ } } } _x: 〈0;a〉.b } } voidLookup: { a: { x: { z: 〈2;a〉.y.z.void } } a: { y: { c: _ z: {} } } a: { [string]: { c: { for k, v in 〈1;z〉 { 〈1;k〉: null } } z: { if false { err: {} } } } } } topElimination: { a: int _ if true { x: (〈1;a〉 + 1) } } voidEliminationSuccess: { drop1: { t: { #ok: (*true|bool) if 〈0;#ok〉 { x: int } } s: (〈0;t〉 & { #ok: false }) } } explicitDefaultError: { a: (string|*_|_(explicit error (_|_ literal) in source)) if (〈0;a〉 != "") {} } allArcsSuccess: { p1: { x: { for k, _ in 〈1;y〉 { 〈1;k〉: null } } y: { if false { x: {} } } } } allArcsSuccess: { p2: { y: { if false { x: {} } } x: { for k, _ in 〈1;y〉 { 〈1;k〉: null } } } } } --- issue1759.cue { unity: { success1: { #Config: { name: string type: string } #AnyConfig: { 〈1;#Config〉 ... } #Env: { name: string configurations: { [string]: 〈2;#AnyConfig〉 } } envs: { e1: (〈1;#Env〉 & { configurations: { c1: 〈3;#Config〉 } }) } envs: { [string]: { configurations: { [string]: { type: "foo" if (〈0;type〉 == "terraform") { backend: { type: "s3" } } } } } } } } issue1759: { _ports_map: {} if (len(〈0;_ports_map〉) > 0) { port: 〈1;_ports_map〉.a.port } if true { _ports_map: { a: { port: "80" } } } } arcAlignment: { t1: { [string]: { if true {} } if false { c: _ } } } } --- issue2111.cue { letPushdown: { _c: { y: 1 } a: { for k, v in 〈1;_c〉 { let x#1multi = 〈1;v〉 if (〈0;let x#1〉 != _|_(explicit error (_|_ literal) in source)) {} } } } } --- issue2113.cue { nestedWithEmbeddingOK: { c: [ 1, ] a: { for k, v in 〈1;c〉 { { x: 1 } if (〈3;a〉.x != _|_(explicit error (_|_ literal) in source)) {} } } } nestedWithDynamicFieldOK: { _c: { y: 1 } a: { for k, v in 〈1;_c〉 { if (〈0;("\(〈1;k〉)")〉 != _|_(explicit error (_|_ literal) in source)) {} "\(〈1;k〉)": 1 } } } errorPropagation: { deployment: _ for k, v in 〈0;deployment〉 { for k1, v2 in 〈1;v〉.env2 { deployment: { 〈4;k〉: { x1: 1 } } } } for _, id in [ "elem", ] { deployment: { 〈2;id〉: { x2: 2 } } } } } --- issue2131.cue { issue2131: { tests: { windows: { eg1: { in: "c:\\" } eg2: { in: "c:\\test" } eg3: { in: "c:\\test\\" } } for os, examples in 〈1;tests〉 for k, v in 〈0;examples〉 { 〈2;os〉: { 〈2;k〉: { out: "test" } } } } } } --- issue2208.cue { voidErrorIncomplete: { #Schema: { [string]: { required: bool if !〈0;required〉 {} } } root: 〈0;#Schema〉 root: { if false { child: { required: false } } } } } --- reflect.cue { unifyDynamicReflectSuccess: { for _, s in [ "foo", ] { X: { ... } "\(〈1;s〉)": { X: { ... } Y: 〈import;"encoding/json"〉.Marshal(〈0;X〉) } } [string]: { X: { if true { x: { y: {} } } } } } }