this repo has no description
0
fork

Configure Feed

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

internal/cueexperiment: flip modules experiment flag default

This change enables the modules experiment by default.
This will cause CUE code to fail if there is no language
version in the module.cue file, amongst other things.

The experiment can be disabled by setting

CUE_EXPERIMENT=modules=0

Many of the unit tests need to be changed in order to
add the now-mandatory language.version field.

Some error messages have now changed.

Some logic in the `cue fmt` command that relies on seeing
a `load.PackageError` required the respective code inside
`cue/load` to produce that error, which also changes some
error messages.

The `cue mod fix` command is now available to make it
it more straightforward to migrate.

The module path in encoding/gocode/testdata/cue.mod/module.cue
has been changed to match the modules-enabled default,
otherwise the generation code fails with an error about a mismatched
module path.

Fixes #3127.

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I7c384c785eac6203966460703283ecfa2d9f0447
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194664
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>

+68 -54
+4 -11
cmd/cue/cmd/script_test.go
··· 239 239 if err != nil { 240 240 return fmt.Errorf("cannot read workdir: %v", err) 241 241 } 242 - hasRegistry := false 242 + // As modules are enabled by default, we always want a cache directory. 243 + // Since os.UserCacheDir relies on OS-specific env vars that we don't set, 244 + // explicitly set up the cache directory somewhere predictable. 245 + e.Vars = append(e.Vars, "CUE_CACHE_DIR="+filepath.Join(e.WorkDir, ".tmp/cache")) 243 246 for _, entry := range entries { 244 247 if !entry.IsDir() { 245 248 continue ··· 250 253 } 251 254 // There's a _registry directory. Start a fake registry server to serve 252 255 // the modules in it. 253 - hasRegistry = true 254 256 registryDir := filepath.Join(e.WorkDir, entry.Name()) 255 257 prefix := "" 256 258 if data, err := os.ReadFile(filepath.Join(e.WorkDir, "_registry"+regID+"_prefix")); err == nil { ··· 268 270 // This enables some tests to construct their own malformed 269 271 // CUE_REGISTRY values that still refer to the test registry. 270 272 "DEBUG_REGISTRY"+regID+"_HOST="+reg.Host(), 271 - // Some tests execute cue commands that need to write cache files. 272 - // Since os.UserCacheDir relies on OS-specific env vars that we don't set, 273 - // explicitly set up the cache directory somewhere predictable. 274 - "CUE_CACHE_DIR="+filepath.Join(e.WorkDir, ".tmp/cache"), 275 273 ) 276 274 e.Defer(reg.Close) 277 - } 278 - if hasRegistry { 279 - e.Vars = append(e.Vars, 280 - "CUE_EXPERIMENT=modules", 281 - ) 282 275 } 283 276 return nil 284 277 },
+3 -3
cmd/cue/cmd/testdata/script/cmd_filetypes.txtar
··· 29 29 cmp stdout export.golden 30 30 # TODO(mvdan): we should support loading packages from absolute directories. 31 31 ! exec cue export ${WORK}${/}somepkg 32 - [!windows] stderr 'cannot find package ".*somepkg"' 32 + [!windows] stderr 'no location found for package ".*somepkg"' 33 33 [windows] stderr 'no encoding specified for file ".*somepkg.*"' 34 34 ! exec cue export ${WORK}${/}somepkg${/} 35 - [!windows] stderr 'cannot find package ".*somepkg"' 35 + [!windows] stderr 'no dependency found for package ".*somepkg"' 36 36 [windows] stderr 'no encoding specified for file ".*somepkg.*"' 37 37 38 38 # Now do some of the same filename tests, but for a file without any extension. ··· 57 57 stderr 'cannot find package "\./somefile"' 58 58 # TODO(mvdan): we probably should not behave differently on Windows. 59 59 ! exec cue export ${WORK}${/}somefile 60 - [!windows] stderr 'cannot find package ".*somefile"' 60 + [!windows] stderr 'no location found for package ".*somefile"' 61 61 [windows] stderr 'no encoding specified for file ".*somefile"' 62 62 63 63 -- cue.mod/module.cue --
+1 -2
cmd/cue/cmd/testdata/script/issue174.txtar
··· 1 1 ! exec cue export ./issue174 2 2 cmp stderr expect-stderr 3 3 -- expect-stderr -- 4 - build constraints exclude all CUE files in ./issue174: 5 - issue174/issue174.cue: no package name 4 + cannot enumerate all module imports: invalid import path "'foo'" in issue174/issue174.cue 6 5 -- cue.mod/module.cue -- 7 6 module: "mod.test" 8 7 language: version: "v0.9.0"
+1
cmd/cue/cmd/testdata/script/modinit_nomajorversion.txtar
··· 2 2 env-fill want-module-experiment.cue 3 3 4 4 # Without the experiment, we use the module path as-is. 5 + env CUE_EXPERIMENT=modules=false 5 6 exec cue mod init foo.com/bar 6 7 cmp cue.mod/module.cue want-module.cue 7 8 exists cue.mod/usr
+2 -2
cmd/cue/cmd/testdata/script/modinit_withsource.txtar
··· 19 19 cmp stderr $WORK/want-stderr 20 20 21 21 -- want-module.cue-0 -- 22 - module: "test.example" 22 + module: "test.example@v0" 23 23 language: { 24 24 version: "$CUE_LANGUAGE_VERSION" 25 25 } ··· 27 27 kind: "self" 28 28 } 29 29 -- want-module.cue-1 -- 30 - module: "test.example" 30 + module: "test.example@v0" 31 31 language: { 32 32 version: "$CUE_LANGUAGE_VERSION" 33 33 }
+1
cmd/cue/cmd/testdata/script/modpublish_registry_not_enabled.txtar
··· 1 + env CUE_EXPERIMENT=modules=false 1 2 ! exec cue mod publish v1.0.0 2 3 cmp stderr want-stderr 3 4 -- want-stderr --
+5
cmd/cue/cmd/testdata/script/modtidy_default_modules_mode.txtar
··· 1 + # Check that modules are enabled by default. 2 + exec cue mod tidy 3 + -- cue.mod/module.cue -- 4 + module: "test.example" 5 + language: version: "v0.9.0"
+2
cmd/cue/cmd/testdata/script/modtidy_registry_not_enabled.txtar
··· 1 + env CUE_EXPERIMENT=modules=0 2 + 1 3 ! exec cue mod tidy 2 4 cmp stderr want-stderr 3 5 -- want-stderr --
+2 -2
cmd/cue/cmd/testdata/script/registry_experiment_not_set.txtar cmd/cue/cmd/testdata/script/registry_modules_disabled.txtar
··· 1 - # When CUE_EXPERIMENT is empty, the CUE_REGISTRY 1 + # When CUE_EXPERIMENT is disabled, the CUE_REGISTRY 2 2 # variable is ignored, as are the new fields in module.cue 3 3 4 - env CUE_EXPERIMENT= 4 + env CUE_EXPERIMENT=modules=false 5 5 exec cue export . 6 6 cmp stdout expect-stdout 7 7
+1 -1
cmd/cue/cmd/testdata/script/registry_no_experiment_warning.txtar cmd/cue/cmd/testdata/script/registry_modules_disabled_warning.txtar
··· 1 - env CUE_EXPERIMENT= 1 + env CUE_EXPERIMENT=modules=false 2 2 env CUE_REGISTRY=ignored.example.com 3 3 exec cue export . 4 4 cmp stdout expect-stdout
+1
cue/interpreter/wasm/exe_test.go
··· 50 50 RequireUniqueNames: true, 51 51 Setup: func(e *testscript.Env) error { 52 52 copyWasmFiles(t, e.WorkDir, wasmFiles) 53 + e.Vars = append(e.Vars, "CUE_CACHE_DIR="+filepath.Join(e.WorkDir, ".tmp/cache")) 53 54 return nil 54 55 }, 55 56 Condition: cuetest.Condition,
+37 -25
cue/load/loader_test.go
··· 77 77 name: "BadModuleFile", 78 78 cfg: badModCfg, 79 79 args: []string{"."}, 80 - want: `err: module: cannot use value 123 (type int) as string: 80 + want: `err: module: 2 errors in empty disjunction: 81 + module: conflicting values 123 and "" (mismatched types int and string): 81 82 $CWD/testdata/badmod/cue.mod/module.cue:2:9 83 + cuelang.org/go/mod/modfile/schema.cue:56:22 84 + module: conflicting values 123 and string (mismatched types int and string): 85 + $CWD/testdata/badmod/cue.mod/module.cue:2:9 86 + cuelang.org/go/mod/modfile/schema.cue:56:12 87 + cuelang.org/go/mod/modfile/schema.cue:101:12 82 88 path: "" 83 89 module: "" 84 90 root: "" ··· 91 97 // package of this directory. 92 98 cfg: dirCfg, 93 99 args: nil, 94 - want: `err: import failed: cannot find package "mod.test/test/sub": 95 - $CWD/testdata/testmod/test.cue:3:8 96 - path: mod.test/test@v0 100 + want: `path: mod.test/test@v0 97 101 module: mod.test/test@v0 98 102 root: $CWD/testdata/testmod 99 103 dir: $CWD/testdata/testmod 100 104 display:. 101 105 files: 102 - $CWD/testdata/testmod/test.cue`}, { 106 + $CWD/testdata/testmod/test.cue 107 + imports: 108 + mod.test/test/sub: $CWD/testdata/testmod/sub/sub.cue`}, { 103 109 name: "DefaultPackageWithExplicitDotArgument", 104 110 // Even though the directory is called testdata, the last path in 105 111 // the module is test. So "package test" is correctly the default 106 112 // package of this directory. 107 113 cfg: dirCfg, 108 114 args: []string{"."}, 109 - want: `err: import failed: cannot find package "mod.test/test/sub": 110 - $CWD/testdata/testmod/test.cue:3:8 111 - path: mod.test/test@v0 115 + want: `path: mod.test/test@v0 112 116 module: mod.test/test@v0 113 117 root: $CWD/testdata/testmod 114 118 dir: $CWD/testdata/testmod 115 119 display:. 116 120 files: 117 - $CWD/testdata/testmod/test.cue`}, { 121 + $CWD/testdata/testmod/test.cue 122 + imports: 123 + mod.test/test/sub: $CWD/testdata/testmod/sub/sub.cue`}, { 118 124 name: "RelativeImportPathWildcard", 119 125 cfg: dirCfg, 120 126 args: []string{"./other/..."}, ··· 150 156 name: "RelativePathSuccess", 151 157 cfg: dirCfg, 152 158 args: []string{"./hello"}, 153 - want: `err: import failed: cannot find package "mod.test/test/sub": 154 - $CWD/testdata/testmod/test.cue:3:8 155 - path: mod.test/test/hello@v0:test 159 + want: `path: mod.test/test/hello@v0:test 156 160 module: mod.test/test@v0 157 161 root: $CWD/testdata/testmod 158 162 dir: $CWD/testdata/testmod/hello 159 163 display:./hello 160 164 files: 161 165 $CWD/testdata/testmod/test.cue 162 - $CWD/testdata/testmod/hello/test.cue`}, { 166 + $CWD/testdata/testmod/hello/test.cue 167 + imports: 168 + mod.test/test/sub: $CWD/testdata/testmod/sub/sub.cue`}, { 163 169 name: "ExplicitPackageIdentifier", 164 170 cfg: dirCfg, 165 171 args: []string{"mod.test/test/hello:test"}, 166 - want: `err: cannot find package "mod.test/test/hello:test" 167 - path: mod.test/test/hello:test 172 + want: `path: mod.test/test/hello:test 168 173 module: mod.test/test@v0 169 174 root: $CWD/testdata/testmod 170 - dir: $CWD/testdata/testmod/cue.mod/gen/mod.test/test/hello 171 - display:mod.test/test/hello:test`, 172 - }, { 175 + dir: $CWD/testdata/testmod/hello 176 + display:mod.test/test/hello:test 177 + files: 178 + $CWD/testdata/testmod/test.cue 179 + $CWD/testdata/testmod/hello/test.cue 180 + imports: 181 + mod.test/test/sub: $CWD/testdata/testmod/sub/sub.cue`}, { 173 182 name: "NoPackageName", 174 183 cfg: dirCfg, 175 184 args: []string{"mod.test/test/hello:nonexist"}, 176 - want: `err: cannot find package "mod.test/test/hello:nonexist" 185 + want: `err: build constraints exclude all CUE files in mod.test/test/hello:nonexist: 186 + anon.cue: no package name 187 + test.cue: package is test, want nonexist 188 + hello/test.cue: package is test, want nonexist 177 189 path: mod.test/test/hello:nonexist 178 190 module: mod.test/test@v0 179 191 root: $CWD/testdata/testmod 180 - dir: $CWD/testdata/testmod/cue.mod/gen/mod.test/test/hello 181 - display:mod.test/test/hello:nonexist`, 182 - }, { 192 + dir: $CWD/testdata/testmod/hello 193 + display:mod.test/test/hello:nonexist`}, { 183 194 name: "ExplicitNonPackageFiles", 184 195 cfg: dirCfg, 185 196 args: []string{"./anon.cue", "./other/anon.cue"}, ··· 190 201 display:command-line-arguments 191 202 files: 192 203 $CWD/testdata/testmod/anon.cue 193 - $CWD/testdata/testmod/other/anon.cue`}, { 204 + $CWD/testdata/testmod/other/anon.cue`, 205 + }, { 194 206 name: "AbsoluteFileIsNormalized", // TODO(rogpeppe) what is this actually testing? 195 207 cfg: dirCfg, 196 208 // Absolute file is normalized. ··· 215 227 name: "BadIdentifier", 216 228 cfg: dirCfg, 217 229 args: []string{"foo.com/bad-identifier"}, 218 - want: `err: implied package identifier "bad-identifier" from import path "foo.com/bad-identifier" is not valid 230 + want: `err: cannot find package "foo.com/bad-identifier": cannot find module providing package foo.com/bad-identifier 219 231 path: foo.com/bad-identifier 220 232 module: mod.test/test@v0 221 233 root: $CWD/testdata/testmod 222 - dir: $CWD/testdata/testmod/cue.mod/gen/foo.com/bad-identifier 234 + dir: "" 223 235 display:foo.com/bad-identifier`, 224 236 }, { 225 237 name: "NonexistentStdlibImport",
+1 -1
encoding/gocode/testdata/cue.mod/module.cue
··· 1 - module: "cuelang.org/go/encoding/gocode/testdata" 1 + module: "cuelang.org/go/encoding/gocode/testdata@v0" 2 2 language: version: "v0.9.0"
+1 -1
encoding/gocode/testdata/gen.go
··· 45 45 inst := cue.Build(load.Instances([]string{pkg}, &load.Config{ 46 46 Dir: dir, 47 47 ModuleRoot: dir, 48 - Module: "cuelang.org/go/encoding/gocode/testdata", 48 + Module: "cuelang.org/go/encoding/gocode/testdata@v0", 49 49 }))[0] 50 50 if err := inst.Err; err != nil { 51 51 log.Fatal(err)
+2 -2
encoding/gocode/testdata/pkg1/cue_gen.go
··· 84 84 return v 85 85 } 86 86 87 - // Data size: 600 bytes. 88 - var cuegenInstanceData = []byte("\x01\x1f\x8b\b\x00\x00\x00\x00\x00\x00\xff\x94R\xdfo\xd3:\x18\xb5\xd3^\xe9\xd6\u06bd\x12\x7f\x00\u0487\x9fZ4\xd2\x1f\x12<D\v\xb0\x8d\x81\xf6\xb0\xb50@\b\u0103\x97|M\xad\xb9vH\x9c\xb1\n6`\x8c\xfd\xd9\vr\x9al\x85\xb7\xe5%G_r\xbes||\xfe+\x7fy\xd4+/\t-\xbf\x13\xf2\xe8[\x8b\xd25\xa9s+t\x84\u03c4\x15nL[\xb4\xfd\xca\x18K=B\xdb\x13agt\x8d\xd0\x7f\x9eK\x859-/\b!w\u02df\x1e\xa5\xff\x7f\xf8\x18\x15\xe8O\xa5\xaa\x99\x17\x84\x96\xe7\x84t\xcb\x1f-J\xff\xbd\x99\x9f\x13\xea\xd1\xf6\xbe\x98\xa3[\u052e\x86\x8c\x10r\xd5zY^\x12\x8fR\xba\x1e\x15\xa8\x84N|\x93%\xfd\xc4\xf4QG&\x96\xda\xe1\xc8\xc4\u0637\x98\xdbXX\xd1O\x8f\x92!\xa5\xf4\x8e{\xf7\x1b\xdf~T \xbd\xf2\u07a7\":\x12\t\x82\xfb\u0218\x9c\xa7&\xb3\xd0e\x1d~\x8b\xed#\xce:<\xb7\x99\xd4I\xee\xe0\\\xd8\x19g=\xc6\xf6\x16\a6+\"\x1b\xc0\x17\xd6\xd9\f\x006\xc2\xe1\x80u\xb6\x02\x80\xf0\x8cG\xc2r\xf8\n\xf7yl\x12\xce:\xe3'\x01\x8c\xed\f\xb3%\x87uv\x03p\xb6F\xfen\xe5j\x0f\xd9)<MLw=2\xf3T\xa1\xc5p\xbb\x06=\xb6Bl\xc4jC\xfe\xb6\xd1VH\x9do\xeaE\x97\xbf\xe3=\u0599\x04\u02fd\x13\x19\x1d\xb9\xad\xec\xa0\xfa5\x80\xfa\xb9\x17r\xde\xe0J\xf0X(\x19\v\x8b\xe1\xdb\x1al\xbf\xd9\u9c43\x14#)TC\x0e\xcfx\xbe\x9c\xf0%\xcb.R\f\x97.zl7\xd1&\xc3\xd73\x99W2\xe1\x19\x9f\x1a\xc3\xd9x.\xed\xb5.\x80\u0536\xe2>\xe81\xd6\xef\u00fe\xd1;'2\xb7R'\xf0Y*\x05\x87\bf.\xad\xc5\x18D\x0e\xee\xcc\b2\am\x00?\x15\xf2X(\xd4\x16^\x18p\xd2>[\xa1W\xa1l5\xa1\xd4A\xd6*\xb2\xb2\x06\x85\xc6\x13\x973\xc6Ph\x85y\x0ex\x92*\x19I\xab\x16\x80Z\x1c*\x8c}65&p6\xd9\xc4fM\xd2\xee\xbe\xfd\xbdBY\x99*\x1cO\xbb\xc3A\x8f\x9d2B\xbc\xdbTtTWt\xf4gE\xc5JAG\xd7\x05\xbdi\x1bk\xca\u0458\xd9\x18\x0e\x06+G\xfd\xeb\xfe\xc5a\u011d\xb9\xe5\xd5\a\xf0\xf8!#\xe4w\x00\x00\x00\xff\xfffX!\xc8\xe0\x03\x00\x00") 87 + // Data size: 603 bytes. 88 + var cuegenInstanceData = []byte("\x01\x1f\x8b\b\x00\x00\x00\x00\x00\x00\xff\x94RMo\xd3J\x14\x9dq\xf2\xa4\x97Q\u07d3\xde\x0fx\xd2eV\t*v\x12\t\x16V\r\xfd\xa0\xa0.\xdaD\xb4 \x04b1\xb5o\x9cQ'3&\x1e\x97F\xd0\x02\xa5\xf4g\xd7h\x1c\xbb\r\xec\x9a\xd5\u044d\xcf=g\xce=\xff\x94?=\xea\x95\u05c4\x96\xdf\by\xf2\xb5E\xe9\x9a\u0539\x15:\xc6\xe7\xc2\n7\xa6-\xda~e\x8c\xa5\x1e\xa1\xed\xb1\xb0S\xbaF\xe8_/\xa4\u009c\x96W\x84\x90\xff\xcb\x1f\x1e\xa5\xff\xbe\xff\x10\x17\xe8O\xa4\xaa\x99W\x84\x96\x97\x84t\xcb\xef-J\xff\xbe\x9b_\x12\xea\xd1\xf6\x81\x98\xa1[\u052e\x86\x8c\x10r\xd3:*\xaf\x89G)\r\xe2\x02\x95\u0429o\xe6i\x90\x9a\x00ul\x12\xa9\x1d\x8eM\x82\x81\xc5\xdc&\u008a ;I\a\x9b\xa7}J\xe9\x7f\x0e\x06\x8du?.\x90\xdex\xef2\x11\x9f\x88\x14\xc1\xfd\u0258\x9cefn\xa1\xcb:\xfc\x1e\x02C\xce:<\xb7s\xa9\xd3\xdc\xc1\x99\xb0S\xcez\x8c\xed/\x0e\xed\xbc\x88m\b\x9fYg+\x04\u0608\x06}\xd6\xd9\x0e\x01\xa2\v\x1e\v\xcb\xe1\v<\xe4\x89I9\ub31e\x850\xb2S\x9c/9\xac\xb3\x17\x82\xb35\xf4\xf7*W\xfb\xc8\xcea35\xdd\xf5\xd8\xcc2\x85\x16\xa3\x9d\x1a\xf4\xd8\n\xb1\x11\xab\r\xf9;F[!u\xbe\xa5\x17]\xfe\x96\xf7Xg\x1c.\xf7\x8ee|\u2db2\xc3\xea\xd3\x10\xea\u07c3\x88\xf3\x06W\x82\xa7B\xc9DX\x8c\xde\xd4`\xe7\xf5n\x8f\x1df\x18K\xa1\x1art\xc1\xf3\xe5\x84/Yv\x91a\xb4t\xd1c{\xa96s<\x9a\u02bc\x92\x89.\xf8\xc4\x18\xceF3iou\x01\xa4\xb6\x15\xf7Q\x8f\xb1 \x80\x03\xa3w\xcfdn\xa5N\xe1\x93T\n\x8e\x11\xccLZ\x8b\t\x88\x1c\u071b\x11d\x0e\xda\x00~,\xe4\xa9P\xa8-\xbc4\xe0\xa4}\xb6B\xafB\xd9nB\xa9\x83\xacUde\r\n\x8dg.gL\xa0\xd0\n\xf3\x1c\xf0,S2\x96V-\x00\xb58V\x98\xf8lbL\xe8l\xb2\xb1\x9d7I\xbb{\xfb\xfb\x85\xb22S8\x9at\a\xfd\x1e;g\x84x\xeb\xf7)Q]\xd1\xe1\xef\x15\x15+\x05\x1d\xde\x16\xf4\xaem\xac)Gcfc\xd0\xef\xaf<\xf5\x8f\xfb\x8b\xe3\x98;s\xcb\u04c7\xf0\xf41#\xe4W\x00\x00\x00\xff\xff{\xa57\xb4\xe3\x03\x00\x00")
+2 -2
encoding/gocode/testdata/pkg2/cue_gen.go
··· 58 58 return v 59 59 } 60 60 61 - // Data size: 274 bytes. 62 - var cuegenInstanceData = []byte("\x01\x1f\x8b\b\x00\x00\x00\x00\x00\x00\xffD\x8e\xc1J\x031\x10\x86\xe7\u07ee`C\x15|\x00a\xd9S\x05\u066d\x82\x1e\x8a\bU\x11<(\u016bx\x18\xd3\x18C\u06e44\u0643\x88\xa8\xb5\xfa8\xbeb$\xa5\xe2i\x86o\xe6\xff\xf9\xb6\xe2W\x86,~\x13\xe2;\xd1\xf1[\v\xe8\x18\xeb\x03[\xa9.8p\xc2h!\xbfu. #\xe4C\x0eO\xe8\x106.\xcdDy\xc4%\x11\xed\xc6\xcf\f\u063e\xbb\x97\x8d\xaa\x1e\xcdd\x9d\\\x12\u20a8\x1b?Z\xc0\xe6?_\x102\xe47<U\xa9(_AAD\xf1'y\x00\u0617\x8d\x9a\xb0\u0555\x9b\xebZ\xbbZY\xe9F\u01a6]\xba\x91\xaa\x83\xf2a\u0101\xeb\xd9X\x1f\x02\xd8I\xb3\xfe\u04eed\xa3\xc03\x96c\u05aaH'!\xcct\xe6\xe6\xa1(}\x98\x1b\xab})\xc4\u054a\\\xab~\xf1\"\u0683~qr\xd0\xeb\x89\xf6Y\xbfX\xbfT\xe7\xce\x066\xd6\x0f\xecs\xb7\xe4\aY\xee\x89W14r\x9c2\xa7G\x82\xe87\x00\x00\xff\xff\x8e\x9a[\x03<\x01\x00\x00") 61 + // Data size: 278 bytes. 62 + var cuegenInstanceData = []byte("\x01\x1f\x8b\b\x00\x00\x00\x00\x00\x00\xffD\x8e\xc1J31\x14\x85\xef\x99\xce\x0f\x7fC\x15|\x00a\x98U\xdd\xccTA\x17E\u012a\b.\x94\xe2V\\\\\xd3\x18C\u06e44\x19AD\xd4Z}\x1f\x9f0\x92Rqw\xf8\xee=\x87o#~f\xc8\xe2\x17!\xbe\x11\x1d\xbc\xb6\x80\x8e\xb1>\xb0\x95\xea\x8c\x03'\x8c\x16\xf2k\xe7\x022B>\xe4\xf0\x80\x0e\xe1\u07f9\x99(\x8f\xb8$\xa2\xed\xf8\x91\x01\x9b7\xb7\xb2Q\u057d\x99\xac\x9bKB\\\x10u\xe3{\v\xf8\xff\xc7\x17\x84\f\xf9\x15OU\x1a\xcaWP\x10Q\xfcN\x1e\x00j\u0668\t[]\xb9\xb9\xae\xb5\xab\x95\x95ndl\xca\u048dT\x1d\x94\x0f#\x0e\\\xcf\xc6z\xef\xf8\xb1\a`+\xc5\xfa\u05fc\x92\x8d\x02\xcfX\x8eY\xab\"\x9d\x840\u04d9\x9b\x87\xa2\xf4an\xac\xf6\xa5\x10\x17+r\xa9\xfa\u0173h\x0f\xfa\xc5\xe1n\xaf'\xda'\xfdb\xfdR\x9d:\x1b\xd8X?\xb0O\u0752\xefd\xb9#^\xc4\xd0\xc8q\xea\x1c\xed\v\xa2\x9f\x00\x00\x00\xff\xff\nc\x81w?\x01\x00\x00")
+1 -1
internal/cueexperiment/exp.go
··· 9 9 // Flags holds the set of CUE_EXPERIMENT flags. It is initialized 10 10 // by Init. 11 11 var Flags struct { 12 - Modules bool 12 + Modules bool `envflag:"default:true"` 13 13 14 14 // YAMLV3Decoder swaps the old internal/third_party/yaml decoder with the new 15 15 // decoder implemented in internal/encoding/yaml on top of yaml.v3.
+1 -1
internal/cueexperiment/exp_test.go
··· 13 13 t.Setenv("CUE_EXPERIMENT", "") 14 14 err := initAlways() 15 15 qt.Assert(t, qt.IsNil(err)) 16 - qt.Assert(t, qt.IsFalse(Flags.Modules)) 16 + qt.Assert(t, qt.IsTrue(Flags.Modules)) 17 17 qt.Assert(t, qt.IsTrue(Flags.YAMLV3Decoder)) 18 18 19 19 // Check that we can enable all experiments.