this repo has no description
0
fork

Configure Feed

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

cue/testdata: convert definitions/ tests to inline @test format

Convert typocheck.txtar and issue4000.txtar from golden-file format
to inline @test(...) annotations, replacing the out/eval and
out/evalalpha golden sections.

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

+442 -3914
+42 -293
cue/testdata/definitions/issue4000.txtar
··· 1 1 # Tests that list.Sort with complex type definitions involving defaults works. 2 2 # Issue: https://cuelang.org/issue/4000 3 - #todo:inline: medium — disjunctions; use @test(final) for default selection 4 3 -- in.cue -- 5 4 import "list" 6 5 ··· 8 7 x: {} 9 8 y: {} 10 9 less: x.kind < y.kind 11 - }) 10 + }) @test(eq, [{ 11 + spec: [{rules: [{expr: "x"}]}] 12 + kind: *"default" | string 13 + 14 + @test(shareID=L0) 15 + },{ 16 + spec: [{rules: [{expr: "y"}]}] 17 + kind: *"default" | string 18 + 19 + @test(shareID=L1) 20 + }] 21 + ) 12 22 13 23 #List: items: list.Concat(_items) 14 24 15 25 _items: [#VMRuleList] 16 26 27 + // TODO: this works, but make the in-place ones work as well for lists. 28 + // @test(shareID=L0, at=items.0) 29 + // @test(shareID=L1, at=items.1) 30 + // @test(shareID=L0, at=#VMRuleList.0) 31 + // @test(shareID=L1, at=#VMRuleList.1) 32 + 17 33 #VMRuleList: [...null | #VMRule] & [{ 18 34 spec: [{ 19 35 rules: [{expr: "x"}] ··· 22 38 spec: [{ 23 39 rules: [{expr: "y"}] 24 40 }] 25 - }] 41 + }] @test(eq, [{ 42 + @test(shareID=L0) 43 + 44 + kind: *"default" | string 45 + spec: [{ 46 + rules: [{ 47 + expr: "x" 48 + }] 49 + }] 50 + }, { 51 + @test(shareID=L1) 52 + 53 + kind: *"default" | string 54 + spec: [{ 55 + rules: [{ 56 + expr: "y" 57 + }] 58 + }] 59 + }]) 26 60 27 61 #RuleGroup: rules: [...#Rule] 28 62 29 - #Rule: expr: string 63 + #Rule: expr: string @test(eq, string) 30 64 31 65 #VMRule: { 32 66 #TypeMeta 33 67 spec: [...#RuleGroup] 34 68 } 35 69 #TypeMeta: kind: string | *"default" 36 - -- out/evalalpha -- 37 - (struct){ 38 - items: (#list){ 39 - 0: ~(#VMRuleList.0) 40 - 1: ~(#VMRuleList.1) 41 - } 42 - #List: (#struct){ 43 - items: (#list){ 44 - 0: ~(#VMRuleList.0) 45 - 1: ~(#VMRuleList.1) 46 - } 47 - } 48 - _items: (#list){ 49 - 0: ~(#VMRuleList) 50 - } 51 - #VMRuleList: (#list){ 52 - 0: (#struct){ 53 - spec: (#list){ 54 - 0: (#struct){ 55 - rules: (#list){ 56 - 0: (#struct){ 57 - expr: (string){ "x" } 58 - } 59 - } 60 - } 61 - } 62 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 63 - } 64 - 1: (#struct){ 65 - spec: (#list){ 66 - 0: (#struct){ 67 - rules: (#list){ 68 - 0: (#struct){ 69 - expr: (string){ "y" } 70 - } 71 - } 72 - } 73 - } 74 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 75 - } 76 - } 77 - #RuleGroup: (#struct){ 78 - rules: (list){ 79 - } 80 - } 81 - #Rule: (#struct){ 82 - expr: (string){ string } 83 - } 84 - #VMRule: (#struct){ 85 - spec: (list){ 86 - } 87 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 88 - } 89 - #TypeMeta: (#struct){ 90 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 91 - } 92 - } 70 + -- out/errors.txt -- 93 71 -- out/compile -- 94 72 --- in.cue 95 73 { ··· 160 138 Disjuncts: 12 161 139 162 140 NumCloseIDs: 17 163 - -- diff/-out/evalalpha<==>+out/eval -- 164 - diff old new 165 - --- old 166 - +++ new 167 - @@ -1,85 +1,16 @@ 168 - (struct){ 169 - items: (#list){ 170 - - 0: (#struct){ 171 - - spec: (#list){ 172 - - 0: (#struct){ 173 - - rules: (#list){ 174 - - 0: (#struct){ 175 - - expr: (string){ "x" } 176 - - } 177 - - } 178 - - } 179 - - } 180 - - kind: (string){ |(*(string){ "default" }, (string){ string }) } 181 - - } 182 - - 1: (#struct){ 183 - - spec: (#list){ 184 - - 0: (#struct){ 185 - - rules: (#list){ 186 - - 0: (#struct){ 187 - - expr: (string){ "y" } 188 - - } 189 - - } 190 - - } 191 - - } 192 - - kind: (string){ |(*(string){ "default" }, (string){ string }) } 193 - - } 194 - + 0: ~(#VMRuleList.0) 195 - + 1: ~(#VMRuleList.1) 196 - } 197 - #List: (#struct){ 198 - items: (#list){ 199 - - 0: (#struct){ 200 - - spec: (#list){ 201 - - 0: (#struct){ 202 - - rules: (#list){ 203 - - 0: (#struct){ 204 - - expr: (string){ "x" } 205 - - } 206 - - } 207 - - } 208 - - } 209 - - kind: (string){ |(*(string){ "default" }, (string){ string }) } 210 - - } 211 - - 1: (#struct){ 212 - - spec: (#list){ 213 - - 0: (#struct){ 214 - - rules: (#list){ 215 - - 0: (#struct){ 216 - - expr: (string){ "y" } 217 - - } 218 - - } 219 - - } 220 - - } 221 - - kind: (string){ |(*(string){ "default" }, (string){ string }) } 222 - - } 223 - + 0: ~(#VMRuleList.0) 224 - + 1: ~(#VMRuleList.1) 225 - } 226 - } 227 - _items: (#list){ 228 - - 0: (#list){ 229 - - 0: (#struct){ 230 - - spec: (#list){ 231 - - 0: (#struct){ 232 - - rules: (#list){ 233 - - 0: (#struct){ 234 - - expr: (string){ "x" } 235 - - } 236 - - } 237 - - } 238 - - } 239 - - kind: (string){ |(*(string){ "default" }, (string){ string }) } 240 - - } 241 - - 1: (#struct){ 242 - - spec: (#list){ 243 - - 0: (#struct){ 244 - - rules: (#list){ 245 - - 0: (#struct){ 246 - - expr: (string){ "y" } 247 - - } 248 - - } 249 - - } 250 - - } 251 - - kind: (string){ |(*(string){ "default" }, (string){ string }) } 252 - - } 253 - - } 254 - + 0: ~(#VMRuleList) 255 - } 256 - #VMRuleList: (#list){ 257 - 0: (#struct){ 258 - @@ -115,9 +46,9 @@ 259 - expr: (string){ string } 260 - } 261 - #VMRule: (#struct){ 262 - - kind: (string){ |(*(string){ "default" }, (string){ string }) } 263 - spec: (list){ 264 - } 265 - + kind: (string){ |(*(string){ "default" }, (string){ string }) } 266 - } 267 - #TypeMeta: (#struct){ 268 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 269 - -- out/eval -- 270 - (struct){ 271 - items: (#list){ 272 - 0: (#struct){ 273 - spec: (#list){ 274 - 0: (#struct){ 275 - rules: (#list){ 276 - 0: (#struct){ 277 - expr: (string){ "x" } 278 - } 279 - } 280 - } 281 - } 282 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 283 - } 284 - 1: (#struct){ 285 - spec: (#list){ 286 - 0: (#struct){ 287 - rules: (#list){ 288 - 0: (#struct){ 289 - expr: (string){ "y" } 290 - } 291 - } 292 - } 293 - } 294 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 295 - } 296 - } 297 - #List: (#struct){ 298 - items: (#list){ 299 - 0: (#struct){ 300 - spec: (#list){ 301 - 0: (#struct){ 302 - rules: (#list){ 303 - 0: (#struct){ 304 - expr: (string){ "x" } 305 - } 306 - } 307 - } 308 - } 309 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 310 - } 311 - 1: (#struct){ 312 - spec: (#list){ 313 - 0: (#struct){ 314 - rules: (#list){ 315 - 0: (#struct){ 316 - expr: (string){ "y" } 317 - } 318 - } 319 - } 320 - } 321 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 322 - } 323 - } 324 - } 325 - _items: (#list){ 326 - 0: (#list){ 327 - 0: (#struct){ 328 - spec: (#list){ 329 - 0: (#struct){ 330 - rules: (#list){ 331 - 0: (#struct){ 332 - expr: (string){ "x" } 333 - } 334 - } 335 - } 336 - } 337 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 338 - } 339 - 1: (#struct){ 340 - spec: (#list){ 341 - 0: (#struct){ 342 - rules: (#list){ 343 - 0: (#struct){ 344 - expr: (string){ "y" } 345 - } 346 - } 347 - } 348 - } 349 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 350 - } 351 - } 352 - } 353 - #VMRuleList: (#list){ 354 - 0: (#struct){ 355 - spec: (#list){ 356 - 0: (#struct){ 357 - rules: (#list){ 358 - 0: (#struct){ 359 - expr: (string){ "x" } 360 - } 361 - } 362 - } 363 - } 364 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 365 - } 366 - 1: (#struct){ 367 - spec: (#list){ 368 - 0: (#struct){ 369 - rules: (#list){ 370 - 0: (#struct){ 371 - expr: (string){ "y" } 372 - } 373 - } 374 - } 375 - } 376 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 377 - } 378 - } 379 - #RuleGroup: (#struct){ 380 - rules: (list){ 381 - } 382 - } 383 - #Rule: (#struct){ 384 - expr: (string){ string } 385 - } 386 - #VMRule: (#struct){ 387 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 388 - spec: (list){ 389 - } 390 - } 391 - #TypeMeta: (#struct){ 392 - kind: (string){ |(*(string){ "default" }, (string){ string }) } 393 - } 394 - } 141 + -- out/diff-v2-v3.txt -- 142 + Structure sharing: v3 uses ~(#VMRuleList.0) etc. for items list elements. 143 + Default disjunction: kind field uses *"default" | string — needs @test(final) for precise testing.
+400 -3621
cue/testdata/definitions/typocheck.txtar
··· 1 - #todo:inline: medium — comprehension; may need @test(final) for incomplete fields 2 1 -- in.cue -- 3 2 embed: simple: { 4 3 #A: b: 1 5 4 a: { #A } 6 - a: err: 1 5 + a: err: 1 @test(err, code=eval, contains="field not allowed", pos=[0:5]) 7 6 } 8 7 embed: andInStruct: { 9 8 #Foo: a: int 10 9 a: { #Foo & { err: 2 } } 10 + 11 + @test(err, at=a.err, code=eval, contains="field not allowed", pos=[2:16]) 11 12 } 12 13 embed: embedDefWithEmbedding: { 13 14 #Foo: {{a: int}} 14 15 a: { #Foo & { err: 2 } } // not allowed 16 + 17 + @test(err, at=a.err, code=eval, contains="field not allowed", pos=[2:16]) 15 18 } 16 19 embed: embedComprehension: { 17 20 #Foo: {if true {a: int}} 18 21 a: { #Foo & { err: 2 } } // not allowed 22 + 23 + @test(err, at=a.err, code=eval, contains="field not allowed", pos=[2:16]) 19 24 } 20 25 embed: fieldWithAnd: { 21 26 #A: {} 22 - { a: #A & {err: 3} } 27 + { a: #A & {err: 3 } } 28 + 29 + @test(err, at=a.err, code=eval, contains="field not allowed", pos=[2:13]) 23 30 } 24 31 embed: embedAndRecursive: { 25 32 #A: a: int 26 33 B: x: #A 27 34 B & { x: err: 2 } 35 + 36 + @test(err, at=x.err, code=eval, contains="field not allowed", pos=[3:11]) 28 37 } 29 38 embed: andEmbed: { 30 39 #A: b: int 31 40 #B: b: int 32 41 #D: {#A & #B} 33 42 d: #D & {err: 3} 43 + 44 + @test(err, at=d.err, code=eval, contains="field not allowed", pos=[4:11]) 34 45 } 35 46 and: transitive: ok: { 36 - Z: a: string 37 - #Y: Z 47 + Z: {a: string} @test(shareID=Z) 48 + #Y: Z @test(shareID=Z) 38 49 #X: #Y & Z 39 50 out: #X & { 40 51 a: "foo" 41 52 } 53 + 54 + @test(eq, { 55 + Z: {a: string} 56 + #Y: {a: string} 57 + #X: {a: string} 58 + out: {a: "foo"} 59 + }) 42 60 } 43 61 and: transitive: err: { 44 62 Z: a: string ··· 46 64 #X: #Y & Z 47 65 out: #X & { 48 66 err: "foo" 49 - } 67 + } @test(err, at=err, code=eval, contains="field not allowed", pos=[1:3]) 50 68 } 51 69 and: transitiveWithEmbed: ok: { 52 70 Z: a: string ··· 55 73 out: #X & { 56 74 a: "foo" 57 75 } 76 + 77 + @test(eq, { 78 + Z: {a: string} 79 + #X: {a: string} 80 + #Y: {a: string} 81 + out: {a: "foo"} 82 + }) 58 83 } 59 84 and: transitiveWithEmbed: err: { 60 85 Z: a: string ··· 63 88 out: #X & { 64 89 err: "foo" 65 90 } 91 + 92 + @test(err, at=out.err, code=eval, contains="field not allowed", pos=[5:3]) 66 93 } 67 94 embed: nonDef: t1: { 68 95 X: a: string ··· 71 98 X 72 99 b?: string 73 100 } 101 + 102 + @test(eq, { 103 + X: {a: string} 104 + #Y: {b?: string, a: string} 105 + #Z: {b?: string, a: string} 106 + }) 74 107 } 75 108 embed: defAndHidden: full: { 76 109 _stepCommon: Name: string ··· 82 115 out: #Step & { 83 116 Name: "foo" 84 117 } 118 + 119 + @test(eq, { 120 + _stepCommon: {Name: string} 121 + #Step: {Path?: string, Name: string} 122 + #Command: {Path?: string, Name: string} 123 + out: {Name: "foo", Path?: string} 124 + }) 85 125 } 86 126 embed: withIndirect: { 87 127 A: #B 88 128 #B: b: int 89 129 A & { err: 2 } // not allowed 130 + 131 + @test(err, at=err, code=eval, contains="field not allowed", pos=[3:8]) 90 132 } 91 133 -- validators.cue -- 92 134 import ( ··· 101 143 b?: int 102 144 } 103 145 x: #X 104 - x: err: 1 146 + x: err: 1 @test(err, code=eval, contains="field not allowed", pos=[-5:3, 0:5]) 105 147 } 106 148 embed: openValidator: t1: { 107 149 #X: { ··· 111 153 } 112 154 x: #X 113 155 x: err: 1 156 + 157 + @test(eq, { 158 + #X: {matchN(0, []), a?: int, b?: int} 159 + x: {err: 1, a?: int, b?: int} 160 + }) 114 161 } 115 162 embed: openValidator: t2: { 116 163 Y: matchN(1, [X]) 117 164 X: b?: Y 118 165 a: X 119 - a: b: 1 166 + a: b: 1 @test(err, suberr=(code=eval, contains="conflicting values"), 167 + suberr=(code=eval, contains="does not satisfy matchN", pos=[-3:5, -3:12, -2:9, 0:8]), 168 + ) 120 169 } 121 170 disjunction: withErr: t1: { 122 171 params: {} ··· 125 174 } 126 175 #Schema1: b1?: null | #Schema2 127 176 #Schema2: b2?: null | {b3?: string} 177 + 178 + @test(eq, { 179 + params: {} 180 + out: {b1: {b2: {b3: _}}} 181 + #Schema1: {b1?: null | {b2?: null | {b3?: string}}} 182 + #Schema2: {b2?: null | {b3?: string}} 183 + }) 128 184 } 129 185 embed: nestedValidator: { 130 186 #types: z?: list.UniqueItems ··· 134 190 y?: #types 135 191 } 136 192 #def: {} 193 + 194 + @test(eq, { 195 + #types: _ @test(ignore) 196 + x: {y: {z: [1]}} 197 + #def: {} 198 + }) 137 199 } 138 200 -- inline.cue -- 139 201 embedInline: { ··· 147 209 } 148 210 } 149 211 out: #Schema & __no_sharing 212 + 213 + @test(eq, { 214 + #Schema: {a: "hello", b: {c: "foo", d: "never printed"}} 215 + out: {a: "hello", b: {c: "foo", d: "never printed"}} 216 + }) 150 217 } 151 218 // evalv3 "field not allowed" regression involving embeddings and selectors; 152 219 // accessing a field via selector on an embedded definition should stay open. ··· 162 229 } 163 230 } 164 231 out: {x: (#Schema & {}).a}.x 232 + 233 + @test(eq, { 234 + #Schema: {a: "hello", b: {c: "foo", d: "never printed"}} 235 + out: "hello" 236 + }) 165 237 } 166 238 -- disjunction.cue -- 167 239 import "list" ··· 172 244 issue3947: full: { 173 245 #Schema: allowed?: string 174 246 _defaults: disallowed: _ | *"default value" 175 - out: #Schema & _defaults 247 + out: #Schema & _defaults @test(err, code=eval, at=disallowed, contains="field not allowed", pos=[-1:13]) 176 248 } 177 249 // evalv3 regression: #oneOf pattern disjunction; unifying a closed definition 178 250 // disjunction with a default string field caused incorrect field-not-allowed errors. ··· 181 253 c: a: "bar" 182 254 c: #B & {a: string | *"foo"} 183 255 #B: b?: string 256 + 257 + @test(err, at=c.a, code=eval, contains="field not allowed", pos=[1:5, 2:11]) 184 258 } 185 259 issue3957: full: { 186 260 #oneof: {a: string} | {b?: [...string]} 187 261 c: #oneof & {a: string | *"foo"} 188 262 c: a: "bar" 263 + 264 + @test(eq, { 265 + #oneof: {a: string} | {b?: []} 266 + c: {a: "bar"} 267 + }) 189 268 } 190 269 issue3957: derived: t1: { 191 270 #Schema: { ··· 193 272 out: list.FlattenN([in], 1) 194 273 } 195 274 x: #Schema & {in: "foo"} 275 + 276 + @test(eq, { 277 + #Schema: {in: string | [], out: [string | []]} 278 + x: {in: "foo", out: ["foo"]} 279 + }) 196 280 } 197 281 issue3957: derived: t2: { 198 282 #Schema: { ··· 201 285 out: _flat 202 286 } 203 287 out: #Schema & {in: "foo"} 288 + 289 + @test(eq, { 290 + #Schema: {in: string | [], out: [string | []]} 291 + out: {in: "foo", out: ["foo"]} 292 + }) 204 293 } 205 294 -- issue3833.cue -- 206 295 // evalv3 "field not allowed" regression with embeddings; combining a definition ··· 217 306 #C & {c: "foo"} 218 307 b: "foo" 219 308 } 309 + 310 + @test(eq, { 311 + out: {a: {b: "foo", c: "foo"}} 312 + #A: {a: {b: string}} 313 + #C: {c: string} 314 + #B: {c: "foo", b: "foo"} 315 + }) 220 316 } 221 317 issue3833: evalv2Issue:{ 222 318 out: { #A & { a: #B } } ··· 229 325 #C & {c: "foo"} 230 326 b: "foo" 231 327 } 328 + 329 + @test(err, at=out.a.c, code=eval, 330 + contains="field not allowed", pos=[6:6, 8:9], 331 + hint="key positions are missing", 332 + ) 232 333 } 233 334 -- issue3837.cue -- 234 335 // evalv3 regression with embeddings, disjunctions, and extra fields; a struct ··· 241 342 } 242 343 out: {{ x: A & __no_sharing }} 243 344 #Embed: {} 345 + 346 + @test(eq, { 347 + A: {extra: "foo"} 348 + out: {x: {extra: "foo"}} 349 + #Embed: {} 350 + }) 244 351 } 245 352 issue3837: full: { 246 353 #Embed: {} ··· 256 363 #def: (#A & __no_sharing) 257 364 } 258 365 } 366 + 367 + @test(eq, { 368 + #Embed: {} 369 + #A: {extra: "foo"} 370 + #B: {bar: string} | {} 371 + #C: {bar: string} 372 + out: {bar: "baz", #def: {extra: "foo"}} 373 + }) 259 374 } 260 375 -- issue3832.cue -- 261 376 // evalv3 "field not allowed" regression with a disjunction and a let field; ··· 287 402 #T & { 288 403 _assert: invoke: _person 289 404 } 405 + 406 + @test(eq, { 407 + _person: {self: {firstName: "Sam"}} 408 + #T: _ @test(ignore) 409 + _assert: { 410 + invoke: {self: {firstName: "Sam"}} 411 + pass: {outFirstName: "Sam"} 412 + } 413 + _subject: _ @test(ignore) 414 + results: {outFirstName: "Sam"} 415 + }) 290 416 } 291 417 -- issue3839.cue -- 292 418 // evalv3 closedness regression with embeddings and definitions; embedding a ··· 295 421 issue3839: reduced: { 296 422 x: { A & __no_sharing } 297 423 x: y: 1 298 - #B: {} 424 + #B: { 425 + // Note: true with both old semantics and explicitopen 426 + @test(closed) 427 + @test(allows=false, string) 428 + } 299 429 A: { 300 430 #B 301 431 ... 432 + 433 + // Note: true with both old semantics and explicitopen 434 + @test(closed) 435 + @test(allows, string) 302 436 } 437 + 438 + @test(eq, {x: {y: 1}, #B: {}, A: {}}) 303 439 } 304 440 issue3839: full: { 305 441 _globals: glb: globalField: "" ··· 327 463 #Embed 328 464 ... 329 465 } 466 + 467 + @test(eq, { 468 + _globals: {glb: {globalField: ""}} 469 + #GlobalContext: {globalField: string} 470 + #Context: {glb: {globalField: string}, out: {globalField: string}} 471 + out: {ingress: {#def: {globalField: ""}, foo: 1234, bar: "http"}} 472 + #Embed: {#def: {}} 473 + #Ingress: {#def: {}} 474 + }) 330 475 } 331 476 -- chaineddef.cue -- 332 477 // evalv3 "field not allowed" regression when embedding a chain of definitions; ··· 340 485 } 341 486 #A: a?: #B 342 487 #B: c?: string 488 + 489 + @test(eq, { 490 + out: {a: {b: "out", c?: string}} 491 + #A: {a?: {c?: string}} 492 + #B: {c?: string} 493 + }) 343 494 } 344 495 onlyCloseDirectStruct: { 345 496 #foo: {} 346 497 x: {y: {{a: #foo}}} 347 498 x: y: b: 1 499 + 500 + @test(eq, {#foo: {}, x: {y: {a: {}, b: 1}}}) 348 501 } 349 502 closeInEmbed: { 350 503 x: {close({{["d"]: f: int}})} 351 504 x: d: e: 1 505 + 506 + @test(eq, {x: {d: {e: 1, f: int}}}) 352 507 } 353 508 -- embedelim.cue -- 354 509 // evalv3 "field not allowed" regression with nested definitions; eliminating ··· 359 514 #A: b: string 360 515 #B: _ 361 516 a: {#A & {}} 517 + 518 + @test(eq, {#A: {b: string}, #B: _, a: {b: string}}) 362 519 } 363 520 issue3921: hidden: { 364 521 #A: #B 365 522 #A: _hidden: b: string 366 523 #B: {} 367 524 a: { #A & { _hidden: {} }} 525 + 526 + @test(eq, { 527 + #A: {_hidden: {b: string}} 528 + #B: {} 529 + a: {_hidden: {b: string}} 530 + }) 368 531 } 369 532 issue3921: full: { 370 533 out: #templateList & #defineMap ··· 384 547 #config: version: string 385 548 } 386 549 #StepInner: image: string 550 + 551 + @test(eq, { 552 + out: { 553 + #stepMap: {foo: { 554 + image: "bar" 555 + #config: {version: string} 556 + }} 557 + stepList: [{ 558 + image: "bar" 559 + #config: {version: string} 560 + }] 561 + } 562 + #templateList: {#stepMap: {}, stepList: []} 563 + #defineMap: { 564 + #stepMap: {foo: { 565 + image: "bar" 566 + #config: {version: string}} 567 + } 568 + stepList: _ 569 + } 570 + #Step: { 571 + image: string 572 + #config: {version: string} 573 + } 574 + #StepInner: {image: string} 575 + }) 387 576 } 388 577 -- issue3843.cue -- 389 578 // Pattern is unified twice. Ensure that deduping is handled correctly. ··· 395 584 } 396 585 B: A & __no_sharing 397 586 out: A.#Z & B.x 587 + 588 + @test(eq, { 589 + A: {#Z: {}, x: {y: {z: 1}}} 590 + B: {#Z: {}, x: {y: {z: 1}}} 591 + out: {y: {z: 1}} 592 + }) 398 593 } 399 594 dedupPattern: t1: p2: { 400 595 A: { ··· 404 599 } 405 600 B: A & __no_sharing 406 601 out: B.x & A.#Z 602 + 603 + @test(eq, { 604 + A: {#Z: {}, x: {y: {z: 1}}} 605 + B: {#Z: {}, x: {y: {z: 1}}} 606 + out: {y: {z: 1}} 607 + }) 407 608 } 408 609 -- issue3858.cue -- 409 610 orig: t1: { ··· 428 629 #Output & { 429 630 _in: (#JobConfig & {}).job 430 631 } 632 + 633 + @test(eq, { 634 + #Image: {embed: {image: "foo:v1"}} 635 + #JobConfig: { 636 + image: {embed: {image: "foo:v1"}} 637 + job: {image: "foo:v1", vcs: "git", args: [], env: {}} 638 + } 639 + #Job: {image: string, vcs: "git", args: [], env: {}} 640 + #Output: {_in: _, out: {}} 641 + _in: {image: "foo:v1", vcs: "git", args: [], env: {}} 642 + out: {image: "foo:v1", vcs: "git", args: [], env: {}} 643 + }) 431 644 } 432 645 reduced: t1: { 433 646 Y: { ··· 445 658 #Z & { 446 659 _in: Y 447 660 } 661 + 662 + @test(eq, { 663 + Y: {a: {e: "foo"}, b: {e: "foo", f: 1}} 664 + X: {e: string, f: 1} 665 + #Z: {_in: _, out: _} 666 + _in: {a: {e: "foo"}, b: {e: "foo", f: 1}} 667 + out: {a: {e: "foo"}, b: {e: "foo", f: 1}} 668 + }) 448 669 } 449 670 orig: t2: { 450 671 #JobConfig: { ··· 457 678 image: string 458 679 env: "FOO" 459 680 } 460 - 461 681 #Output: { 462 682 in: _ 463 683 out: (in & {}).input ··· 465 685 out: #Output & { 466 686 in: input: (#JobConfig & {}).job 467 687 } 688 + 689 + @test(eq, { 690 + #JobConfig: { 691 + image: {spec: {image: "someimage"}} 692 + job: {image: "someimage", env: "FOO"} 693 + } 694 + #Job: {image: string, env: "FOO"} 695 + #Output: { 696 + in: _ 697 + out: _ @test(ignore) 698 + } 699 + out: { 700 + in: {input: {image: "someimage", env: "FOO"}} 701 + out: {image: "someimage", env: "FOO"} 702 + } 703 + }) 468 704 } 469 705 reduced: t2: { 470 706 Y: { ··· 480 716 out: _in 481 717 } 482 718 #Z & { _in: Y } 719 + 720 + @test(eq, { 721 + Y: {a: {e: "foo"}, b: {e: "foo", f: 1}} 722 + X: {e: string, f: 1} 723 + #Z: {_in: _, out: _} 724 + _in: {a: {e: "foo"}, b: {e: "foo", f: 1}} 725 + out: {a: {e: "foo"}, b: {e: "foo", f: 1}} 726 + }) 483 727 } 484 728 -- issue3934.cue -- 485 729 // evalv3 "field not allowed" regression with disjunctions and a comprehension; ··· 498 742 bar?: int 499 743 extra?: null | {...} 500 744 } 745 + 746 + @test(eq, { 747 + out: {foo: *{bar: 3} | {extra?: null | {}, bar?: int} | null} 748 + #Foo: {foo?: *{bar: 3} | {bar?: int, extra?: null | {}} | null} 749 + #Bar: {bar?: int, extra?: null | {}} 750 + }) 501 751 } 502 752 -- large.cue -- 503 753 full: { ··· 546 796 } 547 797 } 548 798 out: (#Main & {namespace: "ns1"}).output 799 + 800 + @test(eq, { 801 + #Resource: _ @test(ignore) 802 + #Patches: _ @test(ignore) 803 + #JSONPatch: _ @test(ignore) 804 + #JSONOp: _ @test(ignore) 805 + #Main: _ @test(ignore) 806 + out: {ns1: [{op: "add", path: "/metadata", value: "foo"}]} 807 + }) 549 808 } 550 809 -- ellipsis.cue -- 551 810 nestedEllipsis: minimal: { ··· 555 814 ... 556 815 } 557 816 #meta: {} 817 + 818 + @test(eq, {out: {extra: "foo"}, #Schema: {}, #meta: {}}) 558 819 } 559 820 nestedEllipsis: nestedWithPatterns: { 560 821 out: #Schema & { ··· 568 829 #meta: name?: int 569 830 objs?: _ 570 831 } 832 + 833 + @test(eq, { 834 + out: { 835 + objs: {obj1: {extra: "foo", name?: int}} 836 + #meta: {name?: int} 837 + } 838 + #Schema: {#meta: {name?: int}, objs?: {}} 839 + }) 571 840 } 572 841 // evalv3 "field not allowed" regression with ellipses since v0.13.0; embedding 573 842 // a schema with `...` alongside additional fields should not close the struct. ··· 578 847 // Embedded schema allows `a: _`. Adding `a` below should not change that. 579 848 #X 580 849 a: b: string 581 - } 850 + } @test(allows, string) @test(closed) 582 851 out: { 583 852 a: { 584 853 c: "h" 585 854 b: "x" 586 855 } 587 856 } 857 + 858 + @test(eq, {#X: {}, out: {a: {b: "x", c: "h"}}}) 588 859 } 589 860 issue4015: nested: { 590 861 #X: { foo: {...} } 591 862 out: { 592 863 #X 593 - foo: a: b: string 864 + foo: {a: b: string} @test(allows, string) @test(closed) 594 865 } 595 866 out: { 596 867 foo: a: { ··· 598 869 b: "x" 599 870 } 600 871 } 872 + 873 + @test(eq, {#X: {foo: {}}, out: {foo: {a: {b: "x", c: "h"}}}}) 601 874 } 602 875 issue4015: full: { 603 876 #Schema: { ··· 626 899 foo: fooField: "h" 627 900 bar: barField: "x" 628 901 } 902 + 903 + // This one is rather confusing, but true. Note that this should no 904 + // longer hold if this is converted to the explicitopen semantics, in 905 + // which case #Schema applies "monotonically" limiting to its fields. 906 + @test(allows, string) 907 + @test(allows:todo=false, string, hint="for explicit open") 908 + @test(closed) 629 909 } 910 + 911 + @test(eq, { 912 + #Schema: { 913 + cfg: { 914 + foo: {enabled: *false | bool, fooField: string} 915 + bar: {barField: string} 916 + } 917 + capacity: *3 | int 918 + } 919 + #MoreCapacity: {capacity: 30} 920 + out: { 921 + cfg: {foo: {enabled: true, fooField: "h"}, bar: {barField: "x"}} 922 + capacity: 30 923 + } 924 + }) 630 925 } 631 926 -- issue3964.cue -- 632 927 // evalv3 closedness regression since v0.13.1; a definition that embeds another ··· 640 935 } 641 936 #Unused: {} 642 937 #Used: {} 938 + 939 + @test(eq, { 940 + #Output: {name: string} 941 + #Embedded: {name: string} 942 + #Unused: {} 943 + #Used: {} 944 + }) 643 945 } 644 946 issue3964: full: { 645 947 out: #Output & { ··· 653 955 } 654 956 #Unused: unused: string 655 957 #Used: used: string 958 + 959 + @test(eq, { 960 + out: {name: "oauth2", used: "bar"} 961 + #Output: {name: string, unused: string} | {name: string, used: string} 962 + #Embedded: {name: string, unused: string} | {name: string, used: string} 963 + #Unused: {unused: string} 964 + #Used: {used: string} 965 + }) 656 966 } 657 967 -- cycle.cue -- 658 968 // evalv3 stack overflow due to latest closedness changes; mutually recursive ··· 666 976 #B: { #A } 667 977 #C: #A & {} 668 978 out: #C & #B 979 + 980 + @test(eq, { 981 + #A: {fieldA: string} 982 + #B: {fieldA: string} 983 + #C: {fieldA: string} 984 + out: {fieldA: string} 985 + }) 669 986 } 670 987 -- out/eval/stats -- 671 988 Leaks: 77 ··· 685 1002 MaxConjunctInfos: 5 686 1003 MaxReqSets: 9 687 1004 MaxRedirect: 2 688 - -- out/evalalpha -- 689 - Errors: 690 - and.transitive.err.out.err: field not allowed: 691 - ./in.cue:46:3 692 - and.transitiveWithEmbed.err.out.err: field not allowed: 693 - ./in.cue:62:3 694 - embed.andEmbed.d.err: field not allowed: 695 - ./in.cue:31:11 696 - embed.andInStruct.a.err: field not allowed: 697 - ./in.cue:8:16 698 - embed.embedAndRecursive.x.err: field not allowed: 699 - ./in.cue:25:11 700 - embed.embedComprehension.a.err: field not allowed: 701 - ./in.cue:16:16 702 - embed.embedDefWithEmbedding.a.err: field not allowed: 703 - ./in.cue:12:16 704 - embed.fieldWithAnd.a.err: field not allowed: 705 - ./in.cue:20:13 706 - embed.openValidator.t2.a.b: conflicting values 1 and {b?:Y} (mismatched types int and struct): 707 - ./validators.cue:25:16 708 - ./validators.cue:26:5 709 - ./validators.cue:26:9 710 - ./validators.cue:27:5 711 - ./validators.cue:28:8 712 - embed.simple.a.err: field not allowed: 713 - ./in.cue:4:5 714 - embed.withIndirect.err: field not allowed: 715 - ./in.cue:87:8 716 - issue3833.evalv2Issue.out.a.c: field not allowed: 717 - ./issue3833.cue:22:6 718 - ./issue3833.cue:24:9 719 - issue3947.full.out.disallowed: field not allowed: 1005 + -- out/errors.txt -- 1006 + [eval] issue3947.full.out.disallowed: field not allowed: 720 1007 ./disjunction.cue:8:13 721 - issue3957.reduced.c.a: field not allowed: 1008 + [eval] issue3957.reduced.c.a: field not allowed: 722 1009 ./disjunction.cue:15:5 723 1010 ./disjunction.cue:16:11 724 - embed.normalValidator.x.err: field not allowed: 1011 + [eval] embed.simple.a.err: field not allowed: 1012 + ./in.cue:4:5 1013 + [eval] embed.andInStruct.a.err: field not allowed: 1014 + ./in.cue:8:16 1015 + [eval] embed.embedDefWithEmbedding.a.err: field not allowed: 1016 + ./in.cue:14:16 1017 + [eval] embed.embedComprehension.a.err: field not allowed: 1018 + ./in.cue:20:16 1019 + [eval] embed.fieldWithAnd.a.err: field not allowed: 1020 + ./in.cue:26:13 1021 + [eval] embed.embedAndRecursive.x.err: field not allowed: 1022 + ./in.cue:33:11 1023 + [eval] embed.andEmbed.d.err: field not allowed: 1024 + ./in.cue:41:11 1025 + [eval] embed.withIndirect.err: field not allowed: 1026 + ./in.cue:128:8 1027 + [eval] embed.normalValidator.x.err: field not allowed: 725 1028 ./validators.cue:8:3 726 1029 ./validators.cue:13:5 1030 + [eval] embed.openValidator.t2.a.b: conflicting values 1 and {b?:Y} (mismatched types int and struct): 1031 + ./validators.cue:30:16 1032 + ./validators.cue:31:5 1033 + ./validators.cue:31:9 1034 + ./validators.cue:32:5 1035 + ./validators.cue:33:8 727 1036 embed.openValidator.t2.a.b: invalid value 1 (does not satisfy matchN): 0 matched, expected 1: 728 - ./validators.cue:25:5 729 - ./validators.cue:25:12 730 - ./validators.cue:26:9 731 - ./validators.cue:28:8 732 - 733 - Result: 734 - (_|_){ 735 - // [eval] 736 - issue3920: (struct){ 737 - out: (#struct){ 738 - a: (#struct){ 739 - b: (string){ "out" } 740 - c?: (string){ string } 741 - } 742 - } 743 - #A: (#struct){ 744 - a?: ~(issue3920.#B) 745 - } 746 - #B: (#struct){ 747 - c?: (string){ string } 748 - } 749 - } 750 - onlyCloseDirectStruct: (struct){ 751 - #foo: (#struct){ 752 - } 753 - x: (struct){ 754 - y: (struct){ 755 - a: (#struct){ 756 - } 757 - b: (int){ 1 } 758 - } 759 - } 760 - } 761 - closeInEmbed: (struct){ 762 - x: (#struct){ 763 - d: (struct){ 764 - e: (int){ 1 } 765 - f: (int){ int } 766 - } 767 - } 768 - } 769 - issue4006: (struct){ 770 - #A: (#struct){ 771 - fieldA: (string){ string } 772 - } 773 - #B: (#struct){ 774 - fieldA: (string){ string } 775 - } 776 - #C: (#struct){ 777 - fieldA: (string){ string } 778 - } 779 - out: (#struct){ 780 - fieldA: (string){ string } 781 - } 782 - } 783 - issue3947: (_|_){ 784 - // [eval] 785 - full: (_|_){ 786 - // [eval] 787 - #Schema: (#struct){ 788 - allowed?: (string){ string } 789 - } 790 - _defaults: (struct){ 791 - disallowed: (_){ |(*(string){ "default value" }, (_){ _ }) } 792 - } 793 - out: (_|_){ 794 - // [eval] 795 - allowed?: (string){ string } 796 - disallowed: (_|_){ 797 - // [eval] issue3947.full.out.disallowed: field not allowed: 798 - // ./disjunction.cue:8:13 799 - } 800 - } 801 - } 802 - } 803 - issue3957: (_|_){ 804 - // [eval] 805 - reduced: (_|_){ 806 - // [eval] 807 - c: (_|_){ 808 - // [eval] 809 - a: (_|_){ 810 - // [eval] issue3957.reduced.c.a: field not allowed: 811 - // ./disjunction.cue:15:5 812 - // ./disjunction.cue:16:11 813 - } 814 - b?: (string){ string } 815 - } 816 - #B: (#struct){ 817 - b?: (string){ string } 818 - } 819 - } 820 - full: (struct){ 821 - #oneof: (#struct){ |((#struct){ 822 - a: (string){ string } 823 - }, (#struct){ 824 - b?: (list){ 825 - } 826 - }) } 827 - c: (#struct){ 828 - a: (string){ "bar" } 829 - } 830 - } 831 - derived: (struct){ 832 - t1: (struct){ 833 - #Schema: (#struct){ 834 - in: ((string|list)){ |((string){ string }, (list){ 835 - }) } 836 - out: (#list){ 837 - 0: ((string|list)){ |((string){ string }, (list){ 838 - }) } 839 - } 840 - } 841 - x: (#struct){ 842 - in: (string){ "foo" } 843 - out: (#list){ 844 - 0: (string){ "foo" } 845 - } 846 - } 847 - } 848 - t2: (struct){ 849 - #Schema: (#struct){ 850 - in: ((string|list)){ |((string){ string }, (list){ 851 - }) } 852 - let _flat#1 = (#list){ 853 - 0: ((string|list)){ |((string){ string }, (list){ 854 - }) } 855 - } 856 - out: (#list){ 857 - 0: ((string|list)){ |((string){ string }, (list){ 858 - }) } 859 - } 860 - } 861 - out: (#struct){ 862 - in: (string){ "foo" } 863 - let _flat#1 = (#list){ 864 - 0: (string){ "foo" } 865 - } 866 - out: (#list){ 867 - 0: (string){ "foo" } 868 - } 869 - } 870 - } 871 - } 872 - } 873 - nestedEllipsis: (struct){ 874 - minimal: (struct){ 875 - out: (#struct){ 876 - extra: (string){ "foo" } 877 - } 878 - #Schema: (#struct){ 879 - } 880 - #meta: (#struct){ 881 - } 882 - } 883 - nestedWithPatterns: (struct){ 884 - out: (#struct){ 885 - objs: (#struct){ 886 - obj1: (#struct){ 887 - extra: (string){ "foo" } 888 - name?: (int){ int } 889 - } 890 - } 891 - #meta: (#struct){ 892 - name?: (int){ int } 893 - } 894 - } 895 - #Schema: (#struct){ 896 - #meta: (#struct){ 897 - name?: (int){ int } 898 - } 899 - objs?: (#struct){ 900 - } 901 - } 902 - } 903 - } 904 - issue4015: (struct){ 905 - reduced: (struct){ 906 - #X: (#struct){ 907 - } 908 - out: (#struct){ 909 - a: (struct){ 910 - b: (string){ "x" } 911 - c: (string){ "h" } 912 - } 913 - } 914 - } 915 - nested: (struct){ 916 - #X: (#struct){ 917 - foo: (#struct){ 918 - } 919 - } 920 - out: (#struct){ 921 - foo: (#struct){ 922 - a: (struct){ 923 - b: (string){ "x" } 924 - c: (string){ "h" } 925 - } 926 - } 927 - } 928 - } 929 - full: (struct){ 930 - #Schema: (#struct){ 931 - cfg: (#struct){ 932 - foo: (#struct){ 933 - enabled: (bool){ |(*(bool){ false }, (bool){ bool }) } 934 - fooField: (string){ string } 935 - } 936 - bar: (#struct){ 937 - barField: (string){ string } 938 - } 939 - } 940 - capacity: (int){ |(*(int){ 3 }, (int){ int }) } 941 - } 942 - #MoreCapacity: (#struct){ 943 - capacity: (int){ 30 } 944 - } 945 - out: (#struct){ 946 - cfg: (#struct){ 947 - foo: (#struct){ 948 - enabled: (bool){ true } 949 - fooField: (string){ "h" } 950 - } 951 - bar: (#struct){ 952 - barField: (string){ "x" } 953 - } 954 - } 955 - capacity: (int){ 30 } 956 - } 957 - } 958 - } 959 - issue3921: (struct){ 960 - top: (struct){ 961 - #A: (#struct){ 962 - b: (string){ string } 963 - } 964 - #B: (_){ _ } 965 - a: (#struct){ 966 - b: (string){ string } 967 - } 968 - } 969 - hidden: (struct){ 970 - #A: (#struct){ 971 - _hidden: (#struct){ 972 - b: (string){ string } 973 - } 974 - } 975 - #B: (#struct){ 976 - } 977 - a: (#struct){ 978 - _hidden: (#struct){ 979 - b: (string){ string } 980 - } 981 - } 982 - } 983 - full: (struct){ 984 - out: (#struct){ 985 - #stepMap: (#struct){ 986 - foo: (#struct){ 987 - image: (string){ "bar" } 988 - #config: (#struct){ 989 - version: (string){ string } 990 - } 991 - } 992 - } 993 - stepList: (#list){ 994 - 0: (#struct){ 995 - image: (string){ "bar" } 996 - #config: (#struct){ 997 - version: (string){ string } 998 - } 999 - } 1000 - } 1001 - } 1002 - #templateList: (#struct){ 1003 - #stepMap: (#struct){ 1004 - } 1005 - stepList: (#list){ 1006 - } 1007 - } 1008 - #defineMap: (#struct){ 1009 - #stepMap: (#struct){ 1010 - foo: (#struct){ 1011 - image: (string){ "bar" } 1012 - #config: (#struct){ 1013 - version: (string){ string } 1014 - } 1015 - } 1016 - } 1017 - stepList: (_){ _ } 1018 - } 1019 - #Step: (#struct){ 1020 - image: (string){ string } 1021 - #config: (#struct){ 1022 - version: (string){ string } 1023 - } 1024 - } 1025 - #StepInner: (#struct){ 1026 - image: (string){ string } 1027 - } 1028 - } 1029 - } 1030 - embed: (_|_){ 1031 - // [eval] 1032 - simple: (_|_){ 1033 - // [eval] 1034 - #A: (#struct){ 1035 - b: (int){ 1 } 1036 - } 1037 - a: (_|_){ 1038 - // [eval] 1039 - err: (_|_){ 1040 - // [eval] embed.simple.a.err: field not allowed: 1041 - // ./in.cue:4:5 1042 - } 1043 - b: (int){ 1 } 1044 - } 1045 - } 1046 - andInStruct: (_|_){ 1047 - // [eval] 1048 - #Foo: (#struct){ 1049 - a: (int){ int } 1050 - } 1051 - a: (_|_){ 1052 - // [eval] 1053 - err: (_|_){ 1054 - // [eval] embed.andInStruct.a.err: field not allowed: 1055 - // ./in.cue:8:16 1056 - } 1057 - a: (int){ int } 1058 - } 1059 - } 1060 - embedDefWithEmbedding: (_|_){ 1061 - // [eval] 1062 - #Foo: (#struct){ 1063 - a: (int){ int } 1064 - } 1065 - a: (_|_){ 1066 - // [eval] 1067 - err: (_|_){ 1068 - // [eval] embed.embedDefWithEmbedding.a.err: field not allowed: 1069 - // ./in.cue:12:16 1070 - } 1071 - a: (int){ int } 1072 - } 1073 - } 1074 - embedComprehension: (_|_){ 1075 - // [eval] 1076 - #Foo: (#struct){ 1077 - a: (int){ int } 1078 - } 1079 - a: (_|_){ 1080 - // [eval] 1081 - err: (_|_){ 1082 - // [eval] embed.embedComprehension.a.err: field not allowed: 1083 - // ./in.cue:16:16 1084 - } 1085 - a: (int){ int } 1086 - } 1087 - } 1088 - fieldWithAnd: (_|_){ 1089 - // [eval] 1090 - #A: (#struct){ 1091 - } 1092 - a: (_|_){ 1093 - // [eval] 1094 - err: (_|_){ 1095 - // [eval] embed.fieldWithAnd.a.err: field not allowed: 1096 - // ./in.cue:20:13 1097 - } 1098 - } 1099 - } 1100 - embedAndRecursive: (_|_){ 1101 - // [eval] 1102 - #A: (#struct){ 1103 - a: (int){ int } 1104 - } 1105 - B: (struct){ 1106 - x: ~(embed.embedAndRecursive.#A) 1107 - } 1108 - x: (_|_){ 1109 - // [eval] 1110 - err: (_|_){ 1111 - // [eval] embed.embedAndRecursive.x.err: field not allowed: 1112 - // ./in.cue:25:11 1113 - } 1114 - a: (int){ int } 1115 - } 1116 - } 1117 - andEmbed: (_|_){ 1118 - // [eval] 1119 - #A: (#struct){ 1120 - b: (int){ int } 1121 - } 1122 - #B: (#struct){ 1123 - b: (int){ int } 1124 - } 1125 - #D: (#struct){ 1126 - b: (int){ int } 1127 - } 1128 - d: (_|_){ 1129 - // [eval] 1130 - err: (_|_){ 1131 - // [eval] embed.andEmbed.d.err: field not allowed: 1132 - // ./in.cue:31:11 1133 - } 1134 - b: (int){ int } 1135 - } 1136 - } 1137 - nonDef: (struct){ 1138 - t1: (struct){ 1139 - X: (struct){ 1140 - a: (string){ string } 1141 - } 1142 - #Y: (#struct){ 1143 - b?: (string){ string } 1144 - a: (string){ string } 1145 - } 1146 - #Z: (#struct){ 1147 - b?: (string){ string } 1148 - a: (string){ string } 1149 - } 1150 - } 1151 - } 1152 - defAndHidden: (struct){ 1153 - full: (struct){ 1154 - _stepCommon: (struct){ 1155 - Name: (string){ string } 1156 - } 1157 - #Step: (#struct){ 1158 - Path?: (string){ string } 1159 - Name: (string){ string } 1160 - } 1161 - #Command: (#struct){ 1162 - Path?: (string){ string } 1163 - Name: (string){ string } 1164 - } 1165 - out: (#struct){ 1166 - Name: (string){ "foo" } 1167 - Path?: (string){ string } 1168 - } 1169 - } 1170 - } 1171 - withIndirect: (_|_){ 1172 - // [eval] 1173 - A: ~(embed.withIndirect.#B) 1174 - #B: (#struct){ 1175 - b: (int){ int } 1176 - } 1177 - err: (_|_){ 1178 - // [eval] embed.withIndirect.err: field not allowed: 1179 - // ./in.cue:87:8 1180 - } 1181 - b: (int){ int } 1182 - } 1183 - normalValidator: (_|_){ 1184 - // [eval] 1185 - #X: (#struct){ 1186 - a?: (int){ int } 1187 - b?: (int){ int } 1188 - } 1189 - x: (_|_){ 1190 - // [eval] 1191 - err: (_|_){ 1192 - // [eval] embed.normalValidator.x.err: field not allowed: 1193 - // ./validators.cue:8:3 1194 - // ./validators.cue:13:5 1195 - } 1196 - a?: (int){ int } 1197 - b?: (int){ int } 1198 - } 1199 - } 1200 - openValidator: (_|_){ 1201 - // [eval] 1202 - t1: (struct){ 1203 - #X: (_){ 1204 - matchN(0, (#list){ 1205 - }) 1206 - a?: (int){ int } 1207 - b?: (int){ int } 1208 - } 1209 - x: (#struct){ 1210 - err: (int){ 1 } 1211 - a?: (int){ int } 1212 - b?: (int){ int } 1213 - } 1214 - } 1215 - t2: (_|_){ 1216 - // [eval] 1217 - Y: (_){ matchN(1, (#list){ 1218 - 0: (_|_){// 〈1;X〉 1219 - } 1220 - }) } 1221 - X: (struct){ 1222 - b?: (_){ matchN(1, (#list){ 1223 - 0: (_|_){// 〈1;X〉 1224 - } 1225 - }) } 1226 - } 1227 - a: (_|_){ 1228 - // [eval] 1229 - b: (_|_){ 1230 - // [eval] embed.openValidator.t2.a.b: conflicting values 1 and {b?:Y} (mismatched types int and struct): 1231 - // ./validators.cue:25:16 1232 - // ./validators.cue:26:5 1233 - // ./validators.cue:26:9 1234 - // ./validators.cue:27:5 1235 - // ./validators.cue:28:8 1236 - // embed.openValidator.t2.a.b: invalid value 1 (does not satisfy matchN): 0 matched, expected 1: 1237 - // ./validators.cue:25:5 1238 - // ./validators.cue:25:12 1239 - // ./validators.cue:26:9 1240 - // ./validators.cue:28:8 1241 - } 1242 - } 1243 - } 1244 - } 1245 - nestedValidator: (struct){ 1246 - #types: (#struct){ 1247 - z?: (list){ list.UniqueItems() } 1248 - } 1249 - x: (#struct){ 1250 - y: (#struct){ 1251 - z: (#list){ 1252 - 0: (int){ 1 } 1253 - } 1254 - } 1255 - } 1256 - #def: (#struct){ 1257 - } 1258 - } 1259 - } 1260 - and: (_|_){ 1261 - // [eval] 1262 - transitive: (_|_){ 1263 - // [eval] 1264 - ok: (struct){ 1265 - Z: (struct){ 1266 - a: (string){ string } 1267 - } 1268 - #Y: (#struct){ 1269 - a: (string){ string } 1270 - } 1271 - #X: (#struct){ 1272 - a: (string){ string } 1273 - } 1274 - out: (#struct){ 1275 - a: (string){ "foo" } 1276 - } 1277 - } 1278 - err: (_|_){ 1279 - // [eval] 1280 - Z: (struct){ 1281 - a: (string){ string } 1282 - } 1283 - #Y: (#struct){ 1284 - a: (string){ string } 1285 - } 1286 - #X: (#struct){ 1287 - a: (string){ string } 1288 - } 1289 - out: (_|_){ 1290 - // [eval] 1291 - err: (_|_){ 1292 - // [eval] and.transitive.err.out.err: field not allowed: 1293 - // ./in.cue:46:3 1294 - } 1295 - a: (string){ string } 1296 - } 1297 - } 1298 - } 1299 - transitiveWithEmbed: (_|_){ 1300 - // [eval] 1301 - ok: (struct){ 1302 - Z: (struct){ 1303 - a: (string){ string } 1304 - } 1305 - #X: (#struct){ 1306 - a: (string){ string } 1307 - } 1308 - #Y: (#struct){ 1309 - a: (string){ string } 1310 - } 1311 - out: (#struct){ 1312 - a: (string){ "foo" } 1313 - } 1314 - } 1315 - err: (_|_){ 1316 - // [eval] 1317 - Z: (struct){ 1318 - a: (string){ string } 1319 - } 1320 - #X: (#struct){ 1321 - a: (string){ string } 1322 - } 1323 - #Y: (#struct){ 1324 - a: (string){ string } 1325 - } 1326 - out: (_|_){ 1327 - // [eval] 1328 - err: (_|_){ 1329 - // [eval] and.transitiveWithEmbed.err.out.err: field not allowed: 1330 - // ./in.cue:62:3 1331 - } 1332 - a: (string){ string } 1333 - } 1334 - } 1335 - } 1336 - } 1337 - embedInline: (struct){ 1338 - #Schema: (#struct){ 1339 - a: (string){ "hello" } 1340 - b: (#struct){ 1341 - c: (string){ "foo" } 1342 - d: (string){ "never printed" } 1343 - } 1344 - } 1345 - out: (#struct){ 1346 - a: (string){ "hello" } 1347 - b: (#struct){ 1348 - c: (string){ "foo" } 1349 - d: (string){ "never printed" } 1350 - } 1351 - } 1352 - } 1353 - issue3853: (struct){ 1354 - #Schema: (#struct){ 1355 - a: (string){ "hello" } 1356 - b: (#struct){ 1357 - c: (string){ "foo" } 1358 - d: (string){ "never printed" } 1359 - } 1360 - } 1361 - out: (string){ "hello" } 1362 - } 1363 - issue3832: (#struct){ 1364 - _person: (struct){ 1365 - self: (struct){ 1366 - firstName: (string){ "Sam" } 1367 - } 1368 - } 1369 - #T: (#struct){ 1370 - _subject: (#struct){ 1371 - in: (_){ _ } 1372 - out: (#struct){ 1373 - let self#2 = (_|_){ 1374 - // [incomplete] issue3832.#T._subject.out.self: in.self undefined as in is incomplete (type _): 1375 - // ./issue3832.cue:11:16 1376 - } 1377 - outFirstName: (_|_){ 1378 - // [incomplete] issue3832.#T._subject.out.outFirstName: undefined field: firstName: 1379 - // ./issue3832.cue:12:24 1380 - } 1381 - } 1382 - } 1383 - _assert: (#struct){ |((#struct){ 1384 - pass: (string){ "never" } 1385 - check!: (_){ _ } 1386 - }, (#struct){ 1387 - pass: (#struct){ 1388 - let self#2 = (_|_){ 1389 - // [incomplete] issue3832.#T._assert.pass.self: undefined field: self: 1390 - // ./issue3832.cue:11:19 1391 - } 1392 - outFirstName: (_|_){ 1393 - // [incomplete] issue3832.#T._assert.pass.outFirstName: undefined field: firstName: 1394 - // ./issue3832.cue:12:24 1395 - } 1396 - } 1397 - invoke!: (_){ _ } 1398 - }) } 1399 - results: (_|_){ 1400 - // [incomplete] issue3832.#T.results: unresolved disjunction {pass:"never",check!:_} | {pass:{let self#2=_|_(issue3832.#T._assert.pass.self: undefined field: self),outFirstName:_|_(issue3832.#T._assert.pass.outFirstName: undefined field: firstName)},invoke!:_} (type struct): 1401 - // ./issue3832.cue:25:12 1402 - } 1403 - } 1404 - _assert: (#struct){ 1405 - invoke: (#struct){ 1406 - self: (#struct){ 1407 - firstName: (string){ "Sam" } 1408 - } 1409 - } 1410 - pass: (#struct){ 1411 - let self#2 = ~(issue3832._assert.invoke.self) 1412 - outFirstName: (string){ "Sam" } 1413 - } 1414 - } 1415 - _subject: (#struct){ 1416 - in: (_){ _ } 1417 - out: (#struct){ 1418 - let self#2 = (_|_){ 1419 - // [incomplete] issue3832._subject.out.self: in.self undefined as in is incomplete (type _): 1420 - // ./issue3832.cue:11:16 1421 - } 1422 - outFirstName: (_|_){ 1423 - // [incomplete] issue3832._subject.out.outFirstName: undefined field: firstName: 1424 - // ./issue3832.cue:12:24 1425 - } 1426 - } 1427 - } 1428 - results: ~(issue3832._assert.pass) 1429 - } 1430 - issue3833: (_|_){ 1431 - // [eval] 1432 - ok: (struct){ 1433 - out: (#struct){ 1434 - a: (#struct){ 1435 - b: (string){ "foo" } 1436 - c: (string){ "foo" } 1437 - } 1438 - } 1439 - #A: (#struct){ 1440 - a: (#struct){ 1441 - b: (string){ string } 1442 - } 1443 - } 1444 - #C: (#struct){ 1445 - c: (string){ string } 1446 - } 1447 - #B: (#struct){ 1448 - c: (string){ "foo" } 1449 - b: (string){ "foo" } 1450 - } 1451 - } 1452 - evalv2Issue: (_|_){ 1453 - // [eval] 1454 - out: (_|_){ 1455 - // [eval] 1456 - a: (_|_){ 1457 - // [eval] 1458 - b: (string){ "foo" } 1459 - c: (_|_){ 1460 - // [eval] issue3833.evalv2Issue.out.a.c: field not allowed: 1461 - // ./issue3833.cue:22:6 1462 - // ./issue3833.cue:24:9 1463 - } 1464 - } 1465 - } 1466 - #A: (#struct){ 1467 - a: (#struct){ 1468 - b: (string){ string } 1469 - } 1470 - } 1471 - #C: (#struct){ 1472 - c: (string){ string } 1473 - } 1474 - #B: (#struct){ 1475 - c: (string){ "foo" } 1476 - b: (string){ "foo" } 1477 - } 1478 - } 1479 - } 1480 - issue3837: (struct){ 1481 - reduced: (struct){ 1482 - A: (#struct){ 1483 - extra: (string){ "foo" } 1484 - } 1485 - out: (struct){ 1486 - x: (#struct){ 1487 - extra: (string){ "foo" } 1488 - } 1489 - } 1490 - #Embed: (#struct){ 1491 - } 1492 - } 1493 - full: (struct){ 1494 - #Embed: (#struct){ 1495 - } 1496 - #A: (#struct){ 1497 - extra: (string){ "foo" } 1498 - } 1499 - #B: (#struct){ |((#struct){ 1500 - bar: (string){ string } 1501 - }, (#struct){ 1502 - }) } 1503 - #C: (#struct){ 1504 - bar: (string){ string } 1505 - } 1506 - out: (#struct){ 1507 - bar: (string){ "baz" } 1508 - #def: (#struct){ 1509 - extra: (string){ "foo" } 1510 - } 1511 - } 1512 - } 1513 - } 1514 - issue3839: (struct){ 1515 - reduced: (struct){ 1516 - x: (#struct){ 1517 - y: (int){ 1 } 1518 - } 1519 - #B: (#struct){ 1520 - } 1521 - A: (#struct){ 1522 - } 1523 - } 1524 - full: (struct){ 1525 - _globals: (struct){ 1526 - glb: (struct){ 1527 - globalField: (string){ "" } 1528 - } 1529 - } 1530 - #GlobalContext: (#struct){ 1531 - globalField: (string){ string } 1532 - } 1533 - #Context: (#struct){ 1534 - glb: ~(issue3839.full.#GlobalContext) 1535 - out: ~(issue3839.full.#GlobalContext) 1536 - } 1537 - out: (struct){ 1538 - ingress: (#struct){ 1539 - #def: (#struct){ 1540 - globalField: (string){ "" } 1541 - } 1542 - foo: (int){ 1234 } 1543 - bar: (string){ "http" } 1544 - } 1545 - } 1546 - #Embed: (#struct){ 1547 - #def: (#struct){ 1548 - } 1549 - } 1550 - #Ingress: (#struct){ 1551 - #def: (#struct){ 1552 - } 1553 - } 1554 - } 1555 - } 1556 - dedupPattern: (struct){ 1557 - t1: (struct){ 1558 - p1: (struct){ 1559 - A: (struct){ 1560 - #Z: (#struct){ 1561 - } 1562 - x: (#struct){ 1563 - y: (#struct){ 1564 - z: (int){ 1 } 1565 - } 1566 - } 1567 - } 1568 - B: (struct){ 1569 - #Z: (#struct){ 1570 - } 1571 - x: (#struct){ 1572 - y: (#struct){ 1573 - z: (int){ 1 } 1574 - } 1575 - } 1576 - } 1577 - out: (#struct){ 1578 - y: (#struct){ 1579 - z: (int){ 1 } 1580 - } 1581 - } 1582 - } 1583 - p2: (struct){ 1584 - A: (struct){ 1585 - #Z: (#struct){ 1586 - } 1587 - x: (#struct){ 1588 - y: (#struct){ 1589 - z: (int){ 1 } 1590 - } 1591 - } 1592 - } 1593 - B: (struct){ 1594 - #Z: (#struct){ 1595 - } 1596 - x: (#struct){ 1597 - y: (#struct){ 1598 - z: (int){ 1 } 1599 - } 1600 - } 1601 - } 1602 - out: (#struct){ 1603 - y: (#struct){ 1604 - z: (int){ 1 } 1605 - } 1606 - } 1607 - } 1608 - } 1609 - } 1610 - orig: (struct){ 1611 - t1: (#struct){ 1612 - #Image: (#struct){ 1613 - embed: (#struct){ 1614 - image: (string){ "foo:v1" } 1615 - } 1616 - } 1617 - #JobConfig: (#struct){ 1618 - image: ~(orig.t1.#Image) 1619 - job: (#struct){ 1620 - image: (string){ "foo:v1" } 1621 - vcs: (string){ "git" } 1622 - args: (list){ 1623 - } 1624 - env: (#struct){ 1625 - } 1626 - } 1627 - } 1628 - #Job: (#struct){ 1629 - image: (string){ string } 1630 - vcs: (string){ "git" } 1631 - args: (list){ 1632 - } 1633 - env: (#struct){ 1634 - } 1635 - } 1636 - #Output: (#struct){ 1637 - _in: (_){ _ } 1638 - out: (#struct){ 1639 - } 1640 - } 1641 - _in: (#struct){ 1642 - image: (string){ "foo:v1" } 1643 - vcs: (string){ "git" } 1644 - args: (list){ 1645 - } 1646 - env: (#struct){ 1647 - } 1648 - } 1649 - out: (#struct){ 1650 - image: (string){ "foo:v1" } 1651 - vcs: (string){ "git" } 1652 - args: (list){ 1653 - } 1654 - env: (#struct){ 1655 - } 1656 - } 1657 - } 1658 - t2: (struct){ 1659 - #JobConfig: (#struct){ 1660 - image: (#struct){ 1661 - spec: (#struct){ 1662 - image: (string){ "someimage" } 1663 - } 1664 - } 1665 - job: (#struct){ 1666 - image: (string){ "someimage" } 1667 - env: (string){ "FOO" } 1668 - } 1669 - } 1670 - #Job: (#struct){ 1671 - image: (string){ string } 1672 - env: (string){ "FOO" } 1673 - } 1674 - #Output: (#struct){ 1675 - in: (_){ _ } 1676 - out: (_|_){ 1677 - // [incomplete] orig.t2.#Output.out: undefined field: input: 1678 - // ./issue3858.cue:55:18 1679 - } 1680 - } 1681 - out: (#struct){ 1682 - in: (#struct){ 1683 - input: (#struct){ 1684 - image: (string){ "someimage" } 1685 - env: (string){ "FOO" } 1686 - } 1687 - } 1688 - out: (#struct){ 1689 - image: (string){ "someimage" } 1690 - env: (string){ "FOO" } 1691 - } 1692 - } 1693 - } 1694 - } 1695 - reduced: (struct){ 1696 - t1: (#struct){ 1697 - Y: (struct){ 1698 - a: (struct){ 1699 - e: (string){ "foo" } 1700 - } 1701 - b: (struct){ 1702 - e: (string){ "foo" } 1703 - f: (int){ 1 } 1704 - } 1705 - } 1706 - X: (struct){ 1707 - e: (string){ string } 1708 - f: (int){ 1 } 1709 - } 1710 - #Z: (#struct){ 1711 - _in: (_){ _ } 1712 - out: (_){ _ } 1713 - } 1714 - _in: (#struct){ 1715 - a: (#struct){ 1716 - e: (string){ "foo" } 1717 - } 1718 - b: (#struct){ 1719 - e: (string){ "foo" } 1720 - f: (int){ 1 } 1721 - } 1722 - } 1723 - out: (#struct){ 1724 - a: (#struct){ 1725 - e: (string){ "foo" } 1726 - } 1727 - b: (#struct){ 1728 - e: (string){ "foo" } 1729 - f: (int){ 1 } 1730 - } 1731 - } 1732 - } 1733 - t2: (#struct){ 1734 - Y: (struct){ 1735 - a: (struct){ 1736 - e: (string){ "foo" } 1737 - } 1738 - b: (struct){ 1739 - e: (string){ "foo" } 1740 - f: (int){ 1 } 1741 - } 1742 - } 1743 - X: (struct){ 1744 - e: (string){ string } 1745 - f: (int){ 1 } 1746 - } 1747 - #Z: (#struct){ 1748 - _in: (_){ _ } 1749 - out: (_){ _ } 1750 - } 1751 - _in: (#struct){ 1752 - a: (#struct){ 1753 - e: (string){ "foo" } 1754 - } 1755 - b: (#struct){ 1756 - e: (string){ "foo" } 1757 - f: (int){ 1 } 1758 - } 1759 - } 1760 - out: ~(reduced.t2._in) 1761 - } 1762 - } 1763 - issue3934: (struct){ 1764 - out: (#struct){ 1765 - foo: ((null|struct)){ |(*(#struct){ 1766 - bar: (int){ 3 } 1767 - }, (#struct){ 1768 - extra?: ((null|struct)){ |((null){ null }, (#struct){ 1769 - }) } 1770 - bar?: (int){ int } 1771 - }, (null){ null }) } 1772 - } 1773 - #Foo: (#struct){ 1774 - foo?: ((null|struct)){ |(*(#struct){ 1775 - bar: (int){ 3 } 1776 - }, (#struct){ 1777 - bar?: (int){ int } 1778 - extra?: ((null|struct)){ |((null){ null }, (#struct){ 1779 - }) } 1780 - }, (null){ null }) } 1781 - } 1782 - #Bar: (#struct){ 1783 - bar?: (int){ int } 1784 - extra?: ((null|struct)){ |((null){ null }, (#struct){ 1785 - }) } 1786 - } 1787 - } 1788 - issue3964: (struct){ 1789 - reduced: (struct){ 1790 - #Output: (#struct){ 1791 - name: (string){ string } 1792 - } 1793 - #Embedded: (#struct){ 1794 - name: (string){ string } 1795 - } 1796 - #Unused: (#struct){ 1797 - } 1798 - #Used: (#struct){ 1799 - } 1800 - } 1801 - full: (struct){ 1802 - out: (#struct){ 1803 - name: (string){ "oauth2" } 1804 - used: (string){ "bar" } 1805 - } 1806 - #Output: (#struct){ |((#struct){ 1807 - name: (string){ string } 1808 - unused: (string){ string } 1809 - }, (#struct){ 1810 - name: (string){ string } 1811 - used: (string){ string } 1812 - }) } 1813 - #Embedded: (#struct){ |((#struct){ 1814 - name: (string){ string } 1815 - unused: (string){ string } 1816 - }, (#struct){ 1817 - name: (string){ string } 1818 - used: (string){ string } 1819 - }) } 1820 - #Unused: (#struct){ 1821 - unused: (string){ string } 1822 - } 1823 - #Used: (#struct){ 1824 - used: (string){ string } 1825 - } 1826 - } 1827 - } 1828 - full: (struct){ 1829 - #Resource: (#struct){ 1830 - someMsg: (string){ string } 1831 - obs: (#struct){ |(*(#struct){ 1832 - missing: (bool){ true } 1833 - }, (#struct){ 1834 - }) } 1835 - let pickMsg#3 = (#struct){ 1836 - msg: (_|_){ 1837 - // [incomplete] full.#Resource.pickMsg.msg: invalid interpolation: non-concrete value string (type string): 1838 - // ./large.cue:7:25 1839 - // ./large.cue:3:12 1840 - } 1841 - } 1842 - patches: (#list){ 1843 - 0: (#struct){ 1844 - op: (string){ "add" } 1845 - path: (string){ "/metadata" } 1846 - value: (_|_){ 1847 - // [incomplete] full.#Resource.pickMsg.msg: invalid interpolation: non-concrete value string (type string): 1848 - // ./large.cue:7:25 1849 - // ./large.cue:3:12 1850 - } 1851 - } 1852 - } 1853 - } 1854 - #Patches: (#struct){ 1855 - } 1856 - #JSONPatch: (#struct){ 1857 - namespace?: (string){ string } 1858 - patch: (list){ 1859 - } 1860 - output: (_|_){ 1861 - // [incomplete] full.#JSONPatch.output: cannot reference optional field: namespace: 1862 - // ./large.cue:21:24 1863 - } 1864 - } 1865 - #JSONOp: (#struct){ |((#struct){ 1866 - op: (string){ "add" } 1867 - path: (string){ string } 1868 - value: (_){ _ } 1869 - }, (#struct){ 1870 - op: (string){ "remove" } 1871 - path: (string){ string } 1872 - }) } 1873 - #Main: (#struct){ 1874 - namespace: (string){ string } 1875 - output: (_|_){ 1876 - // [incomplete] full.#Main.jsonPatch.output: key value of dynamic field must be concrete, found string: 1877 - // ./large.cue:21:24 1878 - // ./large.cue:19:15 1879 - } 1880 - let jsonPatch#4 = (#struct){ 1881 - let base#7 = (#struct){ 1882 - someMsg: (string){ string } 1883 - obs: (#struct){ |(*(#struct){ 1884 - missing: (bool){ true } 1885 - }, (#struct){ 1886 - }) } 1887 - let pickMsg#3 = (#struct){ 1888 - msg: (_|_){ 1889 - // [incomplete] full.#Main.jsonPatch.base.pickMsg.msg: invalid interpolation: non-concrete value string (type string): 1890 - // ./large.cue:7:25 1891 - // ./large.cue:3:12 1892 - } 1893 - } 1894 - patches: (#list){ 1895 - 0: (#struct){ 1896 - op: (string){ "add" } 1897 - path: (string){ "/metadata" } 1898 - value: (_|_){ 1899 - // [incomplete] full.#Main.jsonPatch.base.pickMsg.msg: invalid interpolation: non-concrete value string (type string): 1900 - // ./large.cue:7:25 1901 - // ./large.cue:3:12 1902 - } 1903 - } 1904 - } 1905 - } 1906 - let withMsg#8 = (#struct){ 1907 - someMsg: (string){ "foo" } 1908 - obs: (#struct){ |(*(#struct){ 1909 - missing: (bool){ true } 1910 - }, (#struct){ 1911 - }) } 1912 - let pickMsg#3 = (#struct){ 1913 - msg: (string){ "foo" } 1914 - } 1915 - patches: (#list){ 1916 - 0: (#struct){ 1917 - op: (string){ "add" } 1918 - path: (string){ "/metadata" } 1919 - value: (string){ "foo" } 1920 - } 1921 - } 1922 - } 1923 - namespace: (string){ string } 1924 - patch: (#list){ 1925 - 0: (#struct){ 1926 - op: (string){ "add" } 1927 - path: (string){ "/metadata" } 1928 - value: (string){ "foo" } 1929 - } 1930 - } 1931 - output: (_|_){ 1932 - // [incomplete] full.#Main.jsonPatch.output: key value of dynamic field must be concrete, found string: 1933 - // ./large.cue:21:24 1934 - // ./large.cue:19:15 1935 - } 1936 - } 1937 - } 1938 - out: (#struct){ 1939 - ns1: (#list){ 1940 - 0: (#struct){ 1941 - op: (string){ "add" } 1942 - path: (string){ "/metadata" } 1943 - value: (string){ "foo" } 1944 - } 1945 - } 1946 - } 1947 - } 1948 - disjunction: (struct){ 1949 - withErr: (struct){ 1950 - t1: (struct){ 1951 - params: (struct){ 1952 - } 1953 - out: (#struct){ 1954 - b1: (_|_){ 1955 - // [incomplete] disjunction.withErr.t1.out.b1: 4 errors in empty disjunction: 1956 - // disjunction.withErr.t1.out.b1: conflicting values {b2:{b3:params.mayExistLater}} and null (mismatched types struct and null): 1957 - // ./validators.cue:32:7 1958 - // ./validators.cue:33:7 1959 - // ./validators.cue:35:17 1960 - // disjunction.withErr.t1.out.b1.b2: 2 errors in empty disjunction: 1961 - // disjunction.withErr.t1.out.b1.b2: conflicting values {b3:params.mayExistLater} and null (mismatched types struct and null): 1962 - // ./validators.cue:32:7 1963 - // ./validators.cue:33:11 1964 - // ./validators.cue:35:24 1965 - // ./validators.cue:36:17 1966 - // disjunction.withErr.t1.out.b1.b2.b3: undefined field: mayExistLater: 1967 - // ./validators.cue:33:22 1968 - b2: (struct){ 1969 - b3: (_){ _ } 1970 - } 1971 - } 1972 - } 1973 - #Schema1: (#struct){ 1974 - b1?: ((null|struct)){ |((null){ null }, (#struct){ 1975 - b2?: ((null|struct)){ |((null){ null }, (#struct){ 1976 - b3?: (string){ string } 1977 - }) } 1978 - }) } 1979 - } 1980 - #Schema2: (#struct){ 1981 - b2?: ((null|struct)){ |((null){ null }, (#struct){ 1982 - b3?: (string){ string } 1983 - }) } 1984 - } 1985 - } 1986 - } 1987 - } 1988 - } 1989 - -- diff/-out/evalalpha<==>+out/eval -- 1990 - diff old new 1991 - --- old 1992 - +++ new 1993 - @@ -1,59 +1,20 @@ 1994 - Errors: 1995 - and.transitive.err.out.err: field not allowed: 1996 - - ./in.cue:42:5 1997 - - ./in.cue:43:6 1998 - - ./in.cue:44:6 1999 - - ./in.cue:44:11 2000 - - ./in.cue:45:7 2001 - ./in.cue:46:3 2002 - and.transitiveWithEmbed.err.out.err: field not allowed: 2003 - - ./in.cue:58:5 2004 - - ./in.cue:59:6 2005 - - ./in.cue:59:11 2006 - - ./in.cue:60:6 2007 - - ./in.cue:60:7 2008 - - ./in.cue:61:7 2009 - ./in.cue:62:3 2010 - embed.andEmbed.d.err: field not allowed: 2011 - - ./in.cue:28:6 2012 - - ./in.cue:29:6 2013 - - ./in.cue:30:6 2014 - - ./in.cue:30:7 2015 - - ./in.cue:30:12 2016 - - ./in.cue:31:5 2017 - ./in.cue:31:11 2018 - embed.andInStruct.a.err: field not allowed: 2019 - - ./in.cue:7:8 2020 - - ./in.cue:8:5 2021 - - ./in.cue:8:7 2022 - ./in.cue:8:16 2023 - embed.embedAndRecursive.x.err: field not allowed: 2024 - - ./in.cue:23:6 2025 - - ./in.cue:24:8 2026 - - ./in.cue:25:2 2027 - ./in.cue:25:11 2028 - embed.embedComprehension.a.err: field not allowed: 2029 - - ./in.cue:15:8 2030 - - ./in.cue:15:9 2031 - - ./in.cue:15:17 2032 - - ./in.cue:16:5 2033 - - ./in.cue:16:7 2034 - ./in.cue:16:16 2035 - embed.embedDefWithEmbedding.a.err: field not allowed: 2036 - - ./in.cue:11:8 2037 - - ./in.cue:11:9 2038 - - ./in.cue:12:5 2039 - - ./in.cue:12:7 2040 - ./in.cue:12:16 2041 - embed.fieldWithAnd.a.err: field not allowed: 2042 - - ./in.cue:19:6 2043 - - ./in.cue:20:2 2044 - - ./in.cue:20:7 2045 - ./in.cue:20:13 2046 - -embed.normalValidator.x.err: field not allowed: 2047 - - ./validators.cue:7:6 2048 - - ./validators.cue:12:5 2049 - - ./validators.cue:13:5 2050 - embed.openValidator.t2.a.b: conflicting values 1 and {b?:Y} (mismatched types int and struct): 2051 - ./validators.cue:25:16 2052 - ./validators.cue:26:5 2053 - @@ -61,35 +22,20 @@ 2054 - ./validators.cue:27:5 2055 - ./validators.cue:28:8 2056 - embed.simple.a.err: field not allowed: 2057 - - ./in.cue:2:6 2058 - - ./in.cue:3:5 2059 - - ./in.cue:3:7 2060 - ./in.cue:4:5 2061 - embed.withIndirect.err: field not allowed: 2062 - - ./in.cue:84:22 2063 - - ./in.cue:85:5 2064 - - ./in.cue:86:6 2065 - - ./in.cue:87:2 2066 - ./in.cue:87:8 2067 - +issue3833.evalv2Issue.out.a.c: field not allowed: 2068 - + ./issue3833.cue:22:6 2069 - + ./issue3833.cue:24:9 2070 - issue3947.full.out.disallowed: field not allowed: 2071 - - ./disjunction.cue:4:11 2072 - - ./disjunction.cue:5:13 2073 - - ./disjunction.cue:6:7 2074 - - ./disjunction.cue:6:17 2075 - -issue3957.reduced.c.a: 2 errors in empty disjunction: 2076 - -issue3957.reduced.c.a: conflicting values "foo" and "bar": 2077 - - ./disjunction.cue:9:8 2078 - - ./disjunction.cue:10:24 2079 - + ./disjunction.cue:8:13 2080 - issue3957.reduced.c.a: field not allowed: 2081 - - ./disjunction.cue:9:5 2082 - - ./disjunction.cue:10:5 2083 - - ./disjunction.cue:10:11 2084 - - ./disjunction.cue:11:6 2085 - -embed.openValidator.t1.x.err: field not allowed: 2086 - - ./validators.cue:17:3 2087 - - ./validators.cue:16:6 2088 - - ./validators.cue:21:5 2089 - - ./validators.cue:22:5 2090 - + ./disjunction.cue:15:5 2091 - + ./disjunction.cue:16:11 2092 - +embed.normalValidator.x.err: field not allowed: 2093 - + ./validators.cue:8:3 2094 - + ./validators.cue:13:5 2095 - embed.openValidator.t2.a.b: invalid value 1 (does not satisfy matchN): 0 matched, expected 1: 2096 - ./validators.cue:25:5 2097 - ./validators.cue:25:12 2098 - @@ -102,14 +48,12 @@ 2099 - issue3920: (struct){ 2100 - out: (#struct){ 2101 - a: (#struct){ 2102 - - c?: (string){ string } 2103 - b: (string){ "out" } 2104 - - } 2105 - - } 2106 - - #A: (#struct){ 2107 - - a?: (#struct){ 2108 - - c?: (string){ string } 2109 - - } 2110 - + c?: (string){ string } 2111 - + } 2112 - + } 2113 - + #A: (#struct){ 2114 - + a?: ~(issue3920.#B) 2115 - } 2116 - #B: (#struct){ 2117 - c?: (string){ string } 2118 - @@ -163,10 +107,7 @@ 2119 - allowed?: (string){ string } 2120 - disallowed: (_|_){ 2121 - // [eval] issue3947.full.out.disallowed: field not allowed: 2122 - - // ./disjunction.cue:4:11 2123 - - // ./disjunction.cue:5:13 2124 - - // ./disjunction.cue:6:7 2125 - - // ./disjunction.cue:6:17 2126 - + // ./disjunction.cue:8:13 2127 - } 2128 - } 2129 - } 2130 - @@ -178,15 +119,9 @@ 2131 - c: (_|_){ 2132 - // [eval] 2133 - a: (_|_){ 2134 - - // [eval] issue3957.reduced.c.a: 2 errors in empty disjunction: 2135 - - // issue3957.reduced.c.a: conflicting values "foo" and "bar": 2136 - - // ./disjunction.cue:9:8 2137 - - // ./disjunction.cue:10:24 2138 - - // issue3957.reduced.c.a: field not allowed: 2139 - - // ./disjunction.cue:9:5 2140 - - // ./disjunction.cue:10:5 2141 - - // ./disjunction.cue:10:11 2142 - - // ./disjunction.cue:11:6 2143 - + // [eval] issue3957.reduced.c.a: field not allowed: 2144 - + // ./disjunction.cue:15:5 2145 - + // ./disjunction.cue:16:11 2146 - } 2147 - b?: (string){ string } 2148 - } 2149 - @@ -259,9 +194,6 @@ 2150 - } 2151 - nestedWithPatterns: (struct){ 2152 - out: (#struct){ 2153 - - #meta: (#struct){ 2154 - - name?: (int){ int } 2155 - - } 2156 - objs: (#struct){ 2157 - obj1: (#struct){ 2158 - extra: (string){ "foo" } 2159 - @@ -268,6 +200,9 @@ 2160 - name?: (int){ int } 2161 - } 2162 - } 2163 - + #meta: (#struct){ 2164 - + name?: (int){ int } 2165 - + } 2166 - } 2167 - #Schema: (#struct){ 2168 - #meta: (#struct){ 2169 - @@ -413,14 +348,11 @@ 2170 - } 2171 - a: (_|_){ 2172 - // [eval] 2173 - - b: (int){ 1 } 2174 - err: (_|_){ 2175 - // [eval] embed.simple.a.err: field not allowed: 2176 - - // ./in.cue:2:6 2177 - - // ./in.cue:3:5 2178 - - // ./in.cue:3:7 2179 - // ./in.cue:4:5 2180 - } 2181 - + b: (int){ 1 } 2182 - } 2183 - } 2184 - andInStruct: (_|_){ 2185 - @@ -430,14 +362,11 @@ 2186 - } 2187 - a: (_|_){ 2188 - // [eval] 2189 - - a: (int){ int } 2190 - err: (_|_){ 2191 - // [eval] embed.andInStruct.a.err: field not allowed: 2192 - - // ./in.cue:7:8 2193 - - // ./in.cue:8:5 2194 - - // ./in.cue:8:7 2195 - // ./in.cue:8:16 2196 - } 2197 - + a: (int){ int } 2198 - } 2199 - } 2200 - embedDefWithEmbedding: (_|_){ 2201 - @@ -447,15 +376,11 @@ 2202 - } 2203 - a: (_|_){ 2204 - // [eval] 2205 - - a: (int){ int } 2206 - err: (_|_){ 2207 - // [eval] embed.embedDefWithEmbedding.a.err: field not allowed: 2208 - - // ./in.cue:11:8 2209 - - // ./in.cue:11:9 2210 - - // ./in.cue:12:5 2211 - - // ./in.cue:12:7 2212 - // ./in.cue:12:16 2213 - } 2214 - + a: (int){ int } 2215 - } 2216 - } 2217 - embedComprehension: (_|_){ 2218 - @@ -465,16 +390,11 @@ 2219 - } 2220 - a: (_|_){ 2221 - // [eval] 2222 - - a: (int){ int } 2223 - err: (_|_){ 2224 - // [eval] embed.embedComprehension.a.err: field not allowed: 2225 - - // ./in.cue:15:8 2226 - - // ./in.cue:15:9 2227 - - // ./in.cue:15:17 2228 - - // ./in.cue:16:5 2229 - - // ./in.cue:16:7 2230 - // ./in.cue:16:16 2231 - } 2232 - + a: (int){ int } 2233 - } 2234 - } 2235 - fieldWithAnd: (_|_){ 2236 - @@ -485,9 +405,6 @@ 2237 - // [eval] 2238 - err: (_|_){ 2239 - // [eval] embed.fieldWithAnd.a.err: field not allowed: 2240 - - // ./in.cue:19:6 2241 - - // ./in.cue:20:2 2242 - - // ./in.cue:20:7 2243 - // ./in.cue:20:13 2244 - } 2245 - } 2246 - @@ -498,20 +415,15 @@ 2247 - a: (int){ int } 2248 - } 2249 - B: (struct){ 2250 - - x: (#struct){ 2251 - - a: (int){ int } 2252 - - } 2253 - - } 2254 - - x: (_|_){ 2255 - - // [eval] 2256 - - a: (int){ int } 2257 - + x: ~(embed.embedAndRecursive.#A) 2258 - + } 2259 - + x: (_|_){ 2260 - + // [eval] 2261 - err: (_|_){ 2262 - // [eval] embed.embedAndRecursive.x.err: field not allowed: 2263 - - // ./in.cue:23:6 2264 - - // ./in.cue:24:8 2265 - - // ./in.cue:25:2 2266 - // ./in.cue:25:11 2267 - } 2268 - + a: (int){ int } 2269 - } 2270 - } 2271 - andEmbed: (_|_){ 2272 - @@ -527,17 +439,11 @@ 2273 - } 2274 - d: (_|_){ 2275 - // [eval] 2276 - - b: (int){ int } 2277 - err: (_|_){ 2278 - // [eval] embed.andEmbed.d.err: field not allowed: 2279 - - // ./in.cue:28:6 2280 - - // ./in.cue:29:6 2281 - - // ./in.cue:30:6 2282 - - // ./in.cue:30:7 2283 - - // ./in.cue:30:12 2284 - - // ./in.cue:31:5 2285 - // ./in.cue:31:11 2286 - } 2287 - + b: (int){ int } 2288 - } 2289 - } 2290 - nonDef: (struct){ 2291 - @@ -546,12 +452,12 @@ 2292 - a: (string){ string } 2293 - } 2294 - #Y: (#struct){ 2295 - - a: (string){ string } 2296 - - b?: (string){ string } 2297 - + b?: (string){ string } 2298 - + a: (string){ string } 2299 - } 2300 - #Z: (#struct){ 2301 - - a: (string){ string } 2302 - - b?: (string){ string } 2303 - + b?: (string){ string } 2304 - + a: (string){ string } 2305 - } 2306 - } 2307 - } 2308 - @@ -561,12 +467,12 @@ 2309 - Name: (string){ string } 2310 - } 2311 - #Step: (#struct){ 2312 - - Name: (string){ string } 2313 - - Path?: (string){ string } 2314 - + Path?: (string){ string } 2315 - + Name: (string){ string } 2316 - } 2317 - #Command: (#struct){ 2318 - - Name: (string){ string } 2319 - - Path?: (string){ string } 2320 - + Path?: (string){ string } 2321 - + Name: (string){ string } 2322 - } 2323 - out: (#struct){ 2324 - Name: (string){ "foo" } 2325 - @@ -576,21 +482,15 @@ 2326 - } 2327 - withIndirect: (_|_){ 2328 - // [eval] 2329 - - A: (#struct){ 2330 - - b: (int){ int } 2331 - - } 2332 - - #B: (#struct){ 2333 - - b: (int){ int } 2334 - - } 2335 - - b: (int){ int } 2336 - + A: ~(embed.withIndirect.#B) 2337 - + #B: (#struct){ 2338 - + b: (int){ int } 2339 - + } 2340 - err: (_|_){ 2341 - // [eval] embed.withIndirect.err: field not allowed: 2342 - - // ./in.cue:84:22 2343 - - // ./in.cue:85:5 2344 - - // ./in.cue:86:6 2345 - - // ./in.cue:87:2 2346 - // ./in.cue:87:8 2347 - } 2348 - + b: (int){ int } 2349 - } 2350 - normalValidator: (_|_){ 2351 - // [eval] 2352 - @@ -600,20 +500,18 @@ 2353 - } 2354 - x: (_|_){ 2355 - // [eval] 2356 - - a?: (int){ int } 2357 - - b?: (int){ int } 2358 - err: (_|_){ 2359 - // [eval] embed.normalValidator.x.err: field not allowed: 2360 - - // ./validators.cue:7:6 2361 - - // ./validators.cue:12:5 2362 - + // ./validators.cue:8:3 2363 - // ./validators.cue:13:5 2364 - } 2365 - + a?: (int){ int } 2366 - + b?: (int){ int } 2367 - } 2368 - } 2369 - openValidator: (_|_){ 2370 - // [eval] 2371 - - t1: (_|_){ 2372 - - // [eval] 2373 - + t1: (struct){ 2374 - #X: (_){ 2375 - matchN(0, (#list){ 2376 - }) 2377 - @@ -620,17 +518,10 @@ 2378 - a?: (int){ int } 2379 - b?: (int){ int } 2380 - } 2381 - - x: (_|_){ 2382 - - // [eval] 2383 - - a?: (int){ int } 2384 - - b?: (int){ int } 2385 - - err: (_|_){ 2386 - - // [eval] embed.openValidator.t1.x.err: field not allowed: 2387 - - // ./validators.cue:17:3 2388 - - // ./validators.cue:16:6 2389 - - // ./validators.cue:21:5 2390 - - // ./validators.cue:22:5 2391 - - } 2392 - + x: (#struct){ 2393 - + err: (int){ 1 } 2394 - + a?: (int){ int } 2395 - + b?: (int){ int } 2396 - } 2397 - } 2398 - t2: (_|_){ 2399 - @@ -709,16 +600,11 @@ 2400 - } 2401 - out: (_|_){ 2402 - // [eval] 2403 - - a: (string){ string } 2404 - err: (_|_){ 2405 - // [eval] and.transitive.err.out.err: field not allowed: 2406 - - // ./in.cue:42:5 2407 - - // ./in.cue:43:6 2408 - - // ./in.cue:44:6 2409 - - // ./in.cue:44:11 2410 - - // ./in.cue:45:7 2411 - // ./in.cue:46:3 2412 - } 2413 - + a: (string){ string } 2414 - } 2415 - } 2416 - } 2417 - @@ -751,17 +637,11 @@ 2418 - } 2419 - out: (_|_){ 2420 - // [eval] 2421 - - a: (string){ string } 2422 - err: (_|_){ 2423 - // [eval] and.transitiveWithEmbed.err.out.err: field not allowed: 2424 - - // ./in.cue:58:5 2425 - - // ./in.cue:59:6 2426 - - // ./in.cue:59:11 2427 - - // ./in.cue:60:6 2428 - - // ./in.cue:60:7 2429 - - // ./in.cue:61:7 2430 - // ./in.cue:62:3 2431 - } 2432 - + a: (string){ string } 2433 - } 2434 - } 2435 - } 2436 - @@ -804,11 +684,11 @@ 2437 - out: (#struct){ 2438 - let self#2 = (_|_){ 2439 - // [incomplete] issue3832.#T._subject.out.self: in.self undefined as in is incomplete (type _): 2440 - - // ./issue3832.cue:8:16 2441 - + // ./issue3832.cue:11:16 2442 - } 2443 - outFirstName: (_|_){ 2444 - - // [incomplete] issue3832.#T._subject.out.self: in.self undefined as in is incomplete (type _): 2445 - - // ./issue3832.cue:8:16 2446 - + // [incomplete] issue3832.#T._subject.out.outFirstName: undefined field: firstName: 2447 - + // ./issue3832.cue:12:24 2448 - } 2449 - } 2450 - } 2451 - @@ -818,19 +698,30 @@ 2452 - }, (#struct){ 2453 - pass: (#struct){ 2454 - let self#2 = (_|_){ 2455 - - // [incomplete] issue3832.#T._assert.pass.self: in.self undefined (in is incomplete): 2456 - - // ./issue3832.cue:8:16 2457 - + // [incomplete] issue3832.#T._assert.pass.self: undefined field: self: 2458 - + // ./issue3832.cue:11:19 2459 - } 2460 - outFirstName: (_|_){ 2461 - - // [incomplete] issue3832.#T._assert.pass.self: in.self undefined (in is incomplete): 2462 - - // ./issue3832.cue:8:16 2463 - + // [incomplete] issue3832.#T._assert.pass.outFirstName: undefined field: firstName: 2464 - + // ./issue3832.cue:12:24 2465 - } 2466 - } 2467 - invoke!: (_){ _ } 2468 - }) } 2469 - results: (_|_){ 2470 - - // [incomplete] issue3832.#T.results: unresolved disjunction {pass:"never",check!:_} | {pass:{let self#2=_|_(issue3832.#T._assert.pass.self: in.self undefined (in is incomplete)),outFirstName:_|_(issue3832.#T._assert.pass.self: in.self undefined (in is incomplete))},invoke!:_} (type struct): 2471 - - // ./issue3832.cue:20:12 2472 - + // [incomplete] issue3832.#T.results: unresolved disjunction {pass:"never",check!:_} | {pass:{let self#2=_|_(issue3832.#T._assert.pass.self: undefined field: self),outFirstName:_|_(issue3832.#T._assert.pass.outFirstName: undefined field: firstName)},invoke!:_} (type struct): 2473 - + // ./issue3832.cue:25:12 2474 - + } 2475 - + } 2476 - + _assert: (#struct){ 2477 - + invoke: (#struct){ 2478 - + self: (#struct){ 2479 - + firstName: (string){ "Sam" } 2480 - + } 2481 - + } 2482 - + pass: (#struct){ 2483 - + let self#2 = ~(issue3832._assert.invoke.self) 2484 - + outFirstName: (string){ "Sam" } 2485 - } 2486 - } 2487 - _subject: (#struct){ 2488 - @@ -838,35 +729,18 @@ 2489 - out: (#struct){ 2490 - let self#2 = (_|_){ 2491 - // [incomplete] issue3832._subject.out.self: in.self undefined as in is incomplete (type _): 2492 - - // ./issue3832.cue:8:16 2493 - + // ./issue3832.cue:11:16 2494 - } 2495 - outFirstName: (_|_){ 2496 - - // [incomplete] issue3832._subject.out.self: in.self undefined as in is incomplete (type _): 2497 - - // ./issue3832.cue:8:16 2498 - - } 2499 - - } 2500 - - } 2501 - - _assert: (#struct){ 2502 - - pass: (#struct){ 2503 - - let self#2 = (#struct){ 2504 - - firstName: (string){ "Sam" } 2505 - - } 2506 - - outFirstName: (string){ "Sam" } 2507 - - } 2508 - - invoke: (struct){ 2509 - - self: (struct){ 2510 - - firstName: (string){ "Sam" } 2511 - - } 2512 - - } 2513 - - } 2514 - - results: (#struct){ 2515 - - let self#2 = (#struct){ 2516 - - firstName: (string){ "Sam" } 2517 - - } 2518 - - outFirstName: (string){ "Sam" } 2519 - - } 2520 - - } 2521 - - issue3833: (struct){ 2522 - + // [incomplete] issue3832._subject.out.outFirstName: undefined field: firstName: 2523 - + // ./issue3832.cue:12:24 2524 - + } 2525 - + } 2526 - + } 2527 - + results: ~(issue3832._assert.pass) 2528 - + } 2529 - + issue3833: (_|_){ 2530 - + // [eval] 2531 - ok: (struct){ 2532 - out: (#struct){ 2533 - a: (#struct){ 2534 - @@ -887,11 +761,18 @@ 2535 - b: (string){ "foo" } 2536 - } 2537 - } 2538 - - evalv2Issue: (struct){ 2539 - - out: (#struct){ 2540 - - a: (#struct){ 2541 - - b: (string){ "foo" } 2542 - - c: (string){ "foo" } 2543 - + evalv2Issue: (_|_){ 2544 - + // [eval] 2545 - + out: (_|_){ 2546 - + // [eval] 2547 - + a: (_|_){ 2548 - + // [eval] 2549 - + b: (string){ "foo" } 2550 - + c: (_|_){ 2551 - + // [eval] issue3833.evalv2Issue.out.a.c: field not allowed: 2552 - + // ./issue3833.cue:22:6 2553 - + // ./issue3833.cue:24:9 2554 - + } 2555 - } 2556 - } 2557 - #A: (#struct){ 2558 - @@ -962,12 +843,8 @@ 2559 - globalField: (string){ string } 2560 - } 2561 - #Context: (#struct){ 2562 - - glb: (#struct){ 2563 - - globalField: (string){ string } 2564 - - } 2565 - - out: (#struct){ 2566 - - globalField: (string){ string } 2567 - - } 2568 - + glb: ~(issue3839.full.#GlobalContext) 2569 - + out: ~(issue3839.full.#GlobalContext) 2570 - } 2571 - out: (struct){ 2572 - ingress: (#struct){ 2573 - @@ -995,22 +872,22 @@ 2574 - #Z: (#struct){ 2575 - } 2576 - x: (#struct){ 2577 - - y: (struct){ 2578 - - z: (int){ 1 } 2579 - - } 2580 - - } 2581 - - } 2582 - - B: (struct){ 2583 - - #Z: (#struct){ 2584 - - } 2585 - - x: (#struct){ 2586 - - y: (struct){ 2587 - - z: (int){ 1 } 2588 - - } 2589 - - } 2590 - - } 2591 - - out: (#struct){ 2592 - - y: (struct){ 2593 - + y: (#struct){ 2594 - + z: (int){ 1 } 2595 - + } 2596 - + } 2597 - + } 2598 - + B: (struct){ 2599 - + #Z: (#struct){ 2600 - + } 2601 - + x: (#struct){ 2602 - + y: (#struct){ 2603 - + z: (int){ 1 } 2604 - + } 2605 - + } 2606 - + } 2607 - + out: (#struct){ 2608 - + y: (#struct){ 2609 - z: (int){ 1 } 2610 - } 2611 - } 2612 - @@ -1020,22 +897,22 @@ 2613 - #Z: (#struct){ 2614 - } 2615 - x: (#struct){ 2616 - - y: (struct){ 2617 - - z: (int){ 1 } 2618 - - } 2619 - - } 2620 - - } 2621 - - B: (struct){ 2622 - - #Z: (#struct){ 2623 - - } 2624 - - x: (#struct){ 2625 - - y: (struct){ 2626 - - z: (int){ 1 } 2627 - - } 2628 - - } 2629 - - } 2630 - - out: (#struct){ 2631 - - y: (struct){ 2632 - + y: (#struct){ 2633 - + z: (int){ 1 } 2634 - + } 2635 - + } 2636 - + } 2637 - + B: (struct){ 2638 - + #Z: (#struct){ 2639 - + } 2640 - + x: (#struct){ 2641 - + y: (#struct){ 2642 - + z: (int){ 1 } 2643 - + } 2644 - + } 2645 - + } 2646 - + out: (#struct){ 2647 - + y: (#struct){ 2648 - z: (int){ 1 } 2649 - } 2650 - } 2651 - @@ -1050,11 +927,7 @@ 2652 - } 2653 - } 2654 - #JobConfig: (#struct){ 2655 - - image: (#struct){ 2656 - - embed: (#struct){ 2657 - - image: (string){ "foo:v1" } 2658 - - } 2659 - - } 2660 - + image: ~(orig.t1.#Image) 2661 - job: (#struct){ 2662 - image: (string){ "foo:v1" } 2663 - vcs: (string){ "git" } 2664 - @@ -1118,7 +991,7 @@ 2665 - } 2666 - } 2667 - out: (#struct){ 2668 - - in: (struct){ 2669 - + in: (#struct){ 2670 - input: (#struct){ 2671 - image: (string){ "someimage" } 2672 - env: (string){ "FOO" } 2673 - @@ -1150,11 +1023,11 @@ 2674 - _in: (_){ _ } 2675 - out: (_){ _ } 2676 - } 2677 - - _in: (struct){ 2678 - - a: (struct){ 2679 - - e: (string){ "foo" } 2680 - - } 2681 - - b: (struct){ 2682 - + _in: (#struct){ 2683 - + a: (#struct){ 2684 - + e: (string){ "foo" } 2685 - + } 2686 - + b: (#struct){ 2687 - e: (string){ "foo" } 2688 - f: (int){ 1 } 2689 - } 2690 - @@ -1187,24 +1060,16 @@ 2691 - _in: (_){ _ } 2692 - out: (_){ _ } 2693 - } 2694 - - _in: (struct){ 2695 - - a: (struct){ 2696 - - e: (string){ "foo" } 2697 - - } 2698 - - b: (struct){ 2699 - - e: (string){ "foo" } 2700 - - f: (int){ 1 } 2701 - - } 2702 - - } 2703 - - out: (#struct){ 2704 - - a: (#struct){ 2705 - - e: (string){ "foo" } 2706 - - } 2707 - - b: (#struct){ 2708 - - e: (string){ "foo" } 2709 - - f: (int){ 1 } 2710 - - } 2711 - - } 2712 - + _in: (#struct){ 2713 - + a: (#struct){ 2714 - + e: (string){ "foo" } 2715 - + } 2716 - + b: (#struct){ 2717 - + e: (string){ "foo" } 2718 - + f: (int){ 1 } 2719 - + } 2720 - + } 2721 - + out: ~(reduced.t2._in) 2722 - } 2723 - } 2724 - issue3934: (struct){ 2725 - @@ -1291,7 +1156,7 @@ 2726 - op: (string){ "add" } 2727 - path: (string){ "/metadata" } 2728 - value: (_|_){ 2729 - - // [incomplete] full.#Resource.patches.0.value: invalid interpolation: non-concrete value string (type string): 2730 - + // [incomplete] full.#Resource.pickMsg.msg: invalid interpolation: non-concrete value string (type string): 2731 - // ./large.cue:7:25 2732 - // ./large.cue:3:12 2733 - } 2734 - @@ -1320,38 +1185,11 @@ 2735 - #Main: (#struct){ 2736 - namespace: (string){ string } 2737 - output: (_|_){ 2738 - - // [incomplete] full.#Main.output: invalid non-ground value string (must be concrete string): 2739 - + // [incomplete] full.#Main.jsonPatch.output: key value of dynamic field must be concrete, found string: 2740 - + // ./large.cue:21:24 2741 - // ./large.cue:19:15 2742 - - // ./large.cue:41:15 2743 - - _: (#list){ 2744 - - 0: (#struct){ 2745 - - op: (string){ "add" } 2746 - - path: (string){ "/metadata" } 2747 - - value: (string){ "foo" } 2748 - - } 2749 - - } 2750 - } 2751 - let jsonPatch#4 = (#struct){ 2752 - - namespace: (string){ string } 2753 - - patch: (#list){ 2754 - - 0: (#struct){ 2755 - - op: (string){ "add" } 2756 - - path: (string){ "/metadata" } 2757 - - value: (string){ "foo" } 2758 - - } 2759 - - } 2760 - - output: (_|_){ 2761 - - // [incomplete] full.#Main.jsonPatch.output: invalid non-ground value string (must be concrete string): 2762 - - // ./large.cue:19:15 2763 - - // ./large.cue:41:15 2764 - - _: (#list){ 2765 - - 0: (#struct){ 2766 - - op: (string){ "add" } 2767 - - path: (string){ "/metadata" } 2768 - - value: (string){ "foo" } 2769 - - } 2770 - - } 2771 - - } 2772 - let base#7 = (#struct){ 2773 - someMsg: (string){ string } 2774 - obs: (#struct){ |(*(#struct){ 2775 - @@ -1370,7 +1208,7 @@ 2776 - op: (string){ "add" } 2777 - path: (string){ "/metadata" } 2778 - value: (_|_){ 2779 - - // [incomplete] full.#Main.jsonPatch.base.patches.0.value: invalid interpolation: non-concrete value string (type string): 2780 - + // [incomplete] full.#Main.jsonPatch.base.pickMsg.msg: invalid interpolation: non-concrete value string (type string): 2781 - // ./large.cue:7:25 2782 - // ./large.cue:3:12 2783 - } 2784 - @@ -1394,6 +1232,19 @@ 2785 - } 2786 - } 2787 - } 2788 - + namespace: (string){ string } 2789 - + patch: (#list){ 2790 - + 0: (#struct){ 2791 - + op: (string){ "add" } 2792 - + path: (string){ "/metadata" } 2793 - + value: (string){ "foo" } 2794 - + } 2795 - + } 2796 - + output: (_|_){ 2797 - + // [incomplete] full.#Main.jsonPatch.output: key value of dynamic field must be concrete, found string: 2798 - + // ./large.cue:21:24 2799 - + // ./large.cue:19:15 2800 - + } 2801 - } 2802 - } 2803 - out: (#struct){ 2804 - @@ -1414,26 +1265,20 @@ 2805 - out: (#struct){ 2806 - b1: (_|_){ 2807 - // [incomplete] disjunction.withErr.t1.out.b1: 4 errors in empty disjunction: 2808 - - // disjunction.withErr.t1.out.b1: conflicting values null and {b2:{b3:params.mayExistLater}} (mismatched types null and struct): 2809 - + // disjunction.withErr.t1.out.b1: conflicting values {b2:{b3:params.mayExistLater}} and null (mismatched types struct and null): 2810 - + // ./validators.cue:32:7 2811 - // ./validators.cue:33:7 2812 - // ./validators.cue:35:17 2813 - // disjunction.withErr.t1.out.b1.b2: 2 errors in empty disjunction: 2814 - - // disjunction.withErr.t1.out.b1.b2: conflicting values null and {b3:params.mayExistLater} (mismatched types null and struct): 2815 - + // disjunction.withErr.t1.out.b1.b2: conflicting values {b3:params.mayExistLater} and null (mismatched types struct and null): 2816 - + // ./validators.cue:32:7 2817 - // ./validators.cue:33:11 2818 - + // ./validators.cue:35:24 2819 - // ./validators.cue:36:17 2820 - // disjunction.withErr.t1.out.b1.b2.b3: undefined field: mayExistLater: 2821 - // ./validators.cue:33:22 2822 - - b2: (_|_){ 2823 - - // [incomplete] disjunction.withErr.t1.out.b1.b2: 2 errors in empty disjunction: 2824 - - // disjunction.withErr.t1.out.b1.b2: conflicting values null and {b3:params.mayExistLater} (mismatched types null and struct): 2825 - - // ./validators.cue:33:11 2826 - - // ./validators.cue:36:17 2827 - - // disjunction.withErr.t1.out.b1.b2.b3: undefined field: mayExistLater: 2828 - - // ./validators.cue:33:22 2829 - - b3: (_|_){ 2830 - - // [incomplete] disjunction.withErr.t1.out.b1.b2.b3: undefined field: mayExistLater: 2831 - - // ./validators.cue:33:22 2832 - - } 2833 - + b2: (struct){ 2834 - + b3: (_){ _ } 2835 - } 2836 - } 2837 - } 2838 - -- diff/todo/p1 -- 2839 - embed.openValidator.t1.err: unexpected pass. 2840 - -- diff/todo/p2 -- 2841 - and.transitive(WithEmbed)?.out.ok: unexpected error 2842 - -- diff/explanation -- 2843 - issue3833.evalv2Issue: now catches an invalid field that was previously allowed. 2844 - Note that this is not the same field as the one reported in the issue. This is a 2845 - correct fix relative to evalv2. 2846 - -- out/eval -- 2847 - Errors: 2848 - and.transitive.err.out.err: field not allowed: 2849 - ./in.cue:42:5 2850 - ./in.cue:43:6 2851 - ./in.cue:44:6 2852 - ./in.cue:44:11 2853 - ./in.cue:45:7 2854 - ./in.cue:46:3 2855 - and.transitiveWithEmbed.err.out.err: field not allowed: 2856 - ./in.cue:58:5 2857 - ./in.cue:59:6 2858 - ./in.cue:59:11 2859 - ./in.cue:60:6 2860 - ./in.cue:60:7 2861 - ./in.cue:61:7 2862 - ./in.cue:62:3 2863 - embed.andEmbed.d.err: field not allowed: 2864 - ./in.cue:28:6 2865 - ./in.cue:29:6 2866 - ./in.cue:30:6 2867 - ./in.cue:30:7 2868 - ./in.cue:30:12 2869 - ./in.cue:31:5 2870 - ./in.cue:31:11 2871 - embed.andInStruct.a.err: field not allowed: 2872 - ./in.cue:7:8 2873 - ./in.cue:8:5 2874 - ./in.cue:8:7 2875 - ./in.cue:8:16 2876 - embed.embedAndRecursive.x.err: field not allowed: 2877 - ./in.cue:23:6 2878 - ./in.cue:24:8 2879 - ./in.cue:25:2 2880 - ./in.cue:25:11 2881 - embed.embedComprehension.a.err: field not allowed: 2882 - ./in.cue:15:8 2883 - ./in.cue:15:9 2884 - ./in.cue:15:17 2885 - ./in.cue:16:5 2886 - ./in.cue:16:7 2887 - ./in.cue:16:16 2888 - embed.embedDefWithEmbedding.a.err: field not allowed: 2889 - ./in.cue:11:8 2890 - ./in.cue:11:9 2891 - ./in.cue:12:5 2892 - ./in.cue:12:7 2893 - ./in.cue:12:16 2894 - embed.fieldWithAnd.a.err: field not allowed: 2895 - ./in.cue:19:6 2896 - ./in.cue:20:2 2897 - ./in.cue:20:7 2898 - ./in.cue:20:13 2899 - embed.normalValidator.x.err: field not allowed: 2900 - ./validators.cue:7:6 2901 - ./validators.cue:12:5 2902 - ./validators.cue:13:5 2903 - embed.openValidator.t2.a.b: conflicting values 1 and {b?:Y} (mismatched types int and struct): 2904 - ./validators.cue:25:16 2905 - ./validators.cue:26:5 2906 - ./validators.cue:26:9 2907 - ./validators.cue:27:5 2908 - ./validators.cue:28:8 2909 - embed.simple.a.err: field not allowed: 2910 - ./in.cue:2:6 2911 - ./in.cue:3:5 2912 - ./in.cue:3:7 2913 - ./in.cue:4:5 2914 - embed.withIndirect.err: field not allowed: 2915 - ./in.cue:84:22 2916 - ./in.cue:85:5 2917 - ./in.cue:86:6 2918 - ./in.cue:87:2 2919 - ./in.cue:87:8 2920 - issue3947.full.out.disallowed: field not allowed: 2921 - ./disjunction.cue:4:11 2922 - ./disjunction.cue:5:13 2923 - ./disjunction.cue:6:7 2924 - ./disjunction.cue:6:17 2925 - issue3957.reduced.c.a: 2 errors in empty disjunction: 2926 - issue3957.reduced.c.a: conflicting values "foo" and "bar": 2927 - ./disjunction.cue:9:8 2928 - ./disjunction.cue:10:24 2929 - issue3957.reduced.c.a: field not allowed: 2930 - ./disjunction.cue:9:5 2931 - ./disjunction.cue:10:5 2932 - ./disjunction.cue:10:11 2933 - ./disjunction.cue:11:6 2934 - embed.openValidator.t1.x.err: field not allowed: 2935 - ./validators.cue:17:3 2936 - ./validators.cue:16:6 2937 - ./validators.cue:21:5 2938 - ./validators.cue:22:5 2939 - embed.openValidator.t2.a.b: invalid value 1 (does not satisfy matchN): 0 matched, expected 1: 2940 - ./validators.cue:25:5 2941 - ./validators.cue:25:12 2942 - ./validators.cue:26:9 2943 - ./validators.cue:28:8 2944 - 2945 - Result: 2946 - (_|_){ 2947 - // [eval] 2948 - issue3920: (struct){ 2949 - out: (#struct){ 2950 - a: (#struct){ 2951 - c?: (string){ string } 2952 - b: (string){ "out" } 2953 - } 2954 - } 2955 - #A: (#struct){ 2956 - a?: (#struct){ 2957 - c?: (string){ string } 2958 - } 2959 - } 2960 - #B: (#struct){ 2961 - c?: (string){ string } 2962 - } 2963 - } 2964 - onlyCloseDirectStruct: (struct){ 2965 - #foo: (#struct){ 2966 - } 2967 - x: (struct){ 2968 - y: (struct){ 2969 - a: (#struct){ 2970 - } 2971 - b: (int){ 1 } 2972 - } 2973 - } 2974 - } 2975 - closeInEmbed: (struct){ 2976 - x: (#struct){ 2977 - d: (struct){ 2978 - e: (int){ 1 } 2979 - f: (int){ int } 2980 - } 2981 - } 2982 - } 2983 - issue4006: (struct){ 2984 - #A: (#struct){ 2985 - fieldA: (string){ string } 2986 - } 2987 - #B: (#struct){ 2988 - fieldA: (string){ string } 2989 - } 2990 - #C: (#struct){ 2991 - fieldA: (string){ string } 2992 - } 2993 - out: (#struct){ 2994 - fieldA: (string){ string } 2995 - } 2996 - } 2997 - issue3947: (_|_){ 2998 - // [eval] 2999 - full: (_|_){ 3000 - // [eval] 3001 - #Schema: (#struct){ 3002 - allowed?: (string){ string } 3003 - } 3004 - _defaults: (struct){ 3005 - disallowed: (_){ |(*(string){ "default value" }, (_){ _ }) } 3006 - } 3007 - out: (_|_){ 3008 - // [eval] 3009 - allowed?: (string){ string } 3010 - disallowed: (_|_){ 3011 - // [eval] issue3947.full.out.disallowed: field not allowed: 3012 - // ./disjunction.cue:4:11 3013 - // ./disjunction.cue:5:13 3014 - // ./disjunction.cue:6:7 3015 - // ./disjunction.cue:6:17 3016 - } 3017 - } 3018 - } 3019 - } 3020 - issue3957: (_|_){ 3021 - // [eval] 3022 - reduced: (_|_){ 3023 - // [eval] 3024 - c: (_|_){ 3025 - // [eval] 3026 - a: (_|_){ 3027 - // [eval] issue3957.reduced.c.a: 2 errors in empty disjunction: 3028 - // issue3957.reduced.c.a: conflicting values "foo" and "bar": 3029 - // ./disjunction.cue:9:8 3030 - // ./disjunction.cue:10:24 3031 - // issue3957.reduced.c.a: field not allowed: 3032 - // ./disjunction.cue:9:5 3033 - // ./disjunction.cue:10:5 3034 - // ./disjunction.cue:10:11 3035 - // ./disjunction.cue:11:6 3036 - } 3037 - b?: (string){ string } 3038 - } 3039 - #B: (#struct){ 3040 - b?: (string){ string } 3041 - } 3042 - } 3043 - full: (struct){ 3044 - #oneof: (#struct){ |((#struct){ 3045 - a: (string){ string } 3046 - }, (#struct){ 3047 - b?: (list){ 3048 - } 3049 - }) } 3050 - c: (#struct){ 3051 - a: (string){ "bar" } 3052 - } 3053 - } 3054 - derived: (struct){ 3055 - t1: (struct){ 3056 - #Schema: (#struct){ 3057 - in: ((string|list)){ |((string){ string }, (list){ 3058 - }) } 3059 - out: (#list){ 3060 - 0: ((string|list)){ |((string){ string }, (list){ 3061 - }) } 3062 - } 3063 - } 3064 - x: (#struct){ 3065 - in: (string){ "foo" } 3066 - out: (#list){ 3067 - 0: (string){ "foo" } 3068 - } 3069 - } 3070 - } 3071 - t2: (struct){ 3072 - #Schema: (#struct){ 3073 - in: ((string|list)){ |((string){ string }, (list){ 3074 - }) } 3075 - let _flat#1 = (#list){ 3076 - 0: ((string|list)){ |((string){ string }, (list){ 3077 - }) } 3078 - } 3079 - out: (#list){ 3080 - 0: ((string|list)){ |((string){ string }, (list){ 3081 - }) } 3082 - } 3083 - } 3084 - out: (#struct){ 3085 - in: (string){ "foo" } 3086 - let _flat#1 = (#list){ 3087 - 0: (string){ "foo" } 3088 - } 3089 - out: (#list){ 3090 - 0: (string){ "foo" } 3091 - } 3092 - } 3093 - } 3094 - } 3095 - } 3096 - nestedEllipsis: (struct){ 3097 - minimal: (struct){ 3098 - out: (#struct){ 3099 - extra: (string){ "foo" } 3100 - } 3101 - #Schema: (#struct){ 3102 - } 3103 - #meta: (#struct){ 3104 - } 3105 - } 3106 - nestedWithPatterns: (struct){ 3107 - out: (#struct){ 3108 - #meta: (#struct){ 3109 - name?: (int){ int } 3110 - } 3111 - objs: (#struct){ 3112 - obj1: (#struct){ 3113 - extra: (string){ "foo" } 3114 - name?: (int){ int } 3115 - } 3116 - } 3117 - } 3118 - #Schema: (#struct){ 3119 - #meta: (#struct){ 3120 - name?: (int){ int } 3121 - } 3122 - objs?: (#struct){ 3123 - } 3124 - } 3125 - } 3126 - } 3127 - issue4015: (struct){ 3128 - reduced: (struct){ 3129 - #X: (#struct){ 3130 - } 3131 - out: (#struct){ 3132 - a: (struct){ 3133 - b: (string){ "x" } 3134 - c: (string){ "h" } 3135 - } 3136 - } 3137 - } 3138 - nested: (struct){ 3139 - #X: (#struct){ 3140 - foo: (#struct){ 3141 - } 3142 - } 3143 - out: (#struct){ 3144 - foo: (#struct){ 3145 - a: (struct){ 3146 - b: (string){ "x" } 3147 - c: (string){ "h" } 3148 - } 3149 - } 3150 - } 3151 - } 3152 - full: (struct){ 3153 - #Schema: (#struct){ 3154 - cfg: (#struct){ 3155 - foo: (#struct){ 3156 - enabled: (bool){ |(*(bool){ false }, (bool){ bool }) } 3157 - fooField: (string){ string } 3158 - } 3159 - bar: (#struct){ 3160 - barField: (string){ string } 3161 - } 3162 - } 3163 - capacity: (int){ |(*(int){ 3 }, (int){ int }) } 3164 - } 3165 - #MoreCapacity: (#struct){ 3166 - capacity: (int){ 30 } 3167 - } 3168 - out: (#struct){ 3169 - cfg: (#struct){ 3170 - foo: (#struct){ 3171 - enabled: (bool){ true } 3172 - fooField: (string){ "h" } 3173 - } 3174 - bar: (#struct){ 3175 - barField: (string){ "x" } 3176 - } 3177 - } 3178 - capacity: (int){ 30 } 3179 - } 3180 - } 3181 - } 3182 - issue3921: (struct){ 3183 - top: (struct){ 3184 - #A: (#struct){ 3185 - b: (string){ string } 3186 - } 3187 - #B: (_){ _ } 3188 - a: (#struct){ 3189 - b: (string){ string } 3190 - } 3191 - } 3192 - hidden: (struct){ 3193 - #A: (#struct){ 3194 - _hidden: (#struct){ 3195 - b: (string){ string } 3196 - } 3197 - } 3198 - #B: (#struct){ 3199 - } 3200 - a: (#struct){ 3201 - _hidden: (#struct){ 3202 - b: (string){ string } 3203 - } 3204 - } 3205 - } 3206 - full: (struct){ 3207 - out: (#struct){ 3208 - #stepMap: (#struct){ 3209 - foo: (#struct){ 3210 - image: (string){ "bar" } 3211 - #config: (#struct){ 3212 - version: (string){ string } 3213 - } 3214 - } 3215 - } 3216 - stepList: (#list){ 3217 - 0: (#struct){ 3218 - image: (string){ "bar" } 3219 - #config: (#struct){ 3220 - version: (string){ string } 3221 - } 3222 - } 3223 - } 3224 - } 3225 - #templateList: (#struct){ 3226 - #stepMap: (#struct){ 3227 - } 3228 - stepList: (#list){ 3229 - } 3230 - } 3231 - #defineMap: (#struct){ 3232 - #stepMap: (#struct){ 3233 - foo: (#struct){ 3234 - image: (string){ "bar" } 3235 - #config: (#struct){ 3236 - version: (string){ string } 3237 - } 3238 - } 3239 - } 3240 - stepList: (_){ _ } 3241 - } 3242 - #Step: (#struct){ 3243 - image: (string){ string } 3244 - #config: (#struct){ 3245 - version: (string){ string } 3246 - } 3247 - } 3248 - #StepInner: (#struct){ 3249 - image: (string){ string } 3250 - } 3251 - } 3252 - } 3253 - embed: (_|_){ 3254 - // [eval] 3255 - simple: (_|_){ 3256 - // [eval] 3257 - #A: (#struct){ 3258 - b: (int){ 1 } 3259 - } 3260 - a: (_|_){ 3261 - // [eval] 3262 - b: (int){ 1 } 3263 - err: (_|_){ 3264 - // [eval] embed.simple.a.err: field not allowed: 3265 - // ./in.cue:2:6 3266 - // ./in.cue:3:5 3267 - // ./in.cue:3:7 3268 - // ./in.cue:4:5 3269 - } 3270 - } 3271 - } 3272 - andInStruct: (_|_){ 3273 - // [eval] 3274 - #Foo: (#struct){ 3275 - a: (int){ int } 3276 - } 3277 - a: (_|_){ 3278 - // [eval] 3279 - a: (int){ int } 3280 - err: (_|_){ 3281 - // [eval] embed.andInStruct.a.err: field not allowed: 3282 - // ./in.cue:7:8 3283 - // ./in.cue:8:5 3284 - // ./in.cue:8:7 3285 - // ./in.cue:8:16 3286 - } 3287 - } 3288 - } 3289 - embedDefWithEmbedding: (_|_){ 3290 - // [eval] 3291 - #Foo: (#struct){ 3292 - a: (int){ int } 3293 - } 3294 - a: (_|_){ 3295 - // [eval] 3296 - a: (int){ int } 3297 - err: (_|_){ 3298 - // [eval] embed.embedDefWithEmbedding.a.err: field not allowed: 3299 - // ./in.cue:11:8 3300 - // ./in.cue:11:9 3301 - // ./in.cue:12:5 3302 - // ./in.cue:12:7 3303 - // ./in.cue:12:16 3304 - } 3305 - } 3306 - } 3307 - embedComprehension: (_|_){ 3308 - // [eval] 3309 - #Foo: (#struct){ 3310 - a: (int){ int } 3311 - } 3312 - a: (_|_){ 3313 - // [eval] 3314 - a: (int){ int } 3315 - err: (_|_){ 3316 - // [eval] embed.embedComprehension.a.err: field not allowed: 3317 - // ./in.cue:15:8 3318 - // ./in.cue:15:9 3319 - // ./in.cue:15:17 3320 - // ./in.cue:16:5 3321 - // ./in.cue:16:7 3322 - // ./in.cue:16:16 3323 - } 3324 - } 3325 - } 3326 - fieldWithAnd: (_|_){ 3327 - // [eval] 3328 - #A: (#struct){ 3329 - } 3330 - a: (_|_){ 3331 - // [eval] 3332 - err: (_|_){ 3333 - // [eval] embed.fieldWithAnd.a.err: field not allowed: 3334 - // ./in.cue:19:6 3335 - // ./in.cue:20:2 3336 - // ./in.cue:20:7 3337 - // ./in.cue:20:13 3338 - } 3339 - } 3340 - } 3341 - embedAndRecursive: (_|_){ 3342 - // [eval] 3343 - #A: (#struct){ 3344 - a: (int){ int } 3345 - } 3346 - B: (struct){ 3347 - x: (#struct){ 3348 - a: (int){ int } 3349 - } 3350 - } 3351 - x: (_|_){ 3352 - // [eval] 3353 - a: (int){ int } 3354 - err: (_|_){ 3355 - // [eval] embed.embedAndRecursive.x.err: field not allowed: 3356 - // ./in.cue:23:6 3357 - // ./in.cue:24:8 3358 - // ./in.cue:25:2 3359 - // ./in.cue:25:11 3360 - } 3361 - } 3362 - } 3363 - andEmbed: (_|_){ 3364 - // [eval] 3365 - #A: (#struct){ 3366 - b: (int){ int } 3367 - } 3368 - #B: (#struct){ 3369 - b: (int){ int } 3370 - } 3371 - #D: (#struct){ 3372 - b: (int){ int } 3373 - } 3374 - d: (_|_){ 3375 - // [eval] 3376 - b: (int){ int } 3377 - err: (_|_){ 3378 - // [eval] embed.andEmbed.d.err: field not allowed: 3379 - // ./in.cue:28:6 3380 - // ./in.cue:29:6 3381 - // ./in.cue:30:6 3382 - // ./in.cue:30:7 3383 - // ./in.cue:30:12 3384 - // ./in.cue:31:5 3385 - // ./in.cue:31:11 3386 - } 3387 - } 3388 - } 3389 - nonDef: (struct){ 3390 - t1: (struct){ 3391 - X: (struct){ 3392 - a: (string){ string } 3393 - } 3394 - #Y: (#struct){ 3395 - a: (string){ string } 3396 - b?: (string){ string } 3397 - } 3398 - #Z: (#struct){ 3399 - a: (string){ string } 3400 - b?: (string){ string } 3401 - } 3402 - } 3403 - } 3404 - defAndHidden: (struct){ 3405 - full: (struct){ 3406 - _stepCommon: (struct){ 3407 - Name: (string){ string } 3408 - } 3409 - #Step: (#struct){ 3410 - Name: (string){ string } 3411 - Path?: (string){ string } 3412 - } 3413 - #Command: (#struct){ 3414 - Name: (string){ string } 3415 - Path?: (string){ string } 3416 - } 3417 - out: (#struct){ 3418 - Name: (string){ "foo" } 3419 - Path?: (string){ string } 3420 - } 3421 - } 3422 - } 3423 - withIndirect: (_|_){ 3424 - // [eval] 3425 - A: (#struct){ 3426 - b: (int){ int } 3427 - } 3428 - #B: (#struct){ 3429 - b: (int){ int } 3430 - } 3431 - b: (int){ int } 3432 - err: (_|_){ 3433 - // [eval] embed.withIndirect.err: field not allowed: 3434 - // ./in.cue:84:22 3435 - // ./in.cue:85:5 3436 - // ./in.cue:86:6 3437 - // ./in.cue:87:2 3438 - // ./in.cue:87:8 3439 - } 3440 - } 3441 - normalValidator: (_|_){ 3442 - // [eval] 3443 - #X: (#struct){ 3444 - a?: (int){ int } 3445 - b?: (int){ int } 3446 - } 3447 - x: (_|_){ 3448 - // [eval] 3449 - a?: (int){ int } 3450 - b?: (int){ int } 3451 - err: (_|_){ 3452 - // [eval] embed.normalValidator.x.err: field not allowed: 3453 - // ./validators.cue:7:6 3454 - // ./validators.cue:12:5 3455 - // ./validators.cue:13:5 3456 - } 3457 - } 3458 - } 3459 - openValidator: (_|_){ 3460 - // [eval] 3461 - t1: (_|_){ 3462 - // [eval] 3463 - #X: (_){ 3464 - matchN(0, (#list){ 3465 - }) 3466 - a?: (int){ int } 3467 - b?: (int){ int } 3468 - } 3469 - x: (_|_){ 3470 - // [eval] 3471 - a?: (int){ int } 3472 - b?: (int){ int } 3473 - err: (_|_){ 3474 - // [eval] embed.openValidator.t1.x.err: field not allowed: 3475 - // ./validators.cue:17:3 3476 - // ./validators.cue:16:6 3477 - // ./validators.cue:21:5 3478 - // ./validators.cue:22:5 3479 - } 3480 - } 3481 - } 3482 - t2: (_|_){ 3483 - // [eval] 3484 - Y: (_){ matchN(1, (#list){ 3485 - 0: (_|_){// 〈1;X〉 3486 - } 3487 - }) } 3488 - X: (struct){ 3489 - b?: (_){ matchN(1, (#list){ 3490 - 0: (_|_){// 〈1;X〉 3491 - } 3492 - }) } 3493 - } 3494 - a: (_|_){ 3495 - // [eval] 3496 - b: (_|_){ 3497 - // [eval] embed.openValidator.t2.a.b: conflicting values 1 and {b?:Y} (mismatched types int and struct): 3498 - // ./validators.cue:25:16 3499 - // ./validators.cue:26:5 3500 - // ./validators.cue:26:9 3501 - // ./validators.cue:27:5 3502 - // ./validators.cue:28:8 3503 - // embed.openValidator.t2.a.b: invalid value 1 (does not satisfy matchN): 0 matched, expected 1: 3504 - // ./validators.cue:25:5 3505 - // ./validators.cue:25:12 3506 - // ./validators.cue:26:9 3507 - // ./validators.cue:28:8 3508 - } 3509 - } 3510 - } 3511 - } 3512 - nestedValidator: (struct){ 3513 - #types: (#struct){ 3514 - z?: (list){ list.UniqueItems() } 3515 - } 3516 - x: (#struct){ 3517 - y: (#struct){ 3518 - z: (#list){ 3519 - 0: (int){ 1 } 3520 - } 3521 - } 3522 - } 3523 - #def: (#struct){ 3524 - } 3525 - } 3526 - } 3527 - and: (_|_){ 3528 - // [eval] 3529 - transitive: (_|_){ 3530 - // [eval] 3531 - ok: (struct){ 3532 - Z: (struct){ 3533 - a: (string){ string } 3534 - } 3535 - #Y: (#struct){ 3536 - a: (string){ string } 3537 - } 3538 - #X: (#struct){ 3539 - a: (string){ string } 3540 - } 3541 - out: (#struct){ 3542 - a: (string){ "foo" } 3543 - } 3544 - } 3545 - err: (_|_){ 3546 - // [eval] 3547 - Z: (struct){ 3548 - a: (string){ string } 3549 - } 3550 - #Y: (#struct){ 3551 - a: (string){ string } 3552 - } 3553 - #X: (#struct){ 3554 - a: (string){ string } 3555 - } 3556 - out: (_|_){ 3557 - // [eval] 3558 - a: (string){ string } 3559 - err: (_|_){ 3560 - // [eval] and.transitive.err.out.err: field not allowed: 3561 - // ./in.cue:42:5 3562 - // ./in.cue:43:6 3563 - // ./in.cue:44:6 3564 - // ./in.cue:44:11 3565 - // ./in.cue:45:7 3566 - // ./in.cue:46:3 3567 - } 3568 - } 3569 - } 3570 - } 3571 - transitiveWithEmbed: (_|_){ 3572 - // [eval] 3573 - ok: (struct){ 3574 - Z: (struct){ 3575 - a: (string){ string } 3576 - } 3577 - #X: (#struct){ 3578 - a: (string){ string } 3579 - } 3580 - #Y: (#struct){ 3581 - a: (string){ string } 3582 - } 3583 - out: (#struct){ 3584 - a: (string){ "foo" } 3585 - } 3586 - } 3587 - err: (_|_){ 3588 - // [eval] 3589 - Z: (struct){ 3590 - a: (string){ string } 3591 - } 3592 - #X: (#struct){ 3593 - a: (string){ string } 3594 - } 3595 - #Y: (#struct){ 3596 - a: (string){ string } 3597 - } 3598 - out: (_|_){ 3599 - // [eval] 3600 - a: (string){ string } 3601 - err: (_|_){ 3602 - // [eval] and.transitiveWithEmbed.err.out.err: field not allowed: 3603 - // ./in.cue:58:5 3604 - // ./in.cue:59:6 3605 - // ./in.cue:59:11 3606 - // ./in.cue:60:6 3607 - // ./in.cue:60:7 3608 - // ./in.cue:61:7 3609 - // ./in.cue:62:3 3610 - } 3611 - } 3612 - } 3613 - } 3614 - } 3615 - embedInline: (struct){ 3616 - #Schema: (#struct){ 3617 - a: (string){ "hello" } 3618 - b: (#struct){ 3619 - c: (string){ "foo" } 3620 - d: (string){ "never printed" } 3621 - } 3622 - } 3623 - out: (#struct){ 3624 - a: (string){ "hello" } 3625 - b: (#struct){ 3626 - c: (string){ "foo" } 3627 - d: (string){ "never printed" } 3628 - } 3629 - } 3630 - } 3631 - issue3853: (struct){ 3632 - #Schema: (#struct){ 3633 - a: (string){ "hello" } 3634 - b: (#struct){ 3635 - c: (string){ "foo" } 3636 - d: (string){ "never printed" } 3637 - } 3638 - } 3639 - out: (string){ "hello" } 3640 - } 3641 - issue3832: (#struct){ 3642 - _person: (struct){ 3643 - self: (struct){ 3644 - firstName: (string){ "Sam" } 3645 - } 3646 - } 3647 - #T: (#struct){ 3648 - _subject: (#struct){ 3649 - in: (_){ _ } 3650 - out: (#struct){ 3651 - let self#2 = (_|_){ 3652 - // [incomplete] issue3832.#T._subject.out.self: in.self undefined as in is incomplete (type _): 3653 - // ./issue3832.cue:8:16 3654 - } 3655 - outFirstName: (_|_){ 3656 - // [incomplete] issue3832.#T._subject.out.self: in.self undefined as in is incomplete (type _): 3657 - // ./issue3832.cue:8:16 3658 - } 3659 - } 3660 - } 3661 - _assert: (#struct){ |((#struct){ 3662 - pass: (string){ "never" } 3663 - check!: (_){ _ } 3664 - }, (#struct){ 3665 - pass: (#struct){ 3666 - let self#2 = (_|_){ 3667 - // [incomplete] issue3832.#T._assert.pass.self: in.self undefined (in is incomplete): 3668 - // ./issue3832.cue:8:16 3669 - } 3670 - outFirstName: (_|_){ 3671 - // [incomplete] issue3832.#T._assert.pass.self: in.self undefined (in is incomplete): 3672 - // ./issue3832.cue:8:16 3673 - } 3674 - } 3675 - invoke!: (_){ _ } 3676 - }) } 3677 - results: (_|_){ 3678 - // [incomplete] issue3832.#T.results: unresolved disjunction {pass:"never",check!:_} | {pass:{let self#2=_|_(issue3832.#T._assert.pass.self: in.self undefined (in is incomplete)),outFirstName:_|_(issue3832.#T._assert.pass.self: in.self undefined (in is incomplete))},invoke!:_} (type struct): 3679 - // ./issue3832.cue:20:12 3680 - } 3681 - } 3682 - _subject: (#struct){ 3683 - in: (_){ _ } 3684 - out: (#struct){ 3685 - let self#2 = (_|_){ 3686 - // [incomplete] issue3832._subject.out.self: in.self undefined as in is incomplete (type _): 3687 - // ./issue3832.cue:8:16 3688 - } 3689 - outFirstName: (_|_){ 3690 - // [incomplete] issue3832._subject.out.self: in.self undefined as in is incomplete (type _): 3691 - // ./issue3832.cue:8:16 3692 - } 3693 - } 3694 - } 3695 - _assert: (#struct){ 3696 - pass: (#struct){ 3697 - let self#2 = (#struct){ 3698 - firstName: (string){ "Sam" } 3699 - } 3700 - outFirstName: (string){ "Sam" } 3701 - } 3702 - invoke: (struct){ 3703 - self: (struct){ 3704 - firstName: (string){ "Sam" } 3705 - } 3706 - } 3707 - } 3708 - results: (#struct){ 3709 - let self#2 = (#struct){ 3710 - firstName: (string){ "Sam" } 3711 - } 3712 - outFirstName: (string){ "Sam" } 3713 - } 3714 - } 3715 - issue3833: (struct){ 3716 - ok: (struct){ 3717 - out: (#struct){ 3718 - a: (#struct){ 3719 - b: (string){ "foo" } 3720 - c: (string){ "foo" } 3721 - } 3722 - } 3723 - #A: (#struct){ 3724 - a: (#struct){ 3725 - b: (string){ string } 3726 - } 3727 - } 3728 - #C: (#struct){ 3729 - c: (string){ string } 3730 - } 3731 - #B: (#struct){ 3732 - c: (string){ "foo" } 3733 - b: (string){ "foo" } 3734 - } 3735 - } 3736 - evalv2Issue: (struct){ 3737 - out: (#struct){ 3738 - a: (#struct){ 3739 - b: (string){ "foo" } 3740 - c: (string){ "foo" } 3741 - } 3742 - } 3743 - #A: (#struct){ 3744 - a: (#struct){ 3745 - b: (string){ string } 3746 - } 3747 - } 3748 - #C: (#struct){ 3749 - c: (string){ string } 3750 - } 3751 - #B: (#struct){ 3752 - c: (string){ "foo" } 3753 - b: (string){ "foo" } 3754 - } 3755 - } 3756 - } 3757 - issue3837: (struct){ 3758 - reduced: (struct){ 3759 - A: (#struct){ 3760 - extra: (string){ "foo" } 3761 - } 3762 - out: (struct){ 3763 - x: (#struct){ 3764 - extra: (string){ "foo" } 3765 - } 3766 - } 3767 - #Embed: (#struct){ 3768 - } 3769 - } 3770 - full: (struct){ 3771 - #Embed: (#struct){ 3772 - } 3773 - #A: (#struct){ 3774 - extra: (string){ "foo" } 3775 - } 3776 - #B: (#struct){ |((#struct){ 3777 - bar: (string){ string } 3778 - }, (#struct){ 3779 - }) } 3780 - #C: (#struct){ 3781 - bar: (string){ string } 3782 - } 3783 - out: (#struct){ 3784 - bar: (string){ "baz" } 3785 - #def: (#struct){ 3786 - extra: (string){ "foo" } 3787 - } 3788 - } 3789 - } 3790 - } 3791 - issue3839: (struct){ 3792 - reduced: (struct){ 3793 - x: (#struct){ 3794 - y: (int){ 1 } 3795 - } 3796 - #B: (#struct){ 3797 - } 3798 - A: (#struct){ 3799 - } 3800 - } 3801 - full: (struct){ 3802 - _globals: (struct){ 3803 - glb: (struct){ 3804 - globalField: (string){ "" } 3805 - } 3806 - } 3807 - #GlobalContext: (#struct){ 3808 - globalField: (string){ string } 3809 - } 3810 - #Context: (#struct){ 3811 - glb: (#struct){ 3812 - globalField: (string){ string } 3813 - } 3814 - out: (#struct){ 3815 - globalField: (string){ string } 3816 - } 3817 - } 3818 - out: (struct){ 3819 - ingress: (#struct){ 3820 - #def: (#struct){ 3821 - globalField: (string){ "" } 3822 - } 3823 - foo: (int){ 1234 } 3824 - bar: (string){ "http" } 3825 - } 3826 - } 3827 - #Embed: (#struct){ 3828 - #def: (#struct){ 3829 - } 3830 - } 3831 - #Ingress: (#struct){ 3832 - #def: (#struct){ 3833 - } 3834 - } 3835 - } 3836 - } 3837 - dedupPattern: (struct){ 3838 - t1: (struct){ 3839 - p1: (struct){ 3840 - A: (struct){ 3841 - #Z: (#struct){ 3842 - } 3843 - x: (#struct){ 3844 - y: (struct){ 3845 - z: (int){ 1 } 3846 - } 3847 - } 3848 - } 3849 - B: (struct){ 3850 - #Z: (#struct){ 3851 - } 3852 - x: (#struct){ 3853 - y: (struct){ 3854 - z: (int){ 1 } 3855 - } 3856 - } 3857 - } 3858 - out: (#struct){ 3859 - y: (struct){ 3860 - z: (int){ 1 } 3861 - } 3862 - } 3863 - } 3864 - p2: (struct){ 3865 - A: (struct){ 3866 - #Z: (#struct){ 3867 - } 3868 - x: (#struct){ 3869 - y: (struct){ 3870 - z: (int){ 1 } 3871 - } 3872 - } 3873 - } 3874 - B: (struct){ 3875 - #Z: (#struct){ 3876 - } 3877 - x: (#struct){ 3878 - y: (struct){ 3879 - z: (int){ 1 } 3880 - } 3881 - } 3882 - } 3883 - out: (#struct){ 3884 - y: (struct){ 3885 - z: (int){ 1 } 3886 - } 3887 - } 3888 - } 3889 - } 3890 - } 3891 - orig: (struct){ 3892 - t1: (#struct){ 3893 - #Image: (#struct){ 3894 - embed: (#struct){ 3895 - image: (string){ "foo:v1" } 3896 - } 3897 - } 3898 - #JobConfig: (#struct){ 3899 - image: (#struct){ 3900 - embed: (#struct){ 3901 - image: (string){ "foo:v1" } 3902 - } 3903 - } 3904 - job: (#struct){ 3905 - image: (string){ "foo:v1" } 3906 - vcs: (string){ "git" } 3907 - args: (list){ 3908 - } 3909 - env: (#struct){ 3910 - } 3911 - } 3912 - } 3913 - #Job: (#struct){ 3914 - image: (string){ string } 3915 - vcs: (string){ "git" } 3916 - args: (list){ 3917 - } 3918 - env: (#struct){ 3919 - } 3920 - } 3921 - #Output: (#struct){ 3922 - _in: (_){ _ } 3923 - out: (#struct){ 3924 - } 3925 - } 3926 - _in: (#struct){ 3927 - image: (string){ "foo:v1" } 3928 - vcs: (string){ "git" } 3929 - args: (list){ 3930 - } 3931 - env: (#struct){ 3932 - } 3933 - } 3934 - out: (#struct){ 3935 - image: (string){ "foo:v1" } 3936 - vcs: (string){ "git" } 3937 - args: (list){ 3938 - } 3939 - env: (#struct){ 3940 - } 3941 - } 3942 - } 3943 - t2: (struct){ 3944 - #JobConfig: (#struct){ 3945 - image: (#struct){ 3946 - spec: (#struct){ 3947 - image: (string){ "someimage" } 3948 - } 3949 - } 3950 - job: (#struct){ 3951 - image: (string){ "someimage" } 3952 - env: (string){ "FOO" } 3953 - } 3954 - } 3955 - #Job: (#struct){ 3956 - image: (string){ string } 3957 - env: (string){ "FOO" } 3958 - } 3959 - #Output: (#struct){ 3960 - in: (_){ _ } 3961 - out: (_|_){ 3962 - // [incomplete] orig.t2.#Output.out: undefined field: input: 3963 - // ./issue3858.cue:55:18 3964 - } 3965 - } 3966 - out: (#struct){ 3967 - in: (struct){ 3968 - input: (#struct){ 3969 - image: (string){ "someimage" } 3970 - env: (string){ "FOO" } 3971 - } 3972 - } 3973 - out: (#struct){ 3974 - image: (string){ "someimage" } 3975 - env: (string){ "FOO" } 3976 - } 3977 - } 3978 - } 3979 - } 3980 - reduced: (struct){ 3981 - t1: (#struct){ 3982 - Y: (struct){ 3983 - a: (struct){ 3984 - e: (string){ "foo" } 3985 - } 3986 - b: (struct){ 3987 - e: (string){ "foo" } 3988 - f: (int){ 1 } 3989 - } 3990 - } 3991 - X: (struct){ 3992 - e: (string){ string } 3993 - f: (int){ 1 } 3994 - } 3995 - #Z: (#struct){ 3996 - _in: (_){ _ } 3997 - out: (_){ _ } 3998 - } 3999 - _in: (struct){ 4000 - a: (struct){ 4001 - e: (string){ "foo" } 4002 - } 4003 - b: (struct){ 4004 - e: (string){ "foo" } 4005 - f: (int){ 1 } 4006 - } 4007 - } 4008 - out: (#struct){ 4009 - a: (#struct){ 4010 - e: (string){ "foo" } 4011 - } 4012 - b: (#struct){ 4013 - e: (string){ "foo" } 4014 - f: (int){ 1 } 4015 - } 4016 - } 4017 - } 4018 - t2: (#struct){ 4019 - Y: (struct){ 4020 - a: (struct){ 4021 - e: (string){ "foo" } 4022 - } 4023 - b: (struct){ 4024 - e: (string){ "foo" } 4025 - f: (int){ 1 } 4026 - } 4027 - } 4028 - X: (struct){ 4029 - e: (string){ string } 4030 - f: (int){ 1 } 4031 - } 4032 - #Z: (#struct){ 4033 - _in: (_){ _ } 4034 - out: (_){ _ } 4035 - } 4036 - _in: (struct){ 4037 - a: (struct){ 4038 - e: (string){ "foo" } 4039 - } 4040 - b: (struct){ 4041 - e: (string){ "foo" } 4042 - f: (int){ 1 } 4043 - } 4044 - } 4045 - out: (#struct){ 4046 - a: (#struct){ 4047 - e: (string){ "foo" } 4048 - } 4049 - b: (#struct){ 4050 - e: (string){ "foo" } 4051 - f: (int){ 1 } 4052 - } 4053 - } 4054 - } 4055 - } 4056 - issue3934: (struct){ 4057 - out: (#struct){ 4058 - foo: ((null|struct)){ |(*(#struct){ 4059 - bar: (int){ 3 } 4060 - }, (#struct){ 4061 - extra?: ((null|struct)){ |((null){ null }, (#struct){ 4062 - }) } 4063 - bar?: (int){ int } 4064 - }, (null){ null }) } 4065 - } 4066 - #Foo: (#struct){ 4067 - foo?: ((null|struct)){ |(*(#struct){ 4068 - bar: (int){ 3 } 4069 - }, (#struct){ 4070 - bar?: (int){ int } 4071 - extra?: ((null|struct)){ |((null){ null }, (#struct){ 4072 - }) } 4073 - }, (null){ null }) } 4074 - } 4075 - #Bar: (#struct){ 4076 - bar?: (int){ int } 4077 - extra?: ((null|struct)){ |((null){ null }, (#struct){ 4078 - }) } 4079 - } 4080 - } 4081 - issue3964: (struct){ 4082 - reduced: (struct){ 4083 - #Output: (#struct){ 4084 - name: (string){ string } 4085 - } 4086 - #Embedded: (#struct){ 4087 - name: (string){ string } 4088 - } 4089 - #Unused: (#struct){ 4090 - } 4091 - #Used: (#struct){ 4092 - } 4093 - } 4094 - full: (struct){ 4095 - out: (#struct){ 4096 - name: (string){ "oauth2" } 4097 - used: (string){ "bar" } 4098 - } 4099 - #Output: (#struct){ |((#struct){ 4100 - name: (string){ string } 4101 - unused: (string){ string } 4102 - }, (#struct){ 4103 - name: (string){ string } 4104 - used: (string){ string } 4105 - }) } 4106 - #Embedded: (#struct){ |((#struct){ 4107 - name: (string){ string } 4108 - unused: (string){ string } 4109 - }, (#struct){ 4110 - name: (string){ string } 4111 - used: (string){ string } 4112 - }) } 4113 - #Unused: (#struct){ 4114 - unused: (string){ string } 4115 - } 4116 - #Used: (#struct){ 4117 - used: (string){ string } 4118 - } 4119 - } 4120 - } 4121 - full: (struct){ 4122 - #Resource: (#struct){ 4123 - someMsg: (string){ string } 4124 - obs: (#struct){ |(*(#struct){ 4125 - missing: (bool){ true } 4126 - }, (#struct){ 4127 - }) } 4128 - let pickMsg#3 = (#struct){ 4129 - msg: (_|_){ 4130 - // [incomplete] full.#Resource.pickMsg.msg: invalid interpolation: non-concrete value string (type string): 4131 - // ./large.cue:7:25 4132 - // ./large.cue:3:12 4133 - } 4134 - } 4135 - patches: (#list){ 4136 - 0: (#struct){ 4137 - op: (string){ "add" } 4138 - path: (string){ "/metadata" } 4139 - value: (_|_){ 4140 - // [incomplete] full.#Resource.patches.0.value: invalid interpolation: non-concrete value string (type string): 4141 - // ./large.cue:7:25 4142 - // ./large.cue:3:12 4143 - } 4144 - } 4145 - } 4146 - } 4147 - #Patches: (#struct){ 4148 - } 4149 - #JSONPatch: (#struct){ 4150 - namespace?: (string){ string } 4151 - patch: (list){ 4152 - } 4153 - output: (_|_){ 4154 - // [incomplete] full.#JSONPatch.output: cannot reference optional field: namespace: 4155 - // ./large.cue:21:24 4156 - } 4157 - } 4158 - #JSONOp: (#struct){ |((#struct){ 4159 - op: (string){ "add" } 4160 - path: (string){ string } 4161 - value: (_){ _ } 4162 - }, (#struct){ 4163 - op: (string){ "remove" } 4164 - path: (string){ string } 4165 - }) } 4166 - #Main: (#struct){ 4167 - namespace: (string){ string } 4168 - output: (_|_){ 4169 - // [incomplete] full.#Main.output: invalid non-ground value string (must be concrete string): 4170 - // ./large.cue:19:15 4171 - // ./large.cue:41:15 4172 - _: (#list){ 4173 - 0: (#struct){ 4174 - op: (string){ "add" } 4175 - path: (string){ "/metadata" } 4176 - value: (string){ "foo" } 4177 - } 4178 - } 4179 - } 4180 - let jsonPatch#4 = (#struct){ 4181 - namespace: (string){ string } 4182 - patch: (#list){ 4183 - 0: (#struct){ 4184 - op: (string){ "add" } 4185 - path: (string){ "/metadata" } 4186 - value: (string){ "foo" } 4187 - } 4188 - } 4189 - output: (_|_){ 4190 - // [incomplete] full.#Main.jsonPatch.output: invalid non-ground value string (must be concrete string): 4191 - // ./large.cue:19:15 4192 - // ./large.cue:41:15 4193 - _: (#list){ 4194 - 0: (#struct){ 4195 - op: (string){ "add" } 4196 - path: (string){ "/metadata" } 4197 - value: (string){ "foo" } 4198 - } 4199 - } 4200 - } 4201 - let base#7 = (#struct){ 4202 - someMsg: (string){ string } 4203 - obs: (#struct){ |(*(#struct){ 4204 - missing: (bool){ true } 4205 - }, (#struct){ 4206 - }) } 4207 - let pickMsg#3 = (#struct){ 4208 - msg: (_|_){ 4209 - // [incomplete] full.#Main.jsonPatch.base.pickMsg.msg: invalid interpolation: non-concrete value string (type string): 4210 - // ./large.cue:7:25 4211 - // ./large.cue:3:12 4212 - } 4213 - } 4214 - patches: (#list){ 4215 - 0: (#struct){ 4216 - op: (string){ "add" } 4217 - path: (string){ "/metadata" } 4218 - value: (_|_){ 4219 - // [incomplete] full.#Main.jsonPatch.base.patches.0.value: invalid interpolation: non-concrete value string (type string): 4220 - // ./large.cue:7:25 4221 - // ./large.cue:3:12 4222 - } 4223 - } 4224 - } 4225 - } 4226 - let withMsg#8 = (#struct){ 4227 - someMsg: (string){ "foo" } 4228 - obs: (#struct){ |(*(#struct){ 4229 - missing: (bool){ true } 4230 - }, (#struct){ 4231 - }) } 4232 - let pickMsg#3 = (#struct){ 4233 - msg: (string){ "foo" } 4234 - } 4235 - patches: (#list){ 4236 - 0: (#struct){ 4237 - op: (string){ "add" } 4238 - path: (string){ "/metadata" } 4239 - value: (string){ "foo" } 4240 - } 4241 - } 4242 - } 4243 - } 4244 - } 4245 - out: (#struct){ 4246 - ns1: (#list){ 4247 - 0: (#struct){ 4248 - op: (string){ "add" } 4249 - path: (string){ "/metadata" } 4250 - value: (string){ "foo" } 4251 - } 4252 - } 4253 - } 4254 - } 4255 - disjunction: (struct){ 4256 - withErr: (struct){ 4257 - t1: (struct){ 4258 - params: (struct){ 4259 - } 4260 - out: (#struct){ 4261 - b1: (_|_){ 4262 - // [incomplete] disjunction.withErr.t1.out.b1: 4 errors in empty disjunction: 4263 - // disjunction.withErr.t1.out.b1: conflicting values null and {b2:{b3:params.mayExistLater}} (mismatched types null and struct): 4264 - // ./validators.cue:33:7 4265 - // ./validators.cue:35:17 4266 - // disjunction.withErr.t1.out.b1.b2: 2 errors in empty disjunction: 4267 - // disjunction.withErr.t1.out.b1.b2: conflicting values null and {b3:params.mayExistLater} (mismatched types null and struct): 4268 - // ./validators.cue:33:11 4269 - // ./validators.cue:36:17 4270 - // disjunction.withErr.t1.out.b1.b2.b3: undefined field: mayExistLater: 4271 - // ./validators.cue:33:22 4272 - b2: (_|_){ 4273 - // [incomplete] disjunction.withErr.t1.out.b1.b2: 2 errors in empty disjunction: 4274 - // disjunction.withErr.t1.out.b1.b2: conflicting values null and {b3:params.mayExistLater} (mismatched types null and struct): 4275 - // ./validators.cue:33:11 4276 - // ./validators.cue:36:17 4277 - // disjunction.withErr.t1.out.b1.b2.b3: undefined field: mayExistLater: 4278 - // ./validators.cue:33:22 4279 - b3: (_|_){ 4280 - // [incomplete] disjunction.withErr.t1.out.b1.b2.b3: undefined field: mayExistLater: 4281 - // ./validators.cue:33:22 4282 - } 4283 - } 4284 - } 4285 - } 4286 - #Schema1: (#struct){ 4287 - b1?: ((null|struct)){ |((null){ null }, (#struct){ 4288 - b2?: ((null|struct)){ |((null){ null }, (#struct){ 4289 - b3?: (string){ string } 4290 - }) } 4291 - }) } 4292 - } 4293 - #Schema2: (#struct){ 4294 - b2?: ((null|struct)){ |((null){ null }, (#struct){ 4295 - b3?: (string){ string } 4296 - }) } 4297 - } 4298 - } 4299 - } 4300 - } 4301 - } 1037 + ./validators.cue:30:5 1038 + ./validators.cue:30:12 1039 + ./validators.cue:31:9 1040 + ./validators.cue:33:8 1041 + [eval] and.transitive.err.out.err: field not allowed: 1042 + ./in.cue:65:3 1043 + [eval] and.transitiveWithEmbed.err.out.err: field not allowed: 1044 + ./in.cue:88:3 1045 + [incomplete] issue3832.#T._subject.out.outFirstName: undefined field: firstName: 1046 + ./issue3832.cue:12:24 1047 + [incomplete] issue3832.#T.results: unresolved disjunction {pass:"never",check!:_} | {pass:{let self#2=_|_(issue3832.#T._assert.pass.self: undefined field: self),outFirstName:_|_(issue3832.#T._assert.pass.outFirstName: undefined field: firstName)},invoke!:_} (type struct): 1048 + ./issue3832.cue:25:12 1049 + [incomplete] issue3832._subject.out.outFirstName: undefined field: firstName: 1050 + ./issue3832.cue:12:24 1051 + [eval] issue3833.evalv2Issue.out.a.c: field not allowed: 1052 + ./issue3833.cue:29:6 1053 + ./issue3833.cue:31:9 1054 + [incomplete] orig.t2.#Output.out: undefined field: input: 1055 + ./issue3858.cue:74:18 1056 + [incomplete] full.#Resource.pickMsg.msg: invalid interpolation: non-concrete value string (type string): 1057 + ./large.cue:7:25 1058 + ./large.cue:3:12 1059 + [incomplete] full.#JSONPatch.output: cannot reference optional field: namespace: 1060 + ./large.cue:21:24 1061 + [incomplete] full.#Main.jsonPatch.output: key value of dynamic field must be concrete, found string: 1062 + ./large.cue:21:24 1063 + ./large.cue:19:15 1064 + [incomplete] disjunction.withErr.t1.out.b1: 4 errors in empty disjunction: 1065 + disjunction.withErr.t1.out.b1: conflicting values {b2:{b3:params.mayExistLater}} and null (mismatched types struct and null): 1066 + ./validators.cue:39:7 1067 + ./validators.cue:40:7 1068 + ./validators.cue:42:17 1069 + disjunction.withErr.t1.out.b1.b2: 2 errors in empty disjunction: 1070 + disjunction.withErr.t1.out.b1.b2: conflicting values {b3:params.mayExistLater} and null (mismatched types struct and null): 1071 + ./validators.cue:39:7 1072 + ./validators.cue:40:11 1073 + ./validators.cue:42:24 1074 + ./validators.cue:43:17 1075 + disjunction.withErr.t1.out.b1.b2.b3: undefined field: mayExistLater: 1076 + ./validators.cue:40:22 1077 + -- out/diff-v2-v3.txt -- 1078 + Errors differ between v2 and v3 evaluators (v3 reports fewer positions). 1079 + Structure sharing differences between v2 and v3. 1080 + Verdict: mix -- improvement: v3 uses structure sharing. worsening: v3 reports fewer error positions. 4302 1081 -- out/compile -- 4303 1082 --- chaineddef.cue 4304 1083 {