this repo has no description
0
fork

Configure Feed

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

internal/core/adt: set label of current node in Unify

This results in better paths.

Note that this increases counters. This will soon
be moot, though, as new closedness gets away with
these.

Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: Ie728dcf0b11275ed74b0d20a2efd7f608b3540f0
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1210975
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Matthew Sackman <matthew@cue.works>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>

+25 -4
+20 -3
cue/testdata/cycle/builtins.txtar
··· 731 731 // ./matchn.cue:63:6 732 732 // ./matchn.cue:62:8 733 733 // ./matchn.cue:63:13 734 - // issue3633.final.a: field is required but not present: 735 - // ./matchn.cue:63:17 736 - // ./matchn.cue:63:29 737 734 // issue3633.final.data: invalid value {} (does not satisfy matchN): 0 matched, expected 1: 738 735 // ./matchn.cue:63:17 739 736 // ./matchn.cue:62:8 740 737 // ./matchn.cue:63:24 738 + // issue3633.final.data.a: field is required but not present: 739 + // ./matchn.cue:63:17 740 + // ./matchn.cue:63:29 741 741 } 742 742 #s: (_){ matchN(1, (#list){ 743 743 0: (_|_){// matchN(1, [ ··· 1120 1120 n: (struct){ 1121 1121 n: (_){ _ } 1122 1122 } 1123 + @@ -393,13 +432,13 @@ 1124 + // ./matchn.cue:63:6 1125 + // ./matchn.cue:62:8 1126 + // ./matchn.cue:63:13 1127 + - // issue3633.final.a: field is required but not present: 1128 + - // ./matchn.cue:63:17 1129 + - // ./matchn.cue:63:29 1130 + // issue3633.final.data: invalid value {} (does not satisfy matchN): 0 matched, expected 1: 1131 + // ./matchn.cue:63:17 1132 + // ./matchn.cue:62:8 1133 + // ./matchn.cue:63:24 1134 + + // issue3633.final.data.a: field is required but not present: 1135 + + // ./matchn.cue:63:17 1136 + + // ./matchn.cue:63:29 1137 + } 1138 + #s: (_){ matchN(1, (#list){ 1139 + 0: (_|_){// matchN(1, [ 1123 1140 @@ -417,8 +456,8 @@ 1124 1141 a?: ((string|bytes)){ "encoding/yaml".Validate(yamlNoCycle.#c) } 1125 1142 }
+3
internal/core/adt/composite.go
··· 995 995 // early enough to error on schemas used for validation. 996 996 if n := c.vertex; n != nil { 997 997 v.Parent = n.Parent 998 + if c.isDevVersion() { 999 + v.Label = n.Label // this doesn't work in V2 1000 + } 998 1001 } 999 1002 1000 1003 addConjuncts(c, v, a)
+2 -1
internal/core/adt/eval_test.go
··· 77 77 // TODO: These counters should all go to zero. 78 78 var skipDebugDepErrors = map[string]int{ 79 79 "basicrewrite/018_self-reference_cycles": 3, 80 + "builtins/matchn": 2, 80 81 "cycle/025_cannot_resolve_references_that_would_be_ambiguous": 1, 81 82 "cycle/051_resolved_self-reference_cycles_with_disjunction": 2, 82 83 83 84 "cycle/052_resolved_self-reference_cycles_with_disjunction_with_defaults": 1, 84 - "cycle/builtins": 3, 85 + "cycle/builtins": 9, 85 86 "cycle/issue241": 2, 86 87 "cycle/issue429": 1, 87 88