File tree 2 files changed +3
-5
lines changed
2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ var Flags struct {
19
19
// with CUE_EXPERIMENT=yamlv3decoder=1 who must still suppport older CUE versions,
20
20
// but currently the feature is always enabled.
21
21
// TODO(mvdan): remove for v0.12.
22
- YAMLV3Decoder bool `envflag:"default:true"`
22
+ YAMLV3Decoder bool `envflag:"deprecated, default:true"`
23
23
24
24
// EvalV3 enables the new evaluator. The new evaluator addresses various
25
25
// performance concerns.
Original file line number Diff line number Diff line change @@ -23,12 +23,10 @@ func TestInit(t *testing.T) {
23
23
qt .Assert (t , qt .IsTrue (Flags .Modules ))
24
24
qt .Assert (t , qt .IsTrue (Flags .YAMLV3Decoder ))
25
25
26
- // Check that we can disable the YAML v3 experiment.
26
+ // Check that we cannot disable the YAML v3 experiment.
27
27
t .Setenv ("CUE_EXPERIMENT" , "yamlv3decoder=0" )
28
28
err = initAlways ()
29
- qt .Assert (t , qt .IsNil (err ))
30
- qt .Assert (t , qt .IsTrue (Flags .Modules ))
31
- qt .Assert (t , qt .IsFalse (Flags .YAMLV3Decoder ))
29
+ qt .Assert (t , qt .ErrorMatches (err , `cannot parse CUE_EXPERIMENT: cannot change default value of deprecated flag "yamlv3decoder"` ))
32
30
33
31
// Check that we cannot disable the modules experiment.
34
32
t .Setenv ("CUE_EXPERIMENT" , "modules=0" )
You can’t perform that action at this time.
0 commit comments