cuelang.org/go@v0.13.0/internal/core/export/testdata/main/simplify.txtar (about) 1 -- in.cue -- 2 import "strings" 3 4 x: [string]: int64 5 x: { 6 y: int 7 } 8 s: strings.MinRunes(4) & strings.MaxRunes(7) 9 10 additional: { 11 ... 12 env: _ 13 confs: { 14 if env {} 15 } 16 } 17 -- out/definition -- 18 import "strings" 19 20 x: { 21 { 22 [string]: int64 23 } 24 y: int 25 } 26 s: strings.MinRunes(4) & strings.MaxRunes(7) 27 additional: { 28 env: _ 29 confs: { 30 if env {} 31 } 32 ... 33 } 34 -- out/doc -- 35 [] 36 [x] 37 [x y] 38 [s] 39 [additional] 40 [additional env] 41 [additional confs] 42 -- diff/value/explanation -- 43 Benign change in error message. 44 -- out/value-v3 -- 45 == Simplified 46 { 47 x: { 48 y: int64 49 } 50 s: strings.MinRunes(4) & strings.MaxRunes(7) 51 additional: { 52 env: _ 53 confs: { 54 if env {} 55 } 56 } 57 } 58 == Raw 59 { 60 x: { 61 y: int & >=-9223372036854775808 & <=9223372036854775807 62 } 63 s: strings.MinRunes(4) & strings.MaxRunes(7) 64 additional: { 65 env: _ 66 confs: { 67 if env {} 68 } 69 } 70 } 71 == Final 72 { 73 x: { 74 y: int64 75 } 76 s: strings.MinRunes(4) & strings.MaxRunes(7) 77 additional: { 78 env: _ 79 confs: _|_ // additional.confs: incomplete bool: _ 80 } 81 } 82 == All 83 { 84 x: { 85 y: int64 86 } 87 s: strings.MinRunes(4) & strings.MaxRunes(7) 88 additional: { 89 env: _ 90 confs: { 91 if env {} 92 } 93 } 94 } 95 == Eval 96 { 97 x: { 98 y: int & >=-9223372036854775808 & <=9223372036854775807 99 } 100 s: strings.MinRunes(4) & strings.MaxRunes(7) 101 additional: { 102 env: _ 103 confs: { 104 if env {} 105 } 106 } 107 } 108 -- diff/-out/value-v3<==>+out/value -- 109 diff old new 110 --- old 111 +++ new 112 @@ -32,7 +32,7 @@ 113 s: strings.MinRunes(4) & strings.MaxRunes(7) 114 additional: { 115 env: _ 116 - confs: _|_ // incomplete bool: _ 117 + confs: _|_ // additional.confs: incomplete bool: _ 118 } 119 } 120 == All 121 -- out/value -- 122 == Simplified 123 { 124 x: { 125 y: int64 126 } 127 s: strings.MinRunes(4) & strings.MaxRunes(7) 128 additional: { 129 env: _ 130 confs: { 131 if env {} 132 } 133 } 134 } 135 == Raw 136 { 137 x: { 138 y: int & >=-9223372036854775808 & <=9223372036854775807 139 } 140 s: strings.MinRunes(4) & strings.MaxRunes(7) 141 additional: { 142 env: _ 143 confs: { 144 if env {} 145 } 146 } 147 } 148 == Final 149 { 150 x: { 151 y: int64 152 } 153 s: strings.MinRunes(4) & strings.MaxRunes(7) 154 additional: { 155 env: _ 156 confs: _|_ // incomplete bool: _ 157 } 158 } 159 == All 160 { 161 x: { 162 y: int64 163 } 164 s: strings.MinRunes(4) & strings.MaxRunes(7) 165 additional: { 166 env: _ 167 confs: { 168 if env {} 169 } 170 } 171 } 172 == Eval 173 { 174 x: { 175 y: int & >=-9223372036854775808 & <=9223372036854775807 176 } 177 s: strings.MinRunes(4) & strings.MaxRunes(7) 178 additional: { 179 env: _ 180 confs: { 181 if env {} 182 } 183 } 184 }