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