cuelang.org/go@v0.13.0/internal/core/export/testdata/main/dynamic.txtar (about) 1 -- in.cue -- 2 x: string 3 X=(x): 4 4 Y=(x): 6 5 Z=("y"): int 6 a: { 7 labelX: X 8 labelY: Y 9 labelZ: Z 10 } 11 E=["cue"]: name: E | null 12 13 q: "q" 14 q1: "q1" 15 r: "r" 16 r1: "r1" 17 ("s-"+q)?: 1 18 ("s-"+r)!: 2 19 ("s-"+q1)?: (r1)!: 3 20 -- out/definition -- 21 x: string 22 X=(x): 4 23 Y=(x): 6 24 Z="y": int 25 a: { 26 labelX: X 27 labelY: Y 28 labelZ: Z 29 } 30 E=["cue"]: { 31 name: E | null 32 } 33 q: "q" 34 q1: "q1" 35 r: "r" 36 r1: "r1" 37 "s-q"?: 1 38 "s-r"!: 2 39 "s-q1"?: { 40 (r1)!: 3 41 } 42 -- out/doc-v3 -- 43 [] 44 [x] 45 [a] 46 [a labelX] 47 [a labelY] 48 [a labelZ] 49 [q] 50 [q1] 51 [r] 52 [r1] 53 [y] 54 ["s-q"] 55 ["s-r"] 56 ["s-q1"] 57 ["s-q1" r1] 58 -- diff/-out/doc-v3<==>+out/doc -- 59 diff old new 60 --- old 61 +++ new 62 @@ -8,7 +8,6 @@ 63 [q1] 64 [r] 65 [r1] 66 -[_] 67 [y] 68 ["s-q"] 69 ["s-r"] 70 -- diff/out/todo/p3 -- 71 One missing entry is the result of the new evaluator not generating a 72 bogus field for a failed dynamic field. 73 -- out/doc -- 74 [] 75 [x] 76 [a] 77 [a labelX] 78 [a labelY] 79 [a labelZ] 80 [q] 81 [q1] 82 [r] 83 [r1] 84 [_] 85 [y] 86 ["s-q"] 87 ["s-r"] 88 ["s-q1"] 89 ["s-q1" r1] 90 -- out/value-v3 -- 91 == Simplified 92 { 93 x: string 94 X=(x): 4 95 Y=(x): 6 96 Z="y": int 97 a: { 98 labelX: X 99 labelY: Y 100 labelZ: Z 101 } 102 E=["cue"]: { 103 name: E | null 104 } 105 q: "q" 106 q1: "q1" 107 r: "r" 108 r1: "r1" 109 ("s-" + q)?: 1 110 ("s-" + r)!: 2 111 ("s-" + q1)?: { 112 (r1)!: 3 113 } 114 } 115 == Raw 116 { 117 x: string 118 X=(x): 4 119 Y=(x): 6 120 Z="y": int 121 a: { 122 labelX: X 123 labelY: Y 124 labelZ: Z 125 } 126 E=["cue"]: { 127 name: E | null 128 } 129 q: "q" 130 q1: "q1" 131 r: "r" 132 r1: "r1" 133 ("s-" + q)?: 1 134 ("s-" + r)!: 2 135 ("s-" + q1)?: { 136 (r1)!: 3 137 } 138 } 139 == Final 140 _|_ // key value of dynamic field must be concrete, found _|_(cycle error) (and 3 more errors) 141 == All 142 { 143 x: string 144 X=(x): 4 145 Y=(x): 6 146 Z="y": int 147 a: { 148 labelX: X 149 labelY: Y 150 labelZ: Z 151 } 152 E=["cue"]: { 153 name: E | null 154 } 155 q: "q" 156 q1: "q1" 157 r: "r" 158 r1: "r1" 159 ("s-" + q)?: 1 160 ("s-" + r)!: 2 161 ("s-" + q1)?: { 162 (r1)!: 3 163 } 164 } 165 == Eval 166 { 167 x: string 168 X=(x): 4 169 Y=(x): 6 170 Z="y": int 171 a: { 172 labelX: X 173 labelY: Y 174 labelZ: Z 175 } 176 E=["cue"]: { 177 name: E | null 178 } 179 q: "q" 180 q1: "q1" 181 r: "r" 182 r1: "r1" 183 ("s-" + q)?: 1 184 ("s-" + r)!: 2 185 ("s-" + q1)?: { 186 (r1)!: 3 187 } 188 } 189 -- diff/-out/value-v3<==>+out/value -- 190 diff old new 191 --- old 192 +++ new 193 @@ -1,10 +1,98 @@ 194 == Simplified 195 -_|_ // invalid non-ground value string (must be concrete string) (and 1 more errors) 196 +{ 197 + x: string 198 + X=(x): 4 199 + Y=(x): 6 200 + Z="y": int 201 + a: { 202 + labelX: X 203 + labelY: Y 204 + labelZ: Z 205 + } 206 + E=["cue"]: { 207 + name: E | null 208 + } 209 + q: "q" 210 + q1: "q1" 211 + r: "r" 212 + r1: "r1" 213 + ("s-" + q)?: 1 214 + ("s-" + r)!: 2 215 + ("s-" + q1)?: { 216 + (r1)!: 3 217 + } 218 +} 219 == Raw 220 -_|_ // invalid non-ground value string (must be concrete string) (and 1 more errors) 221 +{ 222 + x: string 223 + X=(x): 4 224 + Y=(x): 6 225 + Z="y": int 226 + a: { 227 + labelX: X 228 + labelY: Y 229 + labelZ: Z 230 + } 231 + E=["cue"]: { 232 + name: E | null 233 + } 234 + q: "q" 235 + q1: "q1" 236 + r: "r" 237 + r1: "r1" 238 + ("s-" + q)?: 1 239 + ("s-" + r)!: 2 240 + ("s-" + q1)?: { 241 + (r1)!: 3 242 + } 243 +} 244 == Final 245 -_|_ // invalid non-ground value string (must be concrete string) (and 1 more errors) 246 +_|_ // key value of dynamic field must be concrete, found _|_(cycle error) (and 3 more errors) 247 == All 248 -_|_ // invalid non-ground value string (must be concrete string) (and 1 more errors) 249 +{ 250 + x: string 251 + X=(x): 4 252 + Y=(x): 6 253 + Z="y": int 254 + a: { 255 + labelX: X 256 + labelY: Y 257 + labelZ: Z 258 + } 259 + E=["cue"]: { 260 + name: E | null 261 + } 262 + q: "q" 263 + q1: "q1" 264 + r: "r" 265 + r1: "r1" 266 + ("s-" + q)?: 1 267 + ("s-" + r)!: 2 268 + ("s-" + q1)?: { 269 + (r1)!: 3 270 + } 271 +} 272 == Eval 273 -_|_ // invalid non-ground value string (must be concrete string) (and 1 more errors) 274 +{ 275 + x: string 276 + X=(x): 4 277 + Y=(x): 6 278 + Z="y": int 279 + a: { 280 + labelX: X 281 + labelY: Y 282 + labelZ: Z 283 + } 284 + E=["cue"]: { 285 + name: E | null 286 + } 287 + q: "q" 288 + q1: "q1" 289 + r: "r" 290 + r1: "r1" 291 + ("s-" + q)?: 1 292 + ("s-" + r)!: 2 293 + ("s-" + q1)?: { 294 + (r1)!: 3 295 + } 296 +} 297 -- diff/value/todo/p0 -- 298 Ignored errors? 299 -- out/value -- 300 == Simplified 301 _|_ // invalid non-ground value string (must be concrete string) (and 1 more errors) 302 == Raw 303 _|_ // invalid non-ground value string (must be concrete string) (and 1 more errors) 304 == Final 305 _|_ // invalid non-ground value string (must be concrete string) (and 1 more errors) 306 == All 307 _|_ // invalid non-ground value string (must be concrete string) (and 1 more errors) 308 == Eval 309 _|_ // invalid non-ground value string (must be concrete string) (and 1 more errors)