this repo has no description
0
fork

Configure Feed

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

internal/pkg: rely on the adt package to wrap call errors

It already does this for builtin validator calls,
let it do the same for non-validator calls as well.

This is a net reduction in code size, given that the adt package
already has a bit of code to stringify a builtin func name.
Moreover, a few dozen errors were missing this wrapping entirely,
given that they failed in ways that internal/pkg did not cover.

As a bonus, we also avoid stuttering in builtin validator calls,
and we save about 0.4% of allocated objects in the Inventory module.

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

+303 -215
+1 -1
cmd/cue/cmd/testdata/script/vet_yaml.txtar
··· 2 2 cmp stderr expect-stderr 3 3 4 4 -- expect-stderr -- 5 - phrases: invalid value "phrases:\n # A quote from Mark Twain.\n quote1:\n lang: en\n attribution: Mark Twain\n\n # A Norwegian proverb.\n proverb:\n lang: no\n text: Stemmen som sier at du ikke klarer det, lyver." (does not satisfy encoding/yaml.Validate): error in call to encoding/yaml.Validate: incomplete value !="": 5 + phrases: invalid value "phrases:\n # A quote from Mark Twain.\n quote1:\n lang: en\n attribution: Mark Twain\n\n # A Norwegian proverb.\n proverb:\n lang: no\n text: Stemmen som sier at du ikke klarer det, lyver." (does not satisfy encoding/yaml.Validate): incomplete value !="": 6 6 ./yaml.cue:19:10 7 7 ./yaml.cue:11:17 8 8 ./yaml.cue:21:10
+2 -2
cue/builtin_test.go
··· 92 92 }`), 93 93 `{ 94 94 x: int 95 - y: _|_ // cannot convert incomplete value "int" to JSON 95 + y: _|_ // y: error in call to encoding/json.Marshal: cannot convert incomplete value "int" to JSON 96 96 }`, 97 97 }, { 98 98 test("encoding/yaml", `yaml.MarshalStream([{a: 1}, {b: 2}])`), ··· 115 115 `"1937-01-01T12:00:27.87+00:20"`, 116 116 }, { 117 117 test("time", `time.Time & "no time"`), 118 - `_|_ // invalid value "no time" (does not satisfy time.Time): error in call to time.Time: invalid time "no time"`, 118 + `_|_ // invalid value "no time" (does not satisfy time.Time): invalid time "no time"`, 119 119 }, { 120 120 test("time", `time.Unix(1500000000, 123456)`), 121 121 `"2017-07-14T02:40:00.000123456Z"`,
+8 -8
cue/testdata/basicrewrite/002_arithmetic.txtar
··· 76 76 ./in.cue:8:10 77 77 div00: failed arithmetic: division undefined: 78 78 ./in.cue:9:10 79 - idiv00: division by zero: 79 + idiv00: error in call to div: division by zero: 80 80 ./in.cue:13:9 81 - imod00: division by zero: 81 + imod00: error in call to mod: division by zero: 82 82 ./in.cue:14:9 83 - iquo00: division by zero: 83 + iquo00: error in call to quo: division by zero: 84 84 ./in.cue:15:9 85 - irem00: division by zero: 85 + irem00: error in call to rem: division by zero: 86 86 ./in.cue:16:9 87 87 e0: invalid operands 2 and "a" to '+' (type int and string): 88 88 ./in.cue:23:5 ··· 116 116 b: (bool){ true } 117 117 add: (float){ 5.000000000000000000000000000000000 } 118 118 idiv00: (_|_){ 119 - // [eval] idiv00: division by zero: 119 + // [eval] idiv00: error in call to div: division by zero: 120 120 // ./in.cue:13:9 121 121 } 122 122 imod00: (_|_){ 123 - // [eval] imod00: division by zero: 123 + // [eval] imod00: error in call to mod: division by zero: 124 124 // ./in.cue:14:9 125 125 } 126 126 iquo00: (_|_){ 127 - // [eval] iquo00: division by zero: 127 + // [eval] iquo00: error in call to quo: division by zero: 128 128 // ./in.cue:15:9 129 129 } 130 130 irem00: (_|_){ 131 - // [eval] irem00: division by zero: 131 + // [eval] irem00: error in call to rem: division by zero: 132 132 // ./in.cue:16:9 133 133 } 134 134 v1: (float){ 5.0E+11 }
+12 -3
cue/testdata/builtins/056_issue314.txtar
··· 91 91 #V: (#struct){ 92 92 s: (string){ string } 93 93 out: (_|_){ 94 - // [incomplete] cannot convert incomplete value "string" to JSON: 94 + // [incomplete] #V.out: error in call to encoding/json.Marshal: cannot convert incomplete value "string" to JSON: 95 + // ./in.cue:21:7 95 96 // ./in.cue:20:7 96 97 } 97 98 } ··· 109 110 diff old new 110 111 --- old 111 112 +++ new 112 - @@ -8,7 +8,7 @@ 113 + @@ -8,13 +8,14 @@ 113 114 out: (_|_){ 114 115 // [incomplete] #T.out: error in call to text/template.Execute: cannot convert non-concrete value string: 115 116 // ./in.cue:14:7 ··· 118 119 } 119 120 } 120 121 #V: (#struct){ 121 - @@ -24,6 +24,7 @@ 122 + s: (string){ string } 123 + out: (_|_){ 124 + - // [incomplete] cannot convert incomplete value "string" to JSON: 125 + + // [incomplete] #V.out: error in call to encoding/json.Marshal: cannot convert incomplete value "string" to JSON: 126 + + // ./in.cue:21:7 127 + // ./in.cue:20:7 128 + } 129 + } 130 + @@ -24,6 +25,7 @@ 122 131 // [incomplete] #U.out: error in call to encoding/yaml.Marshal: incomplete value string: 123 132 // ./in.cue:26:7 124 133 // ./in.cue:25:7
+6 -6
cue/testdata/builtins/closeall.txtar
··· 88 88 ./in.cue:19:3 89 89 f.err.extra: field not allowed: 90 90 ./in.cue:28:14 91 - d.err: argument must be a struct or list literal: 91 + d.err: error in call to __closeAll: argument must be a struct or list literal: 92 92 ./in.cue:24:9 93 - g.err: argument must be a struct or list literal: 93 + g.err: error in call to __closeAll: argument must be a struct or list literal: 94 94 ./in.cue:32:9 95 - h.err: __closeAll may only be used when explicitopen is enabled: 95 + h.err: error in call to __closeAll: __closeAll may only be used when explicitopen is enabled: 96 96 ./old.cue:2:9 97 97 98 98 Result: ··· 136 136 d: (_|_){ 137 137 // [eval] 138 138 err: (_|_){ 139 - // [eval] d.err: argument must be a struct or list literal: 139 + // [eval] d.err: error in call to __closeAll: argument must be a struct or list literal: 140 140 // ./in.cue:24:9 141 141 } 142 142 } ··· 158 158 g: (_|_){ 159 159 // [eval] 160 160 err: (_|_){ 161 - // [eval] g.err: argument must be a struct or list literal: 161 + // [eval] g.err: error in call to __closeAll: argument must be a struct or list literal: 162 162 // ./in.cue:32:9 163 163 } 164 164 } 165 165 h: (_|_){ 166 166 // [eval] 167 167 err: (_|_){ 168 - // [eval] h.err: __closeAll may only be used when explicitopen is enabled: 168 + // [eval] h.err: error in call to __closeAll: __closeAll may only be used when explicitopen is enabled: 169 169 // ./old.cue:2:9 170 170 } 171 171 }
+34 -12
cue/testdata/builtins/incomplete.txtar
··· 239 239 // ./in.cue:50:17 240 240 } 241 241 max: (_|_){ 242 - // [incomplete] incompleteArgDecimalList.#a.transformed: operand param of '+' not concrete (was int): 242 + // [incomplete] incompleteArgDecimalList.#a.max: error in call to list.Max: operand param of '+' not concrete (was int): 243 + // ./in.cue:51:16 243 244 // ./in.cue:50:17 244 245 } 245 246 } ··· 258 259 // ./in.cue:58:16 259 260 } 260 261 joined: (_|_){ 261 - // [incomplete] incompleteArgStringList.#a.transformed: non-concrete value string in operand to +: 262 + // [incomplete] incompleteArgStringList.#a.joined: error in call to strings.Join: non-concrete value string in operand to +: 263 + // ./in.cue:60:16 264 + // ./in.cue:58:16 262 265 // ./in.cue:59:16 263 - // ./in.cue:58:16 264 266 } 265 267 } 266 268 } 267 269 incompleteList: (struct){ 268 270 x: (_){ _ } 269 271 decimal: (_|_){ 270 - // [incomplete] incompleteList.decimal: non-concrete list for argument 0: 272 + // [incomplete] incompleteList.decimal: error in call to list.Max: non-concrete list for argument 0: 271 273 // ./in.cue:66:11 272 274 } 273 275 str: (_|_){ 274 - // [incomplete] incompleteList.str: non-concrete list for argument 0: 276 + // [incomplete] incompleteList.str: error in call to strings.Join: non-concrete list for argument 0: 275 277 // ./in.cue:67:11 276 278 } 277 279 } ··· 342 344 diff old new 343 345 --- old 344 346 +++ new 345 - @@ -89,7 +89,7 @@ 347 + @@ -89,7 +89,8 @@ 346 348 // ./in.cue:50:17 347 349 } 348 350 max: (_|_){ 349 351 - // [incomplete] incompleteArgDecimalList.#a.0: operand param of '+' not concrete (was int): 350 - + // [incomplete] incompleteArgDecimalList.#a.transformed: operand param of '+' not concrete (was int): 352 + + // [incomplete] incompleteArgDecimalList.#a.max: error in call to list.Max: operand param of '+' not concrete (was int): 353 + + // ./in.cue:51:16 351 354 // ./in.cue:50:17 352 355 } 353 356 } 354 - @@ -108,7 +108,7 @@ 357 + @@ -108,9 +109,10 @@ 355 358 // ./in.cue:58:16 356 359 } 357 360 joined: (_|_){ 358 361 - // [incomplete] incompleteArgStringList.#a.0: non-concrete value string in operand to +: 359 - + // [incomplete] incompleteArgStringList.#a.transformed: non-concrete value string in operand to +: 360 - // ./in.cue:59:16 361 - // ./in.cue:58:16 362 + - // ./in.cue:59:16 363 + - // ./in.cue:58:16 364 + + // [incomplete] incompleteArgStringList.#a.joined: error in call to strings.Join: non-concrete value string in operand to +: 365 + + // ./in.cue:60:16 366 + + // ./in.cue:58:16 367 + + // ./in.cue:59:16 362 368 } 363 - @@ -129,15 +129,18 @@ 369 + } 370 + } 371 + @@ -117,11 +119,11 @@ 372 + incompleteList: (struct){ 373 + x: (_){ _ } 374 + decimal: (_|_){ 375 + - // [incomplete] incompleteList.decimal: non-concrete list for argument 0: 376 + + // [incomplete] incompleteList.decimal: error in call to list.Max: non-concrete list for argument 0: 377 + // ./in.cue:66:11 378 + } 379 + str: (_|_){ 380 + - // [incomplete] incompleteList.str: non-concrete list for argument 0: 381 + + // [incomplete] incompleteList.str: error in call to strings.Join: non-concrete list for argument 0: 382 + // ./in.cue:67:11 383 + } 384 + } 385 + @@ -129,15 +131,18 @@ 364 386 x: (_|_){ 365 387 // [incomplete] incompleteListError.x: non-concrete value _ in operand to +: 366 388 // ./in.cue:72:11
+8 -8
cue/testdata/builtins/intdiv.txtar
··· 50 50 Disjuncts: 29 51 51 -- out/evalalpha -- 52 52 Errors: 53 - quoDivByZero: division by zero: 53 + quoDivByZero: error in call to quo: division by zero: 54 54 ./in.cue:6:15 55 55 quoTypeError1: cannot use 2.0 (type float) as int in argument 1 to quo: 56 56 ./in.cue:8:20 57 57 quoTypeError2: cannot use 1.0 (type float) as int in argument 2 to quo: 58 58 ./in.cue:9:23 59 - remDivByZero: division by zero: 59 + remDivByZero: error in call to rem: division by zero: 60 60 ./in.cue:16:15 61 61 remTypeError1: cannot use 2.0 (type float) as int in argument 1 to rem: 62 62 ./in.cue:18:20 63 63 remTypeError2: cannot use 1.0 (type float) as int in argument 2 to rem: 64 64 ./in.cue:19:23 65 - divDivByZero: division by zero: 65 + divDivByZero: error in call to div: division by zero: 66 66 ./in.cue:26:15 67 67 divTypeError1: cannot use 2.0 (type float) as int in argument 1 to div: 68 68 ./in.cue:28:20 69 69 divTypeError2: cannot use 1.0 (type float) as int in argument 2 to div: 70 70 ./in.cue:29:23 71 - modDivByZero: division by zero: 71 + modDivByZero: error in call to mod: division by zero: 72 72 ./in.cue:36:15 73 73 modTypeError1: cannot use 2.0 (type float) as int in argument 1 to mod: 74 74 ./in.cue:38:20 ··· 83 83 quo3: (int){ -2 } 84 84 quo4: (int){ 2 } 85 85 quoDivByZero: (_|_){ 86 - // [eval] quoDivByZero: division by zero: 86 + // [eval] quoDivByZero: error in call to quo: division by zero: 87 87 // ./in.cue:6:15 88 88 } 89 89 quoTypeError1: (_|_){ ··· 99 99 rem3: (int){ -1 } 100 100 rem4: (int){ -1 } 101 101 remDivByZero: (_|_){ 102 - // [eval] remDivByZero: division by zero: 102 + // [eval] remDivByZero: error in call to rem: division by zero: 103 103 // ./in.cue:16:15 104 104 } 105 105 remTypeError1: (_|_){ ··· 115 115 div3: (int){ -3 } 116 116 div4: (int){ 3 } 117 117 divDivByZero: (_|_){ 118 - // [eval] divDivByZero: division by zero: 118 + // [eval] divDivByZero: error in call to div: division by zero: 119 119 // ./in.cue:26:15 120 120 } 121 121 divTypeError1: (_|_){ ··· 131 131 mod3: (int){ 1 } 132 132 mod4: (int){ 1 } 133 133 modDivByZero: (_|_){ 134 - // [eval] modDivByZero: division by zero: 134 + // [eval] modDivByZero: error in call to mod: division by zero: 135 135 // ./in.cue:36:15 136 136 } 137 137 modTypeError1: (_|_){
+4 -2
cue/testdata/builtins/issue_3567.txtar
··· 24 24 Disjuncts: 7 25 25 -- out/evalalpha -- 26 26 Errors: 27 - 0: not enough arguments in call to strings.Join (have 1, want 2): 27 + a: error in call to strings.Join: not enough arguments in call to strings.Join (have 1, want 2): 28 + ./in.cue:2:4 28 29 ./in.cue:2:20 29 30 30 31 Result: 31 32 (_|_){ 32 33 // [eval] 33 34 a: (_|_){ 34 - // [eval] 0: not enough arguments in call to strings.Join (have 1, want 2): 35 + // [eval] a: error in call to strings.Join: not enough arguments in call to strings.Join (have 1, want 2): 36 + // ./in.cue:2:4 35 37 // ./in.cue:2:20 36 38 } 37 39 }
+6 -6
cue/testdata/builtins/reclose.txtar
··· 207 207 ./in.cue:17:19 208 208 ./in.cue:28:11 209 209 ./in.cue:31:12 210 - nonStructLiterals.t1.err: argument must be a struct or list literal: 210 + nonStructLiterals.t1.err: error in call to __reclose: argument must be a struct or list literal: 211 211 ./in.cue:54:11 212 - nonStructLiterals.t4.err: argument must be a struct or list literal: 212 + nonStructLiterals.t4.err: error in call to __reclose: argument must be a struct or list literal: 213 213 ./in.cue:58:11 214 - retro.t1.err: __reclose may only be used when explicitopen is enabled: 214 + retro.t1.err: error in call to __reclose: __reclose may only be used when explicitopen is enabled: 215 215 ./old.cue:3:11 216 216 217 217 Result: ··· 338 338 t1: (_|_){ 339 339 // [eval] 340 340 err: (_|_){ 341 - // [eval] nonStructLiterals.t1.err: argument must be a struct or list literal: 341 + // [eval] nonStructLiterals.t1.err: error in call to __reclose: argument must be a struct or list literal: 342 342 // ./in.cue:54:11 343 343 } 344 344 } ··· 348 348 t4: (_|_){ 349 349 // [eval] 350 350 err: (_|_){ 351 - // [eval] nonStructLiterals.t4.err: argument must be a struct or list literal: 351 + // [eval] nonStructLiterals.t4.err: error in call to __reclose: argument must be a struct or list literal: 352 352 // ./in.cue:58:11 353 353 } 354 354 } ··· 377 377 t1: (_|_){ 378 378 // [eval] 379 379 err: (_|_){ 380 - // [eval] retro.t1.err: __reclose may only be used when explicitopen is enabled: 380 + // [eval] retro.t1.err: error in call to __reclose: __reclose may only be used when explicitopen is enabled: 381 381 // ./old.cue:3:11 382 382 } 383 383 }
+2 -2
cue/testdata/compile/experiment.txtar
··· 30 30 Disjuncts: 3 31 31 -- out/evalalpha -- 32 32 Errors: 33 - off: testing experiment disabled: 33 + off: error in call to testExperiment: testing experiment disabled: 34 34 ./off.cue:1:6 35 35 36 36 Result: 37 37 (_|_){ 38 38 // [eval] 39 39 off: (_|_){ 40 - // [eval] off: testing experiment disabled: 40 + // [eval] off: error in call to testExperiment: testing experiment disabled: 41 41 // ./off.cue:1:6 42 42 } 43 43 on: (string){ "on" }
+16 -16
cue/testdata/cycle/builtins.txtar
··· 357 357 ./cycle.cue:39:14 358 358 ./cycle.cue:39:21 359 359 ./cycle.cue:40:5 360 - jsonCycle.t1.x.y: invalid value "{}" (does not satisfy encoding/json.Validate): error in call to encoding/json.Validate: structural cycle: 360 + jsonCycle.t1.x.y: invalid value "{}" (does not satisfy encoding/json.Validate): structural cycle: 361 361 ./jsoncycle.cue:4:8 362 362 ./jsoncycle.cue:5:8 363 363 listMatchN.structCycle.x.y: invalid value [{}] (does not satisfy list.MatchN): number of matched elements is 0: does not satisfy 1: ··· 410 410 ./yamlcycle.cue:15:8 411 411 selfCycle.t1.c.d.d.d: structural cycle: 412 412 ./yamlcycle.cue:14:5 413 - selfCycle.yamlVal.t1.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): error in call to encoding/yaml.Validate: structural cycle: 413 + selfCycle.yamlVal.t1.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): structural cycle: 414 414 ./yamlcycle.cue:24:8 415 415 ./yamlcycle.cue:25:8 416 - selfCycle.yamlVal.t2.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): error in call to encoding/yaml.Validate: structural cycle: 416 + selfCycle.yamlVal.t2.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): structural cycle: 417 417 ./yamlcycle.cue:30:8 418 418 ./yamlcycle.cue:31:8 419 419 ./yamlcycle.cue:32:8 ··· 422 422 ./yamlcycle.cue:41:8 423 423 selfCycle.yamlFun.t2.z.y: error in call to encoding/yaml.Validate: structural cycle: 424 424 ./yamlcycle.cue:41:8 425 - selfCycle.yamlValidatePartial.x.y: invalid value "{}" (does not satisfy encoding/yaml.ValidatePartial): error in call to encoding/yaml.ValidatePartial: structural cycle: 425 + selfCycle.yamlValidatePartial.x.y: invalid value "{}" (does not satisfy encoding/yaml.ValidatePartial): structural cycle: 426 426 ./yamlcycle.cue:44:8 427 427 ./yamlcycle.cue:45:8 428 428 ··· 634 634 x: (_|_){ 635 635 // [structural cycle] 636 636 y: (_|_){ 637 - // [structural cycle] jsonCycle.t1.x.y: invalid value "{}" (does not satisfy encoding/json.Validate): error in call to encoding/json.Validate: structural cycle: 637 + // [structural cycle] jsonCycle.t1.x.y: invalid value "{}" (does not satisfy encoding/json.Validate): structural cycle: 638 638 // ./jsoncycle.cue:4:8 639 639 // ./jsoncycle.cue:5:8 640 640 } ··· 876 876 x: (_|_){ 877 877 // [structural cycle] 878 878 y: (_|_){ 879 - // [structural cycle] selfCycle.yamlVal.t1.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): error in call to encoding/yaml.Validate: structural cycle: 879 + // [structural cycle] selfCycle.yamlVal.t1.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): structural cycle: 880 880 // ./yamlcycle.cue:24:8 881 881 // ./yamlcycle.cue:25:8 882 882 } ··· 887 887 x: (_|_){ 888 888 // [structural cycle] 889 889 y: (_|_){ 890 - // [structural cycle] selfCycle.yamlVal.t2.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): error in call to encoding/yaml.Validate: structural cycle: 890 + // [structural cycle] selfCycle.yamlVal.t2.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): structural cycle: 891 891 // ./yamlcycle.cue:30:8 892 892 // ./yamlcycle.cue:31:8 893 893 // ./yamlcycle.cue:32:8 ··· 926 926 x: (_|_){ 927 927 // [structural cycle] 928 928 y: (_|_){ 929 - // [structural cycle] selfCycle.yamlValidatePartial.x.y: invalid value "{}" (does not satisfy encoding/yaml.ValidatePartial): error in call to encoding/yaml.ValidatePartial: structural cycle: 929 + // [structural cycle] selfCycle.yamlValidatePartial.x.y: invalid value "{}" (does not satisfy encoding/yaml.ValidatePartial): structural cycle: 930 930 // ./yamlcycle.cue:44:8 931 931 // ./yamlcycle.cue:45:8 932 932 } ··· 980 980 + ./cycle.cue:39:14 981 981 + ./cycle.cue:39:21 982 982 + ./cycle.cue:40:5 983 - +jsonCycle.t1.x.y: invalid value "{}" (does not satisfy encoding/json.Validate): error in call to encoding/json.Validate: structural cycle: 983 + +jsonCycle.t1.x.y: invalid value "{}" (does not satisfy encoding/json.Validate): structural cycle: 984 984 + ./jsoncycle.cue:4:8 985 985 + ./jsoncycle.cue:5:8 986 986 +listMatchN.structCycle.x.y: invalid value [{}] (does not satisfy list.MatchN): number of matched elements is 0: does not satisfy 1: ··· 1028 1028 - ./yamlcycle.cue:41:28 1029 1029 -selfCycle.yamlValidatePartial.x.y.y: structural cycle: 1030 1030 - ./yamlcycle.cue:44:29 1031 - +selfCycle.yamlVal.t1.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): error in call to encoding/yaml.Validate: structural cycle: 1031 + +selfCycle.yamlVal.t1.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): structural cycle: 1032 1032 + ./yamlcycle.cue:24:8 1033 1033 + ./yamlcycle.cue:25:8 1034 - +selfCycle.yamlVal.t2.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): error in call to encoding/yaml.Validate: structural cycle: 1034 + +selfCycle.yamlVal.t2.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): structural cycle: 1035 1035 + ./yamlcycle.cue:30:8 1036 1036 + ./yamlcycle.cue:31:8 1037 1037 + ./yamlcycle.cue:32:8 ··· 1040 1040 + ./yamlcycle.cue:41:8 1041 1041 +selfCycle.yamlFun.t2.z.y: error in call to encoding/yaml.Validate: structural cycle: 1042 1042 + ./yamlcycle.cue:41:8 1043 - +selfCycle.yamlValidatePartial.x.y: invalid value "{}" (does not satisfy encoding/yaml.ValidatePartial): error in call to encoding/yaml.ValidatePartial: structural cycle: 1043 + +selfCycle.yamlValidatePartial.x.y: invalid value "{}" (does not satisfy encoding/yaml.ValidatePartial): structural cycle: 1044 1044 + ./yamlcycle.cue:44:8 1045 1045 + ./yamlcycle.cue:45:8 1046 1046 ··· 1200 1200 - // ./jsoncycle.cue:4:22 1201 1201 + // [structural cycle] 1202 1202 + y: (_|_){ 1203 - + // [structural cycle] jsonCycle.t1.x.y: invalid value "{}" (does not satisfy encoding/json.Validate): error in call to encoding/json.Validate: structural cycle: 1203 + + // [structural cycle] jsonCycle.t1.x.y: invalid value "{}" (does not satisfy encoding/json.Validate): structural cycle: 1204 1204 + // ./jsoncycle.cue:4:8 1205 1205 + // ./jsoncycle.cue:5:8 1206 1206 + } ··· 1345 1345 - // ./yamlcycle.cue:32:22 1346 1346 + // [structural cycle] 1347 1347 + y: (_|_){ 1348 - + // [structural cycle] selfCycle.yamlVal.t1.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): error in call to encoding/yaml.Validate: structural cycle: 1348 + + // [structural cycle] selfCycle.yamlVal.t1.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): structural cycle: 1349 1349 + // ./yamlcycle.cue:24:8 1350 1350 + // ./yamlcycle.cue:25:8 1351 1351 + } ··· 1356 1356 + x: (_|_){ 1357 1357 + // [structural cycle] 1358 1358 + y: (_|_){ 1359 - + // [structural cycle] selfCycle.yamlVal.t2.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): error in call to encoding/yaml.Validate: structural cycle: 1359 + + // [structural cycle] selfCycle.yamlVal.t2.x.y: invalid value "{}" (does not satisfy encoding/yaml.Validate): structural cycle: 1360 1360 + // ./yamlcycle.cue:30:8 1361 1361 + // ./yamlcycle.cue:31:8 1362 1362 + // ./yamlcycle.cue:32:8 ··· 1410 1410 - // ./yamlcycle.cue:44:29 1411 1411 + // [structural cycle] 1412 1412 + y: (_|_){ 1413 - + // [structural cycle] selfCycle.yamlValidatePartial.x.y: invalid value "{}" (does not satisfy encoding/yaml.ValidatePartial): error in call to encoding/yaml.ValidatePartial: structural cycle: 1413 + + // [structural cycle] selfCycle.yamlValidatePartial.x.y: invalid value "{}" (does not satisfy encoding/yaml.ValidatePartial): structural cycle: 1414 1414 + // ./yamlcycle.cue:44:8 1415 1415 + // ./yamlcycle.cue:45:8 1416 1416 + }
+51 -9
cue/testdata/cycle/evaluate.txtar
··· 189 189 structCycle.c: structural cycle 190 190 disjunctionCycle.b: cannot use 1 (type int) as list in argument 1 to and: 191 191 ./in.cue:56:9 192 + listAddCycle.b: error in call to list.Concat: structural cycle: 193 + ./in.cue:91:5 192 194 listAddCycle.c: structural cycle: 193 195 ./in.cue:91:5 196 + listMulCycle.b: error in call to list.Repeat: structural cycle: 197 + ./in.cue:97:5 194 198 listMulCycle.c: structural cycle: 195 199 ./in.cue:97:5 196 200 ··· 318 322 listAddCycle: (_|_){ 319 323 // [structural cycle] 320 324 a: (_|_){ 321 - // [structural cycle] listAddCycle.c: structural cycle: 325 + // [structural cycle] listAddCycle.b: error in call to list.Concat: structural cycle: 322 326 // ./in.cue:91:5 323 327 } 324 328 b: (_|_){ 325 - // [structural cycle] listAddCycle.c: structural cycle: 329 + // [structural cycle] listAddCycle.b: error in call to list.Concat: structural cycle: 326 330 // ./in.cue:91:5 327 331 } 328 332 c: (_|_){ ··· 333 337 listMulCycle: (_|_){ 334 338 // [structural cycle] 335 339 a: (_|_){ 336 - // [structural cycle] listMulCycle.c: structural cycle: 340 + // [structural cycle] listMulCycle.b: error in call to list.Repeat: structural cycle: 337 341 // ./in.cue:97:5 338 342 } 339 343 b: (_|_){ 340 - // [structural cycle] listMulCycle.c: structural cycle: 344 + // [structural cycle] listMulCycle.b: error in call to list.Repeat: structural cycle: 341 345 // ./in.cue:97:5 342 346 } 343 347 c: (_|_){ ··· 378 382 diff old new 379 383 --- old 380 384 +++ new 381 - @@ -1,33 +1,18 @@ 385 + @@ -1,33 +1,22 @@ 382 386 Errors: 383 387 -closeCycle.a: structural cycle 384 388 -closeCycle.b.d: structural cycle ··· 415 419 +structCycle.c: structural cycle 416 420 +disjunctionCycle.b: cannot use 1 (type int) as list in argument 1 to and: 417 421 + ./in.cue:56:9 422 + +listAddCycle.b: error in call to list.Concat: structural cycle: 423 + + ./in.cue:91:5 418 424 +listAddCycle.c: structural cycle: 419 425 + ./in.cue:91:5 426 + +listMulCycle.b: error in call to list.Repeat: structural cycle: 427 + + ./in.cue:97:5 420 428 +listMulCycle.c: structural cycle: 421 429 + ./in.cue:97:5 422 430 423 431 Result: 424 432 (_|_){ 425 - @@ -65,14 +50,8 @@ 433 + @@ -65,14 +54,8 @@ 426 434 } 427 435 t2: (struct){ 428 436 a: (struct){ ··· 439 447 } 440 448 x: (struct){ 441 449 y: (string){ "" } 442 - @@ -88,18 +67,15 @@ 450 + @@ -88,18 +71,15 @@ 443 451 disjunctionCycle: (_|_){ 444 452 // [eval] 445 453 a: (_|_){ ··· 467 475 // ./in.cue:56:9 468 476 } 469 477 } 470 - @@ -107,14 +83,13 @@ 478 + @@ -107,14 +87,13 @@ 471 479 // [structural cycle] 472 480 #A: (_|_){ 473 481 // [structural cycle] ··· 487 495 } 488 496 } 489 497 letCycleWithAnd: (struct){ 490 - @@ -145,12 +120,11 @@ 498 + @@ -145,12 +124,11 @@ 491 499 b: (_|_){ 492 500 // [structural cycle] 493 501 d: (_|_){ ··· 505 513 } 506 514 } 507 515 embedCycle: (struct){ 516 + @@ -164,11 +142,11 @@ 517 + listAddCycle: (_|_){ 518 + // [structural cycle] 519 + a: (_|_){ 520 + - // [structural cycle] listAddCycle.c: structural cycle: 521 + - // ./in.cue:91:5 522 + - } 523 + - b: (_|_){ 524 + - // [structural cycle] listAddCycle.c: structural cycle: 525 + + // [structural cycle] listAddCycle.b: error in call to list.Concat: structural cycle: 526 + + // ./in.cue:91:5 527 + + } 528 + + b: (_|_){ 529 + + // [structural cycle] listAddCycle.b: error in call to list.Concat: structural cycle: 530 + // ./in.cue:91:5 531 + } 532 + c: (_|_){ 533 + @@ -179,11 +157,11 @@ 534 + listMulCycle: (_|_){ 535 + // [structural cycle] 536 + a: (_|_){ 537 + - // [structural cycle] listMulCycle.c: structural cycle: 538 + - // ./in.cue:97:5 539 + - } 540 + - b: (_|_){ 541 + - // [structural cycle] listMulCycle.c: structural cycle: 542 + + // [structural cycle] listMulCycle.b: error in call to list.Repeat: structural cycle: 543 + + // ./in.cue:97:5 544 + + } 545 + + b: (_|_){ 546 + + // [structural cycle] listMulCycle.b: error in call to list.Repeat: structural cycle: 547 + // ./in.cue:97:5 548 + } 549 + c: (_|_){ 508 550 -- diff/explanation -- 509 551 embedCycle: technically not a structural cycle, so V3 result 510 552 is okay or even an improvement.
+8 -8
cue/testdata/cycle/self.txtar
··· 335 335 expr.error2.a: conflicting values 4 and 3: 336 336 ./in.cue:10:5 337 337 ./in.cue:11:5 338 - 0: structural cycle: 338 + listConcat.error1.a: error in call to list.Concat: structural cycle: 339 339 ./in.cue:15:5 340 - 1: structural cycle: 340 + listConcat.error2.a: error in call to list.Concat: structural cycle: 341 341 ./in.cue:19:5 342 342 343 343 Result: ··· 367 367 error1: (_|_){ 368 368 // [structural cycle] 369 369 a: (_|_){ 370 - // [structural cycle] 0: structural cycle: 370 + // [structural cycle] listConcat.error1.a: error in call to list.Concat: structural cycle: 371 371 // ./in.cue:15:5 372 372 } 373 373 } 374 374 error2: (_|_){ 375 375 // [structural cycle] 376 376 a: (_|_){ 377 - // [structural cycle] 1: structural cycle: 377 + // [structural cycle] listConcat.error2.a: error in call to list.Concat: structural cycle: 378 378 // ./in.cue:19:5 379 379 } 380 380 } ··· 707 707 - ./in.cue:9:5 708 708 + ./in.cue:10:5 709 709 + ./in.cue:11:5 710 - +0: structural cycle: 710 + +listConcat.error1.a: error in call to list.Concat: structural cycle: 711 711 + ./in.cue:15:5 712 - +1: structural cycle: 712 + +listConcat.error2.a: error in call to list.Concat: structural cycle: 713 713 + ./in.cue:19:5 714 714 715 715 Result: ··· 751 751 - // [structural cycle] 752 752 - 0: (string){ "1" } 753 753 - 1: (string){ "2" } 754 - + // [structural cycle] 0: structural cycle: 754 + + // [structural cycle] listConcat.error1.a: error in call to list.Concat: structural cycle: 755 755 + // ./in.cue:15:5 756 756 + } 757 757 + } 758 758 + error2: (_|_){ 759 759 + // [structural cycle] 760 760 + a: (_|_){ 761 - + // [structural cycle] 1: structural cycle: 761 + + // [structural cycle] listConcat.error2.a: error in call to list.Concat: structural cycle: 762 762 + // ./in.cue:19:5 763 763 } 764 764 }
+12 -3
cue/testdata/cycle/structural.txtar
··· 721 721 shortPathFail.elipsis.t2.Foo.ref: structural cycle 722 722 withLetFail.schema.next: structural cycle 723 723 z1.z.g: structural cycle 724 - 3: structural cycle: 724 + fieldsSumInfinite.issue3310.total: error in call to list.Sum: error in call to list.Sum: structural cycle: 725 725 ./in.cue:371:9 726 726 nestedList.v1e.y.0.0: incompatible list lengths (1 and 2): 727 727 ./in.cue:438:6 ··· 1401 1401 fries: (float){ 2.00 } 1402 1402 sprite: (float){ 1.00 } 1403 1403 total: (_|_){ 1404 - // [structural cycle] 3: structural cycle: 1404 + // [structural cycle] fieldsSumInfinite.issue3310.total: error in call to list.Sum: error in call to list.Sum: structural cycle: 1405 1405 // ./in.cue:371:9 1406 1406 } 1407 1407 } ··· 1925 1925 -d3.x.indirect: structural cycle: 1926 1926 - ./in.cue:316:12 1927 1927 +z1.z.g: structural cycle 1928 - +3: structural cycle: 1928 + +fieldsSumInfinite.issue3310.total: error in call to list.Sum: error in call to list.Sum: structural cycle: 1929 1929 + ./in.cue:371:9 1930 1930 +nestedList.v1e.y.0.0: incompatible list lengths (1 and 2): 1931 1931 + ./in.cue:438:6 ··· 2021 2021 } 2022 2022 } 2023 2023 fieldsSumInfinite: (_|_){ 2024 + @@ -771,7 +767,7 @@ 2025 + fries: (float){ 2.00 } 2026 + sprite: (float){ 1.00 } 2027 + total: (_|_){ 2028 + - // [structural cycle] 3: structural cycle: 2029 + + // [structural cycle] fieldsSumInfinite.issue3310.total: error in call to list.Sum: error in call to list.Sum: structural cycle: 2030 + // ./in.cue:371:9 2031 + } 2032 + } 2024 2033 @@ -839,11 +835,9 @@ 2025 2034 // [eval] e3.a: conflicting values [a] and {c:a} (mismatched types list and struct): 2026 2035 // ./in.cue:412:5
+2 -2
cue/testdata/disjunctions/incomplete.txtar
··· 125 125 s: (string){ string } 126 126 ok1: (_|_){ 127 127 // [incomplete] func.ok1: 2 errors in empty disjunction: 128 - // func.ok1: non-concrete argument 0: 128 + // func.ok1: error in call to encoding/yaml.MarshalStream: non-concrete argument 0: 129 129 // ./in.cue:26:7 130 - // func.ok1: non-concrete argument 0: 130 + // func.ok1: error in call to encoding/yaml.Marshal: non-concrete argument 0: 131 131 // ./in.cue:26:31 132 132 } 133 133 }
+1 -1
cue/testdata/eval/errunifiy.txtar
··· 57 57 (_|_){ 58 58 // [user] 59 59 a: (_|_){ 60 - // [incomplete] empty list in call to or: 60 + // [incomplete] a: error in call to or: empty list in call to or: 61 61 // ./in.cue:1:4 62 62 } 63 63 b: (_|_){
+9 -7
cue/testdata/eval/issue3672.txtar
··· 389 389 #mkFinDefSet: (#struct){ 390 390 #Definition!: ~(#FinDefSetDefinition) 391 391 #Type: (_|_){ 392 - // [incomplete] required field missing: #Definition: 392 + // [incomplete] #mkFinDefSet.#Type: error in call to or: required field missing: #Definition: 393 + // ./x.cue:22:9 393 394 // ./x.cue:22:25 394 395 } 395 396 } ··· 799 800 #Alternatives: (#struct){ 800 801 allBut: (#struct){ 801 802 AllBut: (list){ 802 - @@ -34,48 +28,11 @@ 803 + @@ -34,48 +28,12 @@ 803 804 } 804 805 } 805 806 #mkFinDefSet: (#struct){ ··· 847 848 - }) } 848 849 + #Definition!: ~(#FinDefSetDefinition) 849 850 + #Type: (_|_){ 850 - + // [incomplete] required field missing: #Definition: 851 + + // [incomplete] #mkFinDefSet.#Type: error in call to or: required field missing: #Definition: 852 + + // ./x.cue:22:9 851 853 + // ./x.cue:22:25 852 854 + } 853 855 } 854 856 #ConfigText: ((string|struct)){ |((string){ string }, (#struct){ 855 857 UseSectionName: (bool){ true } 856 - @@ -196,8 +153,41 @@ 858 + @@ -196,8 +154,41 @@ 857 859 }) } 858 860 }) } 859 861 _output: (_|_){ ··· 896 898 } 897 899 } 898 900 } 899 - @@ -290,8 +280,41 @@ 901 + @@ -290,8 +281,41 @@ 900 902 }) } 901 903 }) } 902 904 orgSyntax: (_|_){ ··· 939 941 } 940 942 } 941 943 value0: (#struct){ 942 - @@ -304,1165 +327,71 @@ 944 + @@ -304,1165 +328,71 @@ 943 945 0: (string){ 944 946 "UseSectionName" 945 947 let INL#9 = (_|_){ ··· 2159 2161 // ./x.cue:22:52 2160 2162 // ./x.cue:44:29 2161 2163 // ./x.cue:44:56 2162 - @@ -1479,7 +408,9 @@ 2164 + @@ -1479,7 +409,9 @@ 2163 2165 // ./x.cue:118:38 2164 2166 // ./x.cue:123:9 2165 2167 // ./x.cue:124:16
+1 -1
cue/testdata/fulleval/032_or_builtin_should_not_fail_on_non-concrete_empty_list.txtar
··· 29 29 jobs: (#struct){ 30 30 } 31 31 #JobID: (_|_){ 32 - // [incomplete] empty list in call to or: 32 + // [incomplete] #Workflow.#JobID: error in call to or: empty list in call to or: 33 33 // ./in.cue:6:10 34 34 } 35 35 }
+1 -1
cue/testdata/fulleval/048_dont_pass_incomplete_values_to_builtins.txtar
··· 47 47 (struct){ 48 48 input: (string){ string } 49 49 foo: (_|_){ 50 - // [incomplete] foo: non-concrete argument 0: 50 + // [incomplete] foo: error in call to encoding/json.Marshal: non-concrete argument 0: 51 51 // ./in.cue:4:8 52 52 } 53 53 }
+2 -2
cue/testdata/fulleval/049_alias_reuse_in_nested_scope.txtar
··· 30 30 (struct){ 31 31 #Foo: (#struct){ 32 32 let X#1 = (_|_){ 33 - // [incomplete] empty list in call to or: 33 + // [incomplete] #Foo.X: error in call to or: empty list in call to or: 34 34 // ./in.cue:2:10 35 35 } 36 36 connection: (_|_){ 37 - // [incomplete] empty list in call to or: 37 + // [incomplete] #Foo.X: error in call to or: empty list in call to or: 38 38 // ./in.cue:2:10 39 39 } 40 40 }
+4 -2
cue/testdata/fulleval/050_json_Marshaling_detects_incomplete.txtar
··· 51 51 -- out/evalalpha -- 52 52 (struct){ 53 53 a: (_|_){ 54 - // [incomplete] cannot convert incomplete value "string" to JSON: 54 + // [incomplete] a: error in call to encoding/json.Marshal: cannot convert incomplete value "string" to JSON: 55 + // ./in.cue:3:4 55 56 // ./in.cue:3:21 56 57 } 57 58 foo: (struct){ ··· 62 63 } 63 64 } 64 65 b: (_|_){ 65 - // [incomplete] foo.b: undefined field: c: 66 + // [incomplete] b: error in call to encoding/json.Marshal: undefined field: c: 67 + // ./in.cue:6:4 66 68 // ./in.cue:5:20 67 69 } 68 70 }
+10 -1
cue/testdata/fulleval/051_detectIncompleteYAML.txtar
··· 39 39 use: (string){ string } 40 40 } 41 41 baz: (_|_){ 42 - // [incomplete] #Spec.data.baz: non-concrete argument 0: 42 + // [incomplete] #Spec.data.baz: error in call to encoding/yaml.Marshal: non-concrete argument 0: 43 43 // ./in.cue:11:11 44 44 } 45 45 foobar: (_|_){ ··· 67 67 diff old new 68 68 --- old 69 69 +++ new 70 + @@ -8,7 +8,7 @@ 71 + use: (string){ string } 72 + } 73 + baz: (_|_){ 74 + - // [incomplete] #Spec.data.baz: non-concrete argument 0: 75 + + // [incomplete] #Spec.data.baz: error in call to encoding/yaml.Marshal: non-concrete argument 0: 76 + // ./in.cue:11:11 77 + } 78 + foobar: (_|_){ 70 79 @@ -15,6 +15,7 @@ 71 80 // [incomplete] #Spec.data.foobar: error in call to encoding/yaml.Marshal: incomplete value string: 72 81 // ./in.cue:12:11
+3 -2
cue/testdata/fulleval/052_detectIncompleteJSON.txtar
··· 39 39 use: (string){ string } 40 40 } 41 41 baz: (_|_){ 42 - // [incomplete] #Spec.data.baz: non-concrete argument 0: 42 + // [incomplete] #Spec.data.baz: error in call to encoding/json.Marshal: non-concrete argument 0: 43 43 // ./in.cue:11:11 44 44 } 45 45 foobar: (_|_){ 46 - // [incomplete] cannot convert incomplete value "string" to JSON: 46 + // [incomplete] #Spec.data.foobar: error in call to encoding/json.Marshal: cannot convert incomplete value "string" to JSON: 47 + // ./in.cue:12:11 47 48 // ./in.cue:6:21 48 49 } 49 50 }
+6 -6
cue/testdata/resolve/048_builtins.txtar
··· 104 104 ./in.cue:9:5 105 105 ./in.cue:7:5 106 106 ./in.cue:12:14 107 - stringListErrors.b.result: invalid list element 0 in argument 0 to call: cannot use value int (int) as string: 107 + stringListErrors.b.result: error in call to strings.Join: invalid list element 0 in argument 0 to call: cannot use value int (int) as string: 108 108 ./in.cue:31:11 109 109 ./in.cue:30:7 110 110 stringListErrors.c.result: cannot use int (type int) as string in argument 2 to strings.Join: 111 111 ./in.cue:36:27 112 - decimalListErrors.a.result: invalid list element 0 in argument 0 to call: cannot use value string (string) as number: 112 + decimalListErrors.a.result: error in call to list.Avg: invalid list element 0 in argument 0 to call: cannot use value string (string) as number: 113 113 ./in.cue:43:11 114 114 ./in.cue:42:7 115 115 ··· 176 176 0: (string){ string } 177 177 } 178 178 result: (_|_){ 179 - // [incomplete] stringListErrors.a.result: non-concrete value string for element 0 of string list argument 0: 179 + // [incomplete] stringListErrors.a.result: error in call to strings.Join: non-concrete value string for element 0 of string list argument 0: 180 180 // ./in.cue:26:11 181 181 // ./in.cue:25:7 182 182 } ··· 187 187 0: (int){ int } 188 188 } 189 189 result: (_|_){ 190 - // [eval] stringListErrors.b.result: invalid list element 0 in argument 0 to call: cannot use value int (int) as string: 190 + // [eval] stringListErrors.b.result: error in call to strings.Join: invalid list element 0 in argument 0 to call: cannot use value int (int) as string: 191 191 // ./in.cue:31:11 192 192 // ./in.cue:30:7 193 193 } ··· 210 210 0: (string){ string } 211 211 } 212 212 result: (_|_){ 213 - // [eval] decimalListErrors.a.result: invalid list element 0 in argument 0 to call: cannot use value string (string) as number: 213 + // [eval] decimalListErrors.a.result: error in call to list.Avg: invalid list element 0 in argument 0 to call: cannot use value string (string) as number: 214 214 // ./in.cue:43:11 215 215 // ./in.cue:42:7 216 216 } ··· 220 220 0: (int){ int } 221 221 } 222 222 result: (_|_){ 223 - // [incomplete] decimalListErrors.b.result: non-concrete value int for element 0 of number list argument 0: 223 + // [incomplete] decimalListErrors.b.result: error in call to list.Avg: non-concrete value int for element 0 of number list argument 0: 224 224 // ./in.cue:48:11 225 225 // ./in.cue:47:7 226 226 }
+3 -3
encoding/jsonschema/testdata/external/tests/draft2019-09/optional/format/date-time.json
··· 94 94 "data": "1998-12-31T23:59:60Z", 95 95 "valid": true, 96 96 "skip": { 97 - "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1998-12-31T23:59:60Z\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1998-12-31T23:59:60Z\":\n generated.cue:1:1\n instance.json:1:1\n", 97 + "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1998-12-31T23:59:60Z\" (does not satisfy time.Time): invalid time \"1998-12-31T23:59:60Z\":\n generated.cue:1:1\n instance.json:1:1\n", 98 98 "v3-roundtrip": "could not extract schema" 99 99 } 100 100 }, ··· 103 103 "data": "1998-12-31T15:59:60.123-08:00", 104 104 "valid": true, 105 105 "skip": { 106 - "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1998-12-31T15:59:60.123-08:00\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1998-12-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n", 106 + "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1998-12-31T15:59:60.123-08:00\" (does not satisfy time.Time): invalid time \"1998-12-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n", 107 107 "v3-roundtrip": "could not extract schema" 108 108 } 109 109 }, ··· 169 169 "data": "1963-06-19t08:30:06.283185z", 170 170 "valid": true, 171 171 "skip": { 172 - "v3": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1963-06-19t08:30:06.283185z\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1963-06-19t08:30:06.283185z\":\n generated.cue:1:1\n instance.json:1:1\n", 172 + "v3": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1963-06-19t08:30:06.283185z\" (does not satisfy time.Time): invalid time \"1963-06-19t08:30:06.283185z\":\n generated.cue:1:1\n instance.json:1:1\n", 173 173 "v3-roundtrip": "could not extract schema" 174 174 } 175 175 },
+5 -5
encoding/jsonschema/testdata/external/tests/draft2020-12/format.json
··· 129 129 "data": "^(abc]", 130 130 "valid": true, 131 131 "skip": { 132 - "v3": "6 errors in empty disjunction:\nconflicting values \"^(abc]\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:39\n instance.json:1:1\nconflicting values \"^(abc]\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"^(abc]\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"^(abc]\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"^(abc]\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:47\n instance.json:1:1\ninvalid value \"^(abc]\" (does not satisfy regexp.Valid): error in call to regexp.Valid: error parsing regexp: missing closing ): `^(abc]`:\n generated.cue:1:1\n instance.json:1:1\n" 132 + "v3": "6 errors in empty disjunction:\nconflicting values \"^(abc]\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:39\n instance.json:1:1\nconflicting values \"^(abc]\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"^(abc]\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"^(abc]\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"^(abc]\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:47\n instance.json:1:1\ninvalid value \"^(abc]\" (does not satisfy regexp.Valid): error parsing regexp: missing closing ): `^(abc]`:\n generated.cue:1:1\n instance.json:1:1\n" 133 133 } 134 134 } 135 135 ] ··· 352 352 "data": "06/19/1963", 353 353 "valid": true, 354 354 "skip": { 355 - "v3": "6 errors in empty disjunction:\nconflicting values \"06/19/1963\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:52\n instance.json:1:1\nconflicting values \"06/19/1963\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"06/19/1963\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"06/19/1963\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"06/19/1963\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:60\n instance.json:1:1\ninvalid value \"06/19/1963\" (does not satisfy time.Format(\"2006-01-02\")): error in call to time.Format: invalid time \"06/19/1963\":\n generated.cue:5:24\n generated.cue:1:1\n generated.cue:5:36\n instance.json:1:1\n", 356 - "v3-roundtrip": "conflicting values \"06/19/1963\" and [...] (mismatched types string and list):\n instance.json:1:1\nconflicting values \"06/19/1963\" and bool (mismatched types string and bool):\n instance.json:1:1\nconflicting values \"06/19/1963\" and null (mismatched types string and null):\n instance.json:1:1\nconflicting values \"06/19/1963\" and number (mismatched types string and number):\n instance.json:1:1\nconflicting values \"06/19/1963\" and {...} (mismatched types string and struct):\n instance.json:1:1\ninvalid value \"06/19/1963\" (does not satisfy time.Format(\"2006-01-02\")): error in call to time.Format: invalid time \"06/19/1963\":\n instance.json:1:1\ninvalid value \"06/19/1963\" (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 355 + "v3": "6 errors in empty disjunction:\nconflicting values \"06/19/1963\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:52\n instance.json:1:1\nconflicting values \"06/19/1963\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"06/19/1963\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"06/19/1963\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"06/19/1963\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:60\n instance.json:1:1\ninvalid value \"06/19/1963\" (does not satisfy time.Format(\"2006-01-02\")): invalid time \"06/19/1963\":\n generated.cue:5:24\n generated.cue:1:1\n generated.cue:5:36\n instance.json:1:1\n", 356 + "v3-roundtrip": "conflicting values \"06/19/1963\" and [...] (mismatched types string and list):\n instance.json:1:1\nconflicting values \"06/19/1963\" and bool (mismatched types string and bool):\n instance.json:1:1\nconflicting values \"06/19/1963\" and null (mismatched types string and null):\n instance.json:1:1\nconflicting values \"06/19/1963\" and number (mismatched types string and number):\n instance.json:1:1\nconflicting values \"06/19/1963\" and {...} (mismatched types string and struct):\n instance.json:1:1\ninvalid value \"06/19/1963\" (does not satisfy time.Format(\"2006-01-02\")): invalid time \"06/19/1963\":\n instance.json:1:1\ninvalid value \"06/19/1963\" (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 357 357 } 358 358 } 359 359 ] ··· 400 400 "data": "1990-02-31T15:59:60.123-08:00", 401 401 "valid": true, 402 402 "skip": { 403 - "v3": "6 errors in empty disjunction:\nconflicting values \"1990-02-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1990-02-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1990-02-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1990-02-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1990-02-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1990-02-31T15:59:60.123-08:00\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1990-02-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n" 403 + "v3": "6 errors in empty disjunction:\nconflicting values \"1990-02-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1990-02-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1990-02-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1990-02-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1990-02-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1990-02-31T15:59:60.123-08:00\" (does not satisfy time.Time): invalid time \"1990-02-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n" 404 404 } 405 405 } 406 406 ] ··· 667 667 "data": "//foo.bar/?baz=qux#quux", 668 668 "valid": true, 669 669 "skip": { 670 - "v3": "6 errors in empty disjunction:\nconflicting values \"//foo.bar/?baz=qux#quux\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:37\n instance.json:1:1\nconflicting values \"//foo.bar/?baz=qux#quux\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"//foo.bar/?baz=qux#quux\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"//foo.bar/?baz=qux#quux\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"//foo.bar/?baz=qux#quux\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:45\n instance.json:1:1\ninvalid value \"//foo.bar/?baz=qux#quux\" (does not satisfy net.AbsURL): error in call to net.AbsURL: URL is not absolute:\n generated.cue:1:1\n instance.json:1:1\n" 670 + "v3": "6 errors in empty disjunction:\nconflicting values \"//foo.bar/?baz=qux#quux\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:37\n instance.json:1:1\nconflicting values \"//foo.bar/?baz=qux#quux\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"//foo.bar/?baz=qux#quux\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"//foo.bar/?baz=qux#quux\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"//foo.bar/?baz=qux#quux\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:45\n instance.json:1:1\ninvalid value \"//foo.bar/?baz=qux#quux\" (does not satisfy net.AbsURL): URL is not absolute:\n generated.cue:1:1\n instance.json:1:1\n" 671 671 } 672 672 } 673 673 ]
+3 -3
encoding/jsonschema/testdata/external/tests/draft2020-12/optional/format/date-time.json
··· 61 61 "data": "1998-12-31T23:59:60Z", 62 62 "valid": true, 63 63 "skip": { 64 - "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1998-12-31T23:59:60Z\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1998-12-31T23:59:60Z\":\n generated.cue:1:1\n instance.json:1:1\n" 64 + "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1998-12-31T23:59:60Z\" (does not satisfy time.Time): invalid time \"1998-12-31T23:59:60Z\":\n generated.cue:1:1\n instance.json:1:1\n" 65 65 } 66 66 }, 67 67 { ··· 69 69 "data": "1998-12-31T15:59:60.123-08:00", 70 70 "valid": true, 71 71 "skip": { 72 - "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1998-12-31T15:59:60.123-08:00\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1998-12-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n" 72 + "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1998-12-31T15:59:60.123-08:00\" (does not satisfy time.Time): invalid time \"1998-12-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n" 73 73 } 74 74 }, 75 75 { ··· 134 134 "data": "1963-06-19t08:30:06.283185z", 135 135 "valid": true, 136 136 "skip": { 137 - "v3": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1963-06-19t08:30:06.283185z\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1963-06-19t08:30:06.283185z\":\n generated.cue:1:1\n instance.json:1:1\n" 137 + "v3": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1963-06-19t08:30:06.283185z\" (does not satisfy time.Time): invalid time \"1963-06-19t08:30:06.283185z\":\n generated.cue:1:1\n instance.json:1:1\n" 138 138 } 139 139 }, 140 140 {
+3 -3
encoding/jsonschema/testdata/external/tests/draft4/optional/format/date-time.json
··· 93 93 "data": "1998-12-31T23:59:60Z", 94 94 "valid": true, 95 95 "skip": { 96 - "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1998-12-31T23:59:60Z\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1998-12-31T23:59:60Z\":\n generated.cue:1:1\n instance.json:1:1\n", 96 + "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1998-12-31T23:59:60Z\" (does not satisfy time.Time): invalid time \"1998-12-31T23:59:60Z\":\n generated.cue:1:1\n instance.json:1:1\n", 97 97 "v3-roundtrip": "could not extract schema" 98 98 } 99 99 }, ··· 102 102 "data": "1998-12-31T15:59:60.123-08:00", 103 103 "valid": true, 104 104 "skip": { 105 - "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1998-12-31T15:59:60.123-08:00\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1998-12-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n", 105 + "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1998-12-31T15:59:60.123-08:00\" (does not satisfy time.Time): invalid time \"1998-12-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n", 106 106 "v3-roundtrip": "could not extract schema" 107 107 } 108 108 }, ··· 168 168 "data": "1963-06-19t08:30:06.283185z", 169 169 "valid": true, 170 170 "skip": { 171 - "v3": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1963-06-19t08:30:06.283185z\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1963-06-19t08:30:06.283185z\":\n generated.cue:1:1\n instance.json:1:1\n", 171 + "v3": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1963-06-19t08:30:06.283185z\" (does not satisfy time.Time): invalid time \"1963-06-19t08:30:06.283185z\":\n generated.cue:1:1\n instance.json:1:1\n", 172 172 "v3-roundtrip": "could not extract schema" 173 173 } 174 174 },
+3 -3
encoding/jsonschema/testdata/external/tests/draft6/optional/format/date-time.json
··· 93 93 "data": "1998-12-31T23:59:60Z", 94 94 "valid": true, 95 95 "skip": { 96 - "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1998-12-31T23:59:60Z\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1998-12-31T23:59:60Z\":\n generated.cue:1:1\n instance.json:1:1\n", 96 + "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1998-12-31T23:59:60Z\" (does not satisfy time.Time): invalid time \"1998-12-31T23:59:60Z\":\n generated.cue:1:1\n instance.json:1:1\n", 97 97 "v3-roundtrip": "could not extract schema" 98 98 } 99 99 }, ··· 102 102 "data": "1998-12-31T15:59:60.123-08:00", 103 103 "valid": true, 104 104 "skip": { 105 - "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1998-12-31T15:59:60.123-08:00\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1998-12-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n", 105 + "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1998-12-31T15:59:60.123-08:00\" (does not satisfy time.Time): invalid time \"1998-12-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n", 106 106 "v3-roundtrip": "could not extract schema" 107 107 } 108 108 }, ··· 168 168 "data": "1963-06-19t08:30:06.283185z", 169 169 "valid": true, 170 170 "skip": { 171 - "v3": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1963-06-19t08:30:06.283185z\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1963-06-19t08:30:06.283185z\":\n generated.cue:1:1\n instance.json:1:1\n", 171 + "v3": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1963-06-19t08:30:06.283185z\" (does not satisfy time.Time): invalid time \"1963-06-19t08:30:06.283185z\":\n generated.cue:1:1\n instance.json:1:1\n", 172 172 "v3-roundtrip": "could not extract schema" 173 173 } 174 174 },
+3 -3
encoding/jsonschema/testdata/external/tests/draft7/optional/format/date-time.json
··· 93 93 "data": "1998-12-31T23:59:60Z", 94 94 "valid": true, 95 95 "skip": { 96 - "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1998-12-31T23:59:60Z\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1998-12-31T23:59:60Z\":\n generated.cue:1:1\n instance.json:1:1\n", 96 + "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1998-12-31T23:59:60Z\" (does not satisfy time.Time): invalid time \"1998-12-31T23:59:60Z\":\n generated.cue:1:1\n instance.json:1:1\n", 97 97 "v3-roundtrip": "could not extract schema" 98 98 } 99 99 }, ··· 102 102 "data": "1998-12-31T15:59:60.123-08:00", 103 103 "valid": true, 104 104 "skip": { 105 - "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1998-12-31T15:59:60.123-08:00\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1998-12-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n", 105 + "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1998-12-31T15:59:60.123-08:00\" (does not satisfy time.Time): invalid time \"1998-12-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n", 106 106 "v3-roundtrip": "could not extract schema" 107 107 } 108 108 }, ··· 168 168 "data": "1963-06-19t08:30:06.283185z", 169 169 "valid": true, 170 170 "skip": { 171 - "v3": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1963-06-19t08:30:06.283185z\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1963-06-19t08:30:06.283185z\":\n generated.cue:1:1\n instance.json:1:1\n", 171 + "v3": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3:44\n instance.json:1:1\ninvalid value \"1963-06-19t08:30:06.283185z\" (does not satisfy time.Time): invalid time \"1963-06-19t08:30:06.283185z\":\n generated.cue:1:1\n instance.json:1:1\n", 172 172 "v3-roundtrip": "could not extract schema" 173 173 } 174 174 },
+3 -3
encoding/jsonschema/testdata/generate/callop.txtar
··· 131 131 } 132 132 } 133 133 -- out/generate-v3/badDate -- 134 - badDate.data.date: invalid value "2025-10-40" (does not satisfy time.Format("2006-01-02")): error in call to time.Format: invalid time "2025-10-40": 134 + badDate.data.date: invalid value "2025-10-40" (does not satisfy time.Format("2006-01-02")): invalid time "2025-10-40": 135 135 1:170 136 136 ./datatest/tests.cue:30:14 137 137 -- out/generate-v3/badDateTime -- 138 - badDateTime.data.dateTime: invalid value "2025-10-02T13" (does not satisfy time.Time): error in call to time.Time: invalid time "2025-10-02T13": 138 + badDateTime.data.dateTime: invalid value "2025-10-02T13" (does not satisfy time.Time): invalid time "2025-10-02T13": 139 139 ./datatest/tests.cue:26:18 140 140 1:215 141 141 -- out/generate-v3/badScore2 -- ··· 144 144 ./datatest/tests.cue:42:15 145 145 1:376 146 146 -- out/generate-v3/badTime -- 147 - badTime.data.date: invalid value "25:00:10" (does not satisfy time.Format("2006-01-02")): error in call to time.Format: invalid time "25:00:10": 147 + badTime.data.date: invalid value "25:00:10" (does not satisfy time.Format("2006-01-02")): invalid time "25:00:10": 148 148 1:170 149 149 ./datatest/tests.cue:34:14 150 150 -- out/generate-v3/badUserName --
+1 -1
encoding/jsonschema/testdata/txtar/openapi_date.txtar
··· 18 18 #schema #Date 19 19 "2023-02-30" 20 20 -- out/decode/testerr/err-out-of-range -- 21 - #Date: invalid value "2023-02-30" (does not satisfy time.Format("2006-01-02")): error in call to time.Format: invalid time "2023-02-30": 21 + #Date: invalid value "2023-02-30" (does not satisfy time.Format("2006-01-02")): invalid time "2023-02-30": 22 22 generated.cue:3:8 23 23 generated.cue:3:20 24 24 test/err-out-of-range.json:2:1
+9 -1
internal/core/adt/expr.go
··· 1560 1560 } 1561 1561 callCtx.args = args 1562 1562 result := builtin.call(callCtx) 1563 - if result == nil { 1563 + switch result := result.(type) { 1564 + case nil: 1564 1565 return nil 1566 + case *Bottom: 1567 + vErr := c.NewPosf(Pos(call), "error in call to %s", builtin.qualifiedName(c)) 1568 + return &Bottom{ 1569 + Code: result.Code, 1570 + Err: errors.Wrap(vErr, result.Err), 1571 + Node: c.vertex, 1572 + } 1565 1573 } 1566 1574 v, ci := c.evalStateCI(result, Flags{status: partial, condition: state.condition, mode: state.mode}) 1567 1575 c.ci = ci
+7 -14
internal/pkg/builtin.go
··· 191 191 192 192 } 193 193 194 - func (x *Builtin) name(ctx *adt.OpContext) string { 195 - if x.Pkg == 0 { 196 - return x.Name 197 - } 198 - return fmt.Sprintf("%s.%s", x.Pkg.StringValue(ctx), x.Name) 199 - } 200 - 201 194 func processErr(call *CallCtxt, errVal interface{}, ret adt.Expr) adt.Expr { 202 195 switch err := errVal.(type) { 203 196 case nil: ··· 216 209 } 217 210 } 218 211 case Bottomer: 219 - ret = wrapCallErr(call, err.Bottom()) 212 + ret = err.Bottom() 220 213 221 214 case errors.Error: 222 215 // Convert lists of errors to a combined Bottom error. ··· 232 225 } 233 226 } 234 227 235 - ret = wrapCallErr(call, &adt.Bottom{Err: err}) 228 + ret = &adt.Bottom{Err: err} 236 229 case error: 237 230 // TODO: store the underlying error explicitly 238 - ret = wrapCallErr(call, &adt.Bottom{Err: errors.Promote(err, "")}) 231 + ret = &adt.Bottom{Err: errors.Promote(err, "")} 239 232 case string, fmt.Stringer: 240 233 // A string or a stringer likely used as a panic value. 241 - ret = wrapCallErr(call, &adt.Bottom{ 234 + ret = &adt.Bottom{ 242 235 Err: errors.Newf(call.ctx.Pos(), "%s", err), 243 - }) 236 + } 244 237 default: 245 238 // Some other value used when panicking; likely a bug. 246 - ret = wrapCallErr(call, &adt.Bottom{ 239 + ret = &adt.Bottom{ 247 240 Err: errors.Newf(call.ctx.Pos(), "BUG: non-stringifiable %T", err), 248 - }) 241 + } 249 242 } 250 243 return ret 251 244 }
+4 -8
internal/pkg/context.go
··· 35 35 Ret any 36 36 } 37 37 38 - func (c *CallCtxt) Name() string { 39 - return c.builtin.name(c.ctx) 40 - } 41 - 42 38 // Do returns whether the call should be done. 43 39 func (c *CallCtxt) Do() bool { 44 40 return c.Err == nil ··· 120 116 return 0 121 117 } 122 118 if n.BitLen() > bitLen { 123 - c.errf(err, "int %s overflows %s in argument %d in call to %s", 124 - n, typ, i, c.Name()) 119 + c.errf(err, "int %s overflows %s in argument %d", 120 + n, typ, i) 125 121 } 126 122 res, _ := x.Int64() 127 123 return res ··· 151 147 return 0 152 148 } 153 149 if n.BitLen() > bitLen { 154 - c.errf(err, "int %s overflows %s in argument %d in call to %s", 155 - n, typ, i, c.Name()) 150 + c.errf(err, "int %s overflows %s in argument %d", 151 + n, typ, i) 156 152 } 157 153 res, _ := x.Uint64() 158 154 return res
+4 -13
internal/pkg/errors.go
··· 58 58 c.Err = &callError{err} 59 59 } 60 60 61 - func wrapCallErr(c *CallCtxt, b *adt.Bottom) *adt.Bottom { 62 - var err errors.Error 63 - for _, e := range errors.Errors(b.Err) { 64 - ne := c.ctx.Newf("error in call to %s", c.builtin.name(c.ctx)) 65 - err = errors.Append(err, errors.Wrap(ne, e)) 66 - } 67 - return &adt.Bottom{Code: b.Code, Err: err} 68 - } 69 - 70 61 func (c *CallCtxt) invalidArgType(arg adt.Value, i int, typ string, err error) { 71 62 if ve, ok := err.(Bottomer); ok && ve.Bottom().IsIncomplete() { 72 63 c.Err = ve ··· 80 71 // a reference. 81 72 if err != nil { 82 73 c.errf(err, 83 - "cannot use %s (type %s) as %s in argument %d to %s", 84 - arg, arg.Kind(), typ, i, c.Name()) 74 + "cannot use %s (type %s) as %s in argument %d", 75 + arg, arg.Kind(), typ, i) 85 76 } else { 86 77 c.errf(err, 87 - "cannot use %s (type %s) as %s in argument %d to %s", 88 - arg, arg.Kind(), typ, i, c.Name()) 78 + "cannot use %s (type %s) as %s in argument %d", 79 + arg, arg.Kind(), typ, i) 89 80 } 90 81 }
+2 -2
pkg/encoding/yaml/testdata/validate.txtar
··· 34 34 invalidDisjuntion: yaml.Validate("a: 3", {a: 1 | 2}) 35 35 -- out/yaml -- 36 36 Errors: 37 - validate.t1.ok1: invalid value "a: 2" (does not satisfy encoding/yaml.Validate): error in call to encoding/yaml.Validate: incomplete value {a:2} | {a:2,b!:int}: 37 + validate.t1.ok1: invalid value "a: 2" (does not satisfy encoding/yaml.Validate): incomplete value {a:2} | {a:2,b!:int}: 38 38 ./in.cue:8:11 39 39 ./in.cue:6:9 40 40 ./in.cue:7:16 ··· 79 79 // TODO: fix this test: the second disjunct should be eliminated, so there 80 80 // should not be a concreteness error. 81 81 t1: { 82 - ok1: _|_ // validate.t1.ok1: invalid value "a: 2" (does not satisfy encoding/yaml.Validate): validate.t1.ok1: error in call to encoding/yaml.Validate: validate.t1.ok1: incomplete value {a:2} | {a:2,b!:int} 82 + ok1: _|_ // validate.t1.ok1: invalid value "a: 2" (does not satisfy encoding/yaml.Validate): validate.t1.ok1: incomplete value {a:2} | {a:2,b!:int} 83 83 ok2: "a: 2" 84 84 ok3: "a: 2" 85 85 }
+3 -3
pkg/list/testdata/gen.txtar
··· 62 62 t53: list.MaxItems([1, 2, 3, 4], 2) 63 63 t54: list.Sort([{a: 1}, {b: 2}], list.Ascending) 64 64 t55: list.Avg([4, 8, 12]) 65 - -- out/list -- 65 + -- out/list-v3 -- 66 66 Errors: 67 67 t2: error in call to list.Avg: empty list: 68 68 ./in.cue:4:6 ··· 102 102 t40: error in call to list.Sort: 2 errors in empty disjunction:: 103 103 ./in.cue:46:6 104 104 list:13:9 105 - t42: invalid list element 0 in argument 0 to call: cannot use value 1 (int) as string: 105 + t42: error in call to list.SortStrings: invalid list element 0 in argument 0 to call: cannot use value 1 (int) as string: 106 106 ./in.cue:48:6 107 107 ./in.cue:48:24 108 108 t45: cannot use "foo" (type string) as list in argument 1 to list.Sum: ··· 164 164 }] 165 165 t40: _|_ // t40: error in call to list.Sort: Ascending.x: 2 errors in empty disjunction: (and 5 more errors) 166 166 t41: ["a", "b"] 167 - t42: _|_ // t42: invalid list element 0 in argument 0 to call: cannot use value 1 (int) as string 167 + t42: _|_ // t42: error in call to list.SortStrings: t42: invalid list element 0 in argument 0 to call: cannot use value 1 (int) as string 168 168 t43: 10 169 169 t44: 0 170 170 t45: _|_ // t45: cannot use "foo" (type string) as list in argument 1 to list.Sum
+11 -9
pkg/list/testdata/issues.txtar
··· 100 100 } 101 101 -- out/list-v3 -- 102 102 Errors: 103 - 0: invalid operands 2 and {num:6} to '+' (type int and struct): 104 - ./in.cue:53:3 103 + issue3541: error in call to list.Sum: invalid operands 2 and {num:6} to '+' (type int and struct): 104 + ./in.cue:52:2 105 105 ./in.cue:35:9 106 106 ./in.cue:36:10 107 + ./in.cue:53:3 107 108 108 109 Result: 109 110 issue563: { ··· 128 129 a: *1 | 2 129 130 sum: 1 130 131 } 131 - issue3541: _|_ // 0: invalid operands 2 and {num:6} to '+' (type int and struct) 132 + issue3541: _|_ // issue3541: error in call to list.Sum: 0: invalid operands 2 and {num:6} to '+' (type int and struct) 132 133 issue2594: { 133 134 sumFirst: { 134 135 #Def: { ··· 171 172 diff old new 172 173 --- old 173 174 +++ new 174 - @@ -1,11 +1,8 @@ 175 + @@ -1,11 +1,9 @@ 175 176 Errors: 176 177 -issue2594.sumSecond.x: conflicting values 0 and 6: 177 178 - ./in.cue:71:3 ··· 180 181 - ./in.cue:75:6 181 182 -issue3416.sumFirst.a.b: field y not allowed by earlier comprehension or reference cycle 182 183 -issue3416.sumFirst.a.b: field z not allowed by earlier comprehension or reference cycle 183 - +0: invalid operands 2 and {num:6} to '+' (type int and struct): 184 - + ./in.cue:53:3 184 + +issue3541: error in call to list.Sum: invalid operands 2 and {num:6} to '+' (type int and struct): 185 + + ./in.cue:52:2 185 186 + ./in.cue:35:9 186 187 + ./in.cue:36:10 188 + + ./in.cue:53:3 187 189 188 190 Result: 189 191 issue563: { 190 - @@ -30,7 +27,7 @@ 192 + @@ -30,7 +28,7 @@ 191 193 a: *1 | 2 192 194 sum: 1 193 195 } 194 196 -issue3541: {} 195 - +issue3541: _|_ // 0: invalid operands 2 and {num:6} to '+' (type int and struct) 197 + +issue3541: _|_ // issue3541: error in call to list.Sum: 0: invalid operands 2 and {num:6} to '+' (type int and struct) 196 198 issue2594: { 197 199 sumFirst: { 198 200 #Def: { 199 - @@ -47,13 +44,18 @@ 201 + @@ -47,13 +45,18 @@ 200 202 0 201 203 #In: [...number] 202 204 }
+3 -3
pkg/math/testdata/gen.txtar
··· 22 22 t31: math.Log2(5) 23 23 t32: math.Dim(3, 2.5) 24 24 t33: math.Dim(5, 7.2) 25 - -- out/math -- 25 + -- out/math-v3 -- 26 26 Errors: 27 27 t3: cannot call non-function math.Pi (type float): 28 28 ./in.cue:4:6 29 29 t6: error in call to math.Jacobi: big: invalid 2nd argument to Int.Jacobi: need odd integer but got 2000: 30 30 ./in.cue:5:6 31 - t8: cannot use 2.0E+400 (type float) as float64 in argument 0 to math.Asin: value was rounded up: 31 + t8: error in call to math.Asin: cannot use 2.0E+400 (type float) as float64 in argument 0: value was rounded up: 32 32 ./in.cue:7:6 33 33 ./in.cue:7:16 34 34 ··· 37 37 t3: _|_ // t3: cannot call non-function math.Pi (type float) 38 38 t6: _|_ // t6: error in call to math.Jacobi: big: invalid 2nd argument to Int.Jacobi: need odd integer but got 2000 39 39 t7: 1 40 - t8: _|_ // t8: cannot use 2.0E+400 (type float) as float64 in argument 0 to math.Asin: value was rounded up 40 + t8: _|_ // t8: error in call to math.Asin: t8: cannot use 2.0E+400 (type float) as float64 in argument 0: value was rounded up 41 41 t16: 4096 42 42 t17: 10000 43 43 t18: true
+18 -18
pkg/net/testdata/gen.txtar
··· 56 56 t47: net.AddIPCIDR("255.0.0.0/8", 1) 57 57 -- out/net-v3 -- 58 58 Errors: 59 - t20b: invalid value 123 (does not satisfy net.IPCIDR): error in call to net.IPCIDR: invalid type int for IP CIDR: 59 + t20b: invalid value 123 (does not satisfy net.IPCIDR): invalid type int for IP CIDR: 60 60 ./in.cue:23:7 61 - t20c: invalid value 123 (does not satisfy net.IP): error in call to net.IP: invalid type int for IP address: 61 + t20c: invalid value 123 (does not satisfy net.IP): invalid type int for IP address: 62 62 ./in.cue:24:7 63 - t20d: invalid value 123 (does not satisfy net.IPv4): error in call to net.IPv4: invalid type int for IP address: 63 + t20d: invalid value 123 (does not satisfy net.IPv4): invalid type int for IP address: 64 64 ./in.cue:25:7 65 - t20e: invalid value 123 (does not satisfy net.IPv6): error in call to net.IPv6: invalid type int for IP address: 65 + t20e: invalid value 123 (does not satisfy net.IPv6): invalid type int for IP address: 66 66 ./in.cue:26:7 67 - t25: invalid value "2001:db8::1234567" (does not satisfy net.IPv6): error in call to net.IPv6: ParseAddr("2001:db8::1234567"): each group must have 4 or less digits (at "1234567"): 67 + t25: invalid value "2001:db8::1234567" (does not satisfy net.IPv6): ParseAddr("2001:db8::1234567"): each group must have 4 or less digits (at "1234567"): 68 68 ./in.cue:31:6 69 69 ./in.cue:31:17 70 - t30: invalid value "%" (does not satisfy net.URL): error in call to net.URL: parse "%": invalid URL escape "%": 70 + t30: invalid value "%" (does not satisfy net.URL): parse "%": invalid URL escape "%": 71 71 ./in.cue:36:6 72 72 ./in.cue:36:16 73 - t32: invalid value "/foo/bar" (does not satisfy net.AbsURL): error in call to net.AbsURL: URL is not absolute: 73 + t32: invalid value "/foo/bar" (does not satisfy net.AbsURL): URL is not absolute: 74 74 ./in.cue:38:6 75 75 ./in.cue:38:19 76 - t34: invalid value "%" (does not satisfy net.AbsURL): error in call to net.AbsURL: parse "%": invalid URL escape "%": 76 + t34: invalid value "%" (does not satisfy net.AbsURL): parse "%": invalid URL escape "%": 77 77 ./in.cue:40:6 78 78 ./in.cue:40:19 79 - t9: invalid value "23.23.23.2333" (does not satisfy net.IPv4): error in call to net.IPv4: ParseAddr("23.23.23.2333"): IPv4 field has value >255: 79 + t9: invalid value "23.23.23.2333" (does not satisfy net.IPv4): ParseAddr("23.23.23.2333"): IPv4 field has value >255: 80 80 ./in.cue:11:6 81 81 ./in.cue:11:17 82 82 t7: error in call to net.JoinHostPort: invalid host [192, 30, 4]: ··· 111 111 t6: "192.30.4.2:80" 112 112 t7: _|_ // t7: error in call to net.JoinHostPort: invalid host [192, 30, 4] 113 113 t8: true 114 - t9: _|_ // t9: invalid value "23.23.23.2333" (does not satisfy net.IPv4): t9: error in call to net.IPv4: ParseAddr("23.23.23.2333"): IPv4 field has value >255 114 + t9: _|_ // t9: invalid value "23.23.23.2333" (does not satisfy net.IPv4): ParseAddr("23.23.23.2333"): IPv4 field has value >255 115 115 t10: true 116 116 t11: true 117 117 t12: false ··· 123 123 t18: true 124 124 t19: true 125 125 t20: _|_ // t20: error in call to net.IPCIDR: netip.ParsePrefix("172.16.12.3"): no '/' 126 - t20b: _|_ // t20b: invalid value 123 (does not satisfy net.IPCIDR): t20b: error in call to net.IPCIDR: invalid type int for IP CIDR 127 - t20c: _|_ // t20c: invalid value 123 (does not satisfy net.IP): t20c: error in call to net.IP: invalid type int for IP address 128 - t20d: _|_ // t20d: invalid value 123 (does not satisfy net.IPv4): t20d: error in call to net.IPv4: invalid type int for IP address 129 - t20e: _|_ // t20e: invalid value 123 (does not satisfy net.IPv6): t20e: error in call to net.IPv6: invalid type int for IP address 126 + t20b: _|_ // t20b: invalid value 123 (does not satisfy net.IPCIDR): invalid type int for IP CIDR 127 + t20c: _|_ // t20c: invalid value 123 (does not satisfy net.IP): invalid type int for IP address 128 + t20d: _|_ // t20d: invalid value 123 (does not satisfy net.IPv4): invalid type int for IP address 129 + t20e: _|_ // t20e: invalid value 123 (does not satisfy net.IPv6): invalid type int for IP address 130 130 t21: "foo%2Fbar" 131 131 t22: "foo/bar" 132 132 t23: "f%25o" 133 133 t24: "f%o" 134 - t25: _|_ // t25: invalid value "2001:db8::1234567" (does not satisfy net.IPv6): t25: error in call to net.IPv6: ParseAddr("2001:db8::1234567"): each group must have 4 or less digits (at "1234567") 134 + t25: _|_ // t25: invalid value "2001:db8::1234567" (does not satisfy net.IPv6): ParseAddr("2001:db8::1234567"): each group must have 4 or less digits (at "1234567") 135 135 t26: true 136 136 t27: _|_ // t27: invalid value "23.23.23.23" (does not satisfy net.IPv6) 137 137 t28: true 138 138 t29: "/foo/bar" 139 - t30: _|_ // t30: invalid value "%" (does not satisfy net.URL): t30: error in call to net.URL: parse "%": invalid URL escape "%" 139 + t30: _|_ // t30: invalid value "%" (does not satisfy net.URL): parse "%": invalid URL escape "%" 140 140 t31: "https://foo.com/bar" 141 - t32: _|_ // t32: invalid value "/foo/bar" (does not satisfy net.AbsURL): t32: error in call to net.AbsURL: URL is not absolute 141 + t32: _|_ // t32: invalid value "/foo/bar" (does not satisfy net.AbsURL): URL is not absolute 142 142 t33: "https://foo.com/bar" 143 - t34: _|_ // t34: invalid value "%" (does not satisfy net.AbsURL): t34: error in call to net.AbsURL: parse "%": invalid URL escape "%" 143 + t34: _|_ // t34: invalid value "%" (does not satisfy net.AbsURL): parse "%": invalid URL escape "%" 144 144 t35: "127.0.0.2" 145 145 t36: "127.0.0.3/8" 146 146 t37: "2001:db8::1"
+3 -3
pkg/regexp/testdata/gen.txtar
··· 23 23 24 24 t15: regexp.ReplaceAllLiteral(#"f(?P<A>\w)(?P<B>\w)"#, "afloat afoot from", "-${A}-${B}-") 25 25 t16: regexp.ReplaceAllLiteral(#"f(?P<A>\w)(?P<B>\w)"#, "afloat afoot from", "-$1-$2-") 26 - -- out/regexp -- 26 + -- out/regexp-v3 -- 27 27 Errors: 28 - t13: invalid value "invalid)" (does not satisfy regexp.Valid): error in call to regexp.Valid: error parsing regexp: unexpected ): `invalid)`: 28 + t13: invalid value "invalid)" (does not satisfy regexp.Valid): error parsing regexp: unexpected ): `invalid)`: 29 29 ./in.cue:15:6 30 30 ./in.cue:15:21 31 31 t2: error in call to regexp.Find: no match: ··· 64 64 }] 65 65 t11: _|_ // t11: error in call to regexp.FindAllNamedSubmatch: no match 66 66 t12: "valid" 67 - t13: _|_ // t13: invalid value "invalid)" (does not satisfy regexp.Valid): t13: error in call to regexp.Valid: error parsing regexp: unexpected ): `invalid)` 67 + t13: _|_ // t13: invalid value "invalid)" (does not satisfy regexp.Valid): error parsing regexp: unexpected ): `invalid)` 68 68 69 69 // The following two calls should be identical 70 70 t14: "a-l-o-at a-o-o-t -r-o-m"
+3 -3
pkg/strings/testdata/gen.txtar
··· 20 20 t15: strings.MaxRunes(10) & "hello" 21 21 t16: strings.MaxRunes(3) & "hello" 22 22 t17: strings.MinRunes(10) & "hello" 23 - -- out/strings -- 23 + -- out/strings-v3 -- 24 24 Errors: 25 - t2: invalid list element 0 in argument 0 to call: cannot use value 1 (int) as string: 25 + t2: error in call to strings.Join: invalid list element 0 in argument 0 to call: cannot use value 1 (int) as string: 26 26 ./in.cue:4:6 27 27 ./in.cue:4:20 28 28 t10: invalid value "quux" (does not satisfy strings.MaxRunes(3)): ··· 44 44 45 45 Result: 46 46 t1: "Hello World!" 47 - t2: _|_ // t2: invalid list element 0 in argument 0 to call: cannot use value 1 (int) as string 47 + t2: _|_ // t2: error in call to strings.Join: t2: invalid list element 0 in argument 0 to call: cannot use value 1 (int) as string 48 48 t3: 97 49 49 t4: 'llo' 50 50 t5: "✓ H"
+3 -3
pkg/time/testdata/gen.txtar
··· 24 24 split: { 25 25 t1: time.Split("2017-07-14T02:40:00.000123456Z") 26 26 } 27 - -- out/time -- 27 + -- out/time-v3 -- 28 28 Errors: 29 - t2: invalid value "no time" (does not satisfy time.Time): error in call to time.Time: invalid time "no time": 29 + t2: invalid value "no time" (does not satisfy time.Time): invalid time "no time": 30 30 ./in.cue:4:5 31 31 ./in.cue:4:17 32 32 33 33 Result: 34 34 t1: "1937-01-01T12:00:27.87+00:20" 35 - t2: _|_ // t2: invalid value "no time" (does not satisfy time.Time): t2: error in call to time.Time: invalid time "no time" 35 + t2: _|_ // t2: invalid value "no time" (does not satisfy time.Time): invalid time "no time" 36 36 t3: "2017-07-14T02:40:00.000123456Z" 37 37 parse: { 38 38 t1: "2021-07-01T17:54:00Z"