cuelang.org/go@v0.10.1/cue/testdata/comprehensions/issue837.txtar (about)

     1  -- in.cue --
     2  #DeploymentManifest: #Manifest & {ref: kind: "deployment"}
     3  
     4  #Manifest: {
     5  	ref:         #ManifestRef
     6  	description: #KumoriKinds[ref.kind]
     7  }
     8  
     9  #ManifestRef: kind: #KindsNames
    10  
    11  #KindsNames: "service" | "deployment"
    12  
    13  #KumoriKinds: deployment: #Deployment
    14  #KumoriKinds: [string]: {...}
    15  
    16  #DoDeploy: {
    17  	_params: manifest: #DeploymentManifest
    18  	deployment: {
    19  		description: {
    20  			let dep = _params.manifest.description
    21  			service: (#Configure & {
    22  				_params: hsize: dep.hsize
    23  			}).service
    24  		}
    25  	}
    26  }
    27  
    28  #Configure: {
    29  	$p=_params: {
    30  		hsize: [string]: #RoleSize
    31  	}
    32  	service: {
    33  		description: {
    34  			let configed = (#RelabelService & {
    35  				_params: {
    36  					hsize: $p.hsize
    37  				}
    38  				role: "admin"
    39  			}).out
    40  
    41  			role: configed.role
    42  		}
    43  	}
    44  }
    45  
    46  #RelabelService: {
    47  	$p=_params: {
    48  		hsize: #RoleSize
    49  	}
    50  
    51  	out: {
    52  		labstr: $p.label
    53  	}
    54  }
    55  
    56  #RoleSize: {
    57  	$_instances: >=0 | *1
    58  }
    59  
    60  #Deployment: {
    61  	service: #ServiceManifest
    62  	hsize: [service.description.#roles]: #RoleSize
    63  }
    64  
    65  #ServiceManifest: #Manifest & {ref: kind: "service"}
    66  -- out/evalalpha/stats --
    67  Leaks:  123
    68  Freed:  10
    69  Reused: 9
    70  Allocs: 124
    71  Retain: 0
    72  
    73  Unifications: 95
    74  Conjuncts:    563
    75  Disjuncts:    30
    76  -- out/evalalpha --
    77  Errors:
    78  _params.hsize.$_instances: conflicting values 1 and {$_instances:(>=0|*1)} (mismatched types int and struct):
    79      ./in.cue:55:12
    80      ./in.cue:56:22
    81  _params.hsize.$_instances: conflicting values >=0 and {$_instances:(>=0|*1)} (mismatched types number and struct):
    82      ./in.cue:55:12
    83      ./in.cue:56:15
    84  #DoDeploy.deployment.description.dep.service.description: undefined field: service:
    85      ./in.cue:5:28
    86  _params.hsize.$_instances.$_instances: field not allowed:
    87      ./in.cue:33:20
    88      ./in.cue:56:2
    89  #RelabelService.out.labstr: undefined field: label:
    90      ./in.cue:51:14
    91  _params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int):
    92      ./in.cue:56:15
    93      ./in.cue:56:17
    94  _params.hsize.$_instances.$_instances: field not allowed:
    95      ./in.cue:56:15
    96      ./in.cue:56:2
    97  
    98  Result:
    99  (_|_){
   100    // [eval]
   101    #DeploymentManifest: (#struct){
   102      ref: (#struct){
   103        kind: (string){ "deployment" }
   104      }
   105      description: (#struct){
   106        service: (#struct){
   107          ref: (#struct){
   108            kind: (string){ "service" }
   109          }
   110          description: (_|_){
   111            // [incomplete] #ServiceManifest.description: undefined field: service:
   112            //     ./in.cue:5:28
   113          }
   114        }
   115        hsize: (_|_){
   116          // [incomplete] #ServiceManifest.description: undefined field: service:
   117          //     ./in.cue:5:28
   118        }
   119      }
   120    }
   121    #Manifest: (#struct){
   122      ref: (#struct){
   123        kind: (string){ |((string){ "service" }, (string){ "deployment" }) }
   124      }
   125      description: (_|_){
   126        // [incomplete] #Manifest.description: unresolved disjunction "service" | "deployment" (type string):
   127        //     ./in.cue:5:15
   128      }
   129    }
   130    #ManifestRef: (#struct){
   131      kind: (string){ |((string){ "service" }, (string){ "deployment" }) }
   132    }
   133    #KindsNames: (string){ |((string){ "service" }, (string){ "deployment" }) }
   134    #KumoriKinds: (#struct){
   135      deployment: (#struct){
   136        service: (#struct){
   137          ref: (#struct){
   138            kind: (string){ "service" }
   139          }
   140          description: (_|_){
   141            // [incomplete] #ServiceManifest.description: undefined field: service:
   142            //     ./in.cue:5:28
   143          }
   144        }
   145        hsize: (_|_){
   146          // [incomplete] #ServiceManifest.description: undefined field: service:
   147          //     ./in.cue:5:28
   148        }
   149      }
   150    }
   151    #DoDeploy: (_|_){
   152      // [eval]
   153      _params: (#struct){
   154        manifest: (#struct){
   155          ref: (#struct){
   156            kind: (string){ "deployment" }
   157          }
   158          description: (#struct){
   159            service: (#struct){
   160              ref: (#struct){
   161                kind: (string){ "service" }
   162              }
   163              description: (_|_){
   164                // [incomplete] #ServiceManifest.description: undefined field: service:
   165                //     ./in.cue:5:28
   166              }
   167            }
   168            hsize: (_|_){
   169              // [incomplete] #ServiceManifest.description: undefined field: service:
   170              //     ./in.cue:5:28
   171            }
   172          }
   173        }
   174      }
   175      deployment: (_|_){
   176        // [eval]
   177        description: (_|_){
   178          // [eval]
   179          let dep#1 = (_|_){
   180            // [eval]
   181            service: (_|_){
   182              // [eval]
   183              ref: (#struct){
   184                kind: (string){ "service" }
   185              }
   186              description: (_|_){
   187                // [eval] #DoDeploy.deployment.description.dep.service.description: undefined field: service:
   188                //     ./in.cue:5:28
   189              }
   190            }
   191            hsize: (_|_){
   192              // [eval] #DoDeploy.deployment.description.dep.service.description: undefined field: service:
   193              //     ./in.cue:5:28
   194            }
   195          }
   196          service: (_|_){
   197            // [eval] #DoDeploy.deployment.description.dep.service.description: undefined field: service:
   198            //     ./in.cue:5:28
   199          }
   200        }
   201      }
   202    }
   203    #Configure: (_|_){
   204      // [eval]
   205      _params: (#struct){
   206        hsize: (#struct){
   207        }
   208      }
   209      service: (_|_){
   210        // [eval]
   211        description: (_|_){
   212          // [eval]
   213          let configed#2 = (_|_){
   214            // [eval] _params.hsize.$_instances: conflicting values 1 and {$_instances:(>=0|*1)} (mismatched types int and struct):
   215            //     ./in.cue:55:12
   216            //     ./in.cue:56:22
   217            // _params.hsize.$_instances: conflicting values >=0 and {$_instances:(>=0|*1)} (mismatched types number and struct):
   218            //     ./in.cue:55:12
   219            //     ./in.cue:56:15
   220            // _params.hsize.$_instances.$_instances: field not allowed:
   221            //     ./in.cue:33:20
   222            //     ./in.cue:56:2
   223            // _params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int):
   224            //     ./in.cue:56:15
   225            //     ./in.cue:56:17
   226            // _params.hsize.$_instances.$_instances: field not allowed:
   227            //     ./in.cue:56:15
   228            //     ./in.cue:56:2
   229          }
   230          role: (_|_){
   231            // [eval] _params.hsize.$_instances: conflicting values 1 and {$_instances:(>=0|*1)} (mismatched types int and struct):
   232            //     ./in.cue:55:12
   233            //     ./in.cue:56:22
   234            // _params.hsize.$_instances: conflicting values >=0 and {$_instances:(>=0|*1)} (mismatched types number and struct):
   235            //     ./in.cue:55:12
   236            //     ./in.cue:56:15
   237            // _params.hsize.$_instances.$_instances: field not allowed:
   238            //     ./in.cue:33:20
   239            //     ./in.cue:56:2
   240            // _params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int):
   241            //     ./in.cue:56:15
   242            //     ./in.cue:56:17
   243            // _params.hsize.$_instances.$_instances: field not allowed:
   244            //     ./in.cue:56:15
   245            //     ./in.cue:56:2
   246          }
   247        }
   248      }
   249    }
   250    #RelabelService: (_|_){
   251      // [eval]
   252      _params: (#struct){
   253        hsize: (#struct){
   254          $_instances: (number){ |(*(int){ 1 }, (number){ >=0 }) }
   255        }
   256      }
   257      out: (_|_){
   258        // [eval]
   259        labstr: (_|_){
   260          // [eval] #RelabelService.out.labstr: undefined field: label:
   261          //     ./in.cue:51:14
   262        }
   263      }
   264    }
   265    #RoleSize: (#struct){
   266      $_instances: (number){ |(*(int){ 1 }, (number){ >=0 }) }
   267    }
   268    #Deployment: (#struct){
   269      service: (#struct){
   270        ref: (#struct){
   271          kind: (string){ "service" }
   272        }
   273        description: (_|_){
   274          // [incomplete] #ServiceManifest.description: undefined field: service:
   275          //     ./in.cue:5:28
   276        }
   277      }
   278      hsize: (_|_){
   279        // [incomplete] #ServiceManifest.description: undefined field: service:
   280        //     ./in.cue:5:28
   281      }
   282    }
   283    #ServiceManifest: (#struct){
   284      ref: (#struct){
   285        kind: (string){ "service" }
   286      }
   287      description: (_|_){
   288        // [incomplete] #ServiceManifest.description: undefined field: service:
   289        //     ./in.cue:5:28
   290      }
   291    }
   292  }
   293  -- diff/-out/evalalpha<==>+out/eval --
   294  diff old new
   295  --- old
   296  +++ new
   297  @@ -1,10 +1,23 @@
   298   Errors:
   299  -#Configure.service.description.role: undefined field: role:
   300  -    ./in.cue:40:19
   301  -#DoDeploy.deployment.description.service.description.role: undefined field: role:
   302  -    ./in.cue:40:19
   303  +_params.hsize.$_instances: conflicting values 1 and {$_instances:(>=0|*1)} (mismatched types int and struct):
   304  +    ./in.cue:55:12
   305  +    ./in.cue:56:22
   306  +_params.hsize.$_instances: conflicting values >=0 and {$_instances:(>=0|*1)} (mismatched types number and struct):
   307  +    ./in.cue:55:12
   308  +    ./in.cue:56:15
   309  +#DoDeploy.deployment.description.dep.service.description: undefined field: service:
   310  +    ./in.cue:5:28
   311  +_params.hsize.$_instances.$_instances: field not allowed:
   312  +    ./in.cue:33:20
   313  +    ./in.cue:56:2
   314   #RelabelService.out.labstr: undefined field: label:
   315       ./in.cue:51:14
   316  +_params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int):
   317  +    ./in.cue:56:15
   318  +    ./in.cue:56:17
   319  +_params.hsize.$_instances.$_instances: field not allowed:
   320  +    ./in.cue:56:15
   321  +    ./in.cue:56:2
   322   
   323   Result:
   324   (_|_){
   325  @@ -19,11 +32,13 @@
   326             kind: (string){ "service" }
   327           }
   328           description: (_|_){
   329  -          // [incomplete] #DeploymentManifest.description.service.description: undefined field: service:
   330  -          //     ./in.cue:5:28
   331  -        }
   332  -      }
   333  -      hsize: (#struct){
   334  +          // [incomplete] #ServiceManifest.description: undefined field: service:
   335  +          //     ./in.cue:5:28
   336  +        }
   337  +      }
   338  +      hsize: (_|_){
   339  +        // [incomplete] #ServiceManifest.description: undefined field: service:
   340  +        //     ./in.cue:5:28
   341         }
   342       }
   343     }
   344  @@ -47,11 +62,13 @@
   345             kind: (string){ "service" }
   346           }
   347           description: (_|_){
   348  -          // [incomplete] #KumoriKinds.deployment.service.description: undefined field: service:
   349  -          //     ./in.cue:5:28
   350  -        }
   351  -      }
   352  -      hsize: (#struct){
   353  +          // [incomplete] #ServiceManifest.description: undefined field: service:
   354  +          //     ./in.cue:5:28
   355  +        }
   356  +      }
   357  +      hsize: (_|_){
   358  +        // [incomplete] #ServiceManifest.description: undefined field: service:
   359  +        //     ./in.cue:5:28
   360         }
   361       }
   362     }
   363  @@ -68,11 +85,13 @@
   364                 kind: (string){ "service" }
   365               }
   366               description: (_|_){
   367  -              // [incomplete] #DoDeploy._params.manifest.description.service.description: undefined field: service:
   368  -              //     ./in.cue:5:28
   369  -            }
   370  -          }
   371  -          hsize: (#struct){
   372  +              // [incomplete] #ServiceManifest.description: undefined field: service:
   373  +              //     ./in.cue:5:28
   374  +            }
   375  +          }
   376  +          hsize: (_|_){
   377  +            // [incomplete] #ServiceManifest.description: undefined field: service:
   378  +            //     ./in.cue:5:28
   379             }
   380           }
   381         }
   382  @@ -81,35 +100,26 @@
   383         // [eval]
   384         description: (_|_){
   385           // [eval]
   386  -        let dep#1 = (#struct){
   387  -          service: (#struct){
   388  -            ref: (#struct){
   389  -              kind: (string){ "service" }
   390  -            }
   391  -            description: (_|_){
   392  -              // [incomplete] #DoDeploy.deployment.description.dep.service.description: undefined field: service:
   393  -              //     ./in.cue:5:28
   394  -            }
   395  -          }
   396  -          hsize: (#struct){
   397  -          }
   398  -        }
   399  -        service: (_|_){
   400  -          // [eval]
   401  -          description: (_|_){
   402  +        let dep#1 = (_|_){
   403  +          // [eval]
   404  +          service: (_|_){
   405               // [eval]
   406  -            let configed#2 = (_|_){
   407  -              // [eval]
   408  -              labstr: (_|_){
   409  -                // [eval] #DoDeploy.deployment.description.service.description.configed.labstr: undefined field: label:
   410  -                //     ./in.cue:51:14
   411  -              }
   412  -            }
   413  -            role: (_|_){
   414  -              // [eval] #DoDeploy.deployment.description.service.description.role: undefined field: role:
   415  -              //     ./in.cue:40:19
   416  -            }
   417  -          }
   418  +            ref: (#struct){
   419  +              kind: (string){ "service" }
   420  +            }
   421  +            description: (_|_){
   422  +              // [eval] #DoDeploy.deployment.description.dep.service.description: undefined field: service:
   423  +              //     ./in.cue:5:28
   424  +            }
   425  +          }
   426  +          hsize: (_|_){
   427  +            // [eval] #DoDeploy.deployment.description.dep.service.description: undefined field: service:
   428  +            //     ./in.cue:5:28
   429  +          }
   430  +        }
   431  +        service: (_|_){
   432  +          // [eval] #DoDeploy.deployment.description.dep.service.description: undefined field: service:
   433  +          //     ./in.cue:5:28
   434           }
   435         }
   436       }
   437  @@ -125,15 +135,38 @@
   438         description: (_|_){
   439           // [eval]
   440           let configed#2 = (_|_){
   441  -          // [eval]
   442  -          labstr: (_|_){
   443  -            // [eval] #Configure.service.description.configed.labstr: undefined field: label:
   444  -            //     ./in.cue:51:14
   445  -          }
   446  +          // [eval] _params.hsize.$_instances: conflicting values 1 and {$_instances:(>=0|*1)} (mismatched types int and struct):
   447  +          //     ./in.cue:55:12
   448  +          //     ./in.cue:56:22
   449  +          // _params.hsize.$_instances: conflicting values >=0 and {$_instances:(>=0|*1)} (mismatched types number and struct):
   450  +          //     ./in.cue:55:12
   451  +          //     ./in.cue:56:15
   452  +          // _params.hsize.$_instances.$_instances: field not allowed:
   453  +          //     ./in.cue:33:20
   454  +          //     ./in.cue:56:2
   455  +          // _params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int):
   456  +          //     ./in.cue:56:15
   457  +          //     ./in.cue:56:17
   458  +          // _params.hsize.$_instances.$_instances: field not allowed:
   459  +          //     ./in.cue:56:15
   460  +          //     ./in.cue:56:2
   461           }
   462           role: (_|_){
   463  -          // [eval] #Configure.service.description.role: undefined field: role:
   464  -          //     ./in.cue:40:19
   465  +          // [eval] _params.hsize.$_instances: conflicting values 1 and {$_instances:(>=0|*1)} (mismatched types int and struct):
   466  +          //     ./in.cue:55:12
   467  +          //     ./in.cue:56:22
   468  +          // _params.hsize.$_instances: conflicting values >=0 and {$_instances:(>=0|*1)} (mismatched types number and struct):
   469  +          //     ./in.cue:55:12
   470  +          //     ./in.cue:56:15
   471  +          // _params.hsize.$_instances.$_instances: field not allowed:
   472  +          //     ./in.cue:33:20
   473  +          //     ./in.cue:56:2
   474  +          // _params.hsize.$_instances: invalid operands {$_instances:_|_(_params.hsize.$_instances.$_instances: field not allowed)} and 0 to '>=' (type _|_ and int):
   475  +          //     ./in.cue:56:15
   476  +          //     ./in.cue:56:17
   477  +          // _params.hsize.$_instances.$_instances: field not allowed:
   478  +          //     ./in.cue:56:15
   479  +          //     ./in.cue:56:2
   480           }
   481         }
   482       }
   483  @@ -162,11 +195,13 @@
   484           kind: (string){ "service" }
   485         }
   486         description: (_|_){
   487  -        // [incomplete] #Deployment.service.description: undefined field: service:
   488  -        //     ./in.cue:5:28
   489  -      }
   490  -    }
   491  -    hsize: (#struct){
   492  +        // [incomplete] #ServiceManifest.description: undefined field: service:
   493  +        //     ./in.cue:5:28
   494  +      }
   495  +    }
   496  +    hsize: (_|_){
   497  +      // [incomplete] #ServiceManifest.description: undefined field: service:
   498  +      //     ./in.cue:5:28
   499       }
   500     }
   501     #ServiceManifest: (#struct){
   502  -- out/eval/stats --
   503  Leaks:  16
   504  Freed:  117
   505  Reused: 108
   506  Allocs: 25
   507  Retain: 53
   508  
   509  Unifications: 107
   510  Conjuncts:    243
   511  Disjuncts:    170
   512  -- out/eval --
   513  Errors:
   514  #Configure.service.description.role: undefined field: role:
   515      ./in.cue:40:19
   516  #DoDeploy.deployment.description.service.description.role: undefined field: role:
   517      ./in.cue:40:19
   518  #RelabelService.out.labstr: undefined field: label:
   519      ./in.cue:51:14
   520  
   521  Result:
   522  (_|_){
   523    // [eval]
   524    #DeploymentManifest: (#struct){
   525      ref: (#struct){
   526        kind: (string){ "deployment" }
   527      }
   528      description: (#struct){
   529        service: (#struct){
   530          ref: (#struct){
   531            kind: (string){ "service" }
   532          }
   533          description: (_|_){
   534            // [incomplete] #DeploymentManifest.description.service.description: undefined field: service:
   535            //     ./in.cue:5:28
   536          }
   537        }
   538        hsize: (#struct){
   539        }
   540      }
   541    }
   542    #Manifest: (#struct){
   543      ref: (#struct){
   544        kind: (string){ |((string){ "service" }, (string){ "deployment" }) }
   545      }
   546      description: (_|_){
   547        // [incomplete] #Manifest.description: unresolved disjunction "service" | "deployment" (type string):
   548        //     ./in.cue:5:15
   549      }
   550    }
   551    #ManifestRef: (#struct){
   552      kind: (string){ |((string){ "service" }, (string){ "deployment" }) }
   553    }
   554    #KindsNames: (string){ |((string){ "service" }, (string){ "deployment" }) }
   555    #KumoriKinds: (#struct){
   556      deployment: (#struct){
   557        service: (#struct){
   558          ref: (#struct){
   559            kind: (string){ "service" }
   560          }
   561          description: (_|_){
   562            // [incomplete] #KumoriKinds.deployment.service.description: undefined field: service:
   563            //     ./in.cue:5:28
   564          }
   565        }
   566        hsize: (#struct){
   567        }
   568      }
   569    }
   570    #DoDeploy: (_|_){
   571      // [eval]
   572      _params: (#struct){
   573        manifest: (#struct){
   574          ref: (#struct){
   575            kind: (string){ "deployment" }
   576          }
   577          description: (#struct){
   578            service: (#struct){
   579              ref: (#struct){
   580                kind: (string){ "service" }
   581              }
   582              description: (_|_){
   583                // [incomplete] #DoDeploy._params.manifest.description.service.description: undefined field: service:
   584                //     ./in.cue:5:28
   585              }
   586            }
   587            hsize: (#struct){
   588            }
   589          }
   590        }
   591      }
   592      deployment: (_|_){
   593        // [eval]
   594        description: (_|_){
   595          // [eval]
   596          let dep#1 = (#struct){
   597            service: (#struct){
   598              ref: (#struct){
   599                kind: (string){ "service" }
   600              }
   601              description: (_|_){
   602                // [incomplete] #DoDeploy.deployment.description.dep.service.description: undefined field: service:
   603                //     ./in.cue:5:28
   604              }
   605            }
   606            hsize: (#struct){
   607            }
   608          }
   609          service: (_|_){
   610            // [eval]
   611            description: (_|_){
   612              // [eval]
   613              let configed#2 = (_|_){
   614                // [eval]
   615                labstr: (_|_){
   616                  // [eval] #DoDeploy.deployment.description.service.description.configed.labstr: undefined field: label:
   617                  //     ./in.cue:51:14
   618                }
   619              }
   620              role: (_|_){
   621                // [eval] #DoDeploy.deployment.description.service.description.role: undefined field: role:
   622                //     ./in.cue:40:19
   623              }
   624            }
   625          }
   626        }
   627      }
   628    }
   629    #Configure: (_|_){
   630      // [eval]
   631      _params: (#struct){
   632        hsize: (#struct){
   633        }
   634      }
   635      service: (_|_){
   636        // [eval]
   637        description: (_|_){
   638          // [eval]
   639          let configed#2 = (_|_){
   640            // [eval]
   641            labstr: (_|_){
   642              // [eval] #Configure.service.description.configed.labstr: undefined field: label:
   643              //     ./in.cue:51:14
   644            }
   645          }
   646          role: (_|_){
   647            // [eval] #Configure.service.description.role: undefined field: role:
   648            //     ./in.cue:40:19
   649          }
   650        }
   651      }
   652    }
   653    #RelabelService: (_|_){
   654      // [eval]
   655      _params: (#struct){
   656        hsize: (#struct){
   657          $_instances: (number){ |(*(int){ 1 }, (number){ >=0 }) }
   658        }
   659      }
   660      out: (_|_){
   661        // [eval]
   662        labstr: (_|_){
   663          // [eval] #RelabelService.out.labstr: undefined field: label:
   664          //     ./in.cue:51:14
   665        }
   666      }
   667    }
   668    #RoleSize: (#struct){
   669      $_instances: (number){ |(*(int){ 1 }, (number){ >=0 }) }
   670    }
   671    #Deployment: (#struct){
   672      service: (#struct){
   673        ref: (#struct){
   674          kind: (string){ "service" }
   675        }
   676        description: (_|_){
   677          // [incomplete] #Deployment.service.description: undefined field: service:
   678          //     ./in.cue:5:28
   679        }
   680      }
   681      hsize: (#struct){
   682      }
   683    }
   684    #ServiceManifest: (#struct){
   685      ref: (#struct){
   686        kind: (string){ "service" }
   687      }
   688      description: (_|_){
   689        // [incomplete] #ServiceManifest.description: undefined field: service:
   690        //     ./in.cue:5:28
   691      }
   692    }
   693  }
   694  -- diff/todo/p2 --
   695  Some incorrect error messages. The newly introduced error messages for hsize
   696  seem to be correct, though.
   697  Error paths seem wrong as a result of structure sharing.
   698  -- out/compile --
   699  --- in.cue
   700  {
   701    #DeploymentManifest: (〈0;#Manifest〉 & {
   702      ref: {
   703        kind: "deployment"
   704      }
   705    })
   706    #Manifest: {
   707      ref: 〈1;#ManifestRef〉
   708      description: 〈1;#KumoriKinds〉[〈0;ref〉.kind]
   709    }
   710    #ManifestRef: {
   711      kind: 〈1;#KindsNames〉
   712    }
   713    #KindsNames: ("service"|"deployment")
   714    #KumoriKinds: {
   715      deployment: 〈1;#Deployment〉
   716    }
   717    #KumoriKinds: {
   718      [string]: {
   719        ...
   720      }
   721    }
   722    #DoDeploy: {
   723      _params: {
   724        manifest: 〈2;#DeploymentManifest〉
   725      }
   726      deployment: {
   727        description: {
   728          let dep#1 = 〈2;_params〉.manifest.description
   729          service: (〈3;#Configure〉 & {
   730            _params: {
   731              hsize: 〈2;let dep#1〉.hsize
   732            }
   733          }).service
   734        }
   735      }
   736    }
   737    #Configure: {
   738      _params: {
   739        hsize: {
   740          [string]: 〈3;#RoleSize〉
   741        }
   742      }
   743      service: {
   744        description: {
   745          let configed#2 = (〈3;#RelabelService〉 & {
   746            _params: {
   747              hsize: 〈4;_params〉.hsize
   748            }
   749            role: "admin"
   750          }).out
   751          role: 〈0;let configed#2〉.role
   752        }
   753      }
   754    }
   755    #RelabelService: {
   756      _params: {
   757        hsize: 〈2;#RoleSize〉
   758      }
   759      out: {
   760        labstr: 〈1;_params〉.label
   761      }
   762    }
   763    #RoleSize: {
   764      $_instances: (>=0|*1)
   765    }
   766    #Deployment: {
   767      service: 〈1;#ServiceManifest〉
   768      hsize: {
   769        [〈1;service〉.description.#roles]: 〈2;#RoleSize〉
   770      }
   771    }
   772    #ServiceManifest: (〈0;#Manifest〉 & {
   773      ref: {
   774        kind: "service"
   775      }
   776    })
   777  }