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