File tree Expand file tree Collapse file tree 2 files changed +3
-20
lines changed Expand file tree Collapse file tree 2 files changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ import (
22
22
"cuelang.org/go/internal"
23
23
"cuelang.org/go/internal/core/runtime"
24
24
"cuelang.org/go/internal/cuedebug"
25
- "cuelang.org/go/internal/cueexperiment"
26
25
"cuelang.org/go/internal/envflag"
27
26
28
27
_ "cuelang.org/go/pkg"
@@ -109,17 +108,3 @@ func CUE_DEBUG(s string) Option {
109
108
r .SetDebugOptions (& c )
110
109
}}
111
110
}
112
-
113
- // CUE_EXPERIMENT takes a string with the same contents as CUE_EXPERIMENT and
114
- // configures the context with the relevant debug options. It panics for unknown
115
- // or malformed options.
116
- func CUE_EXPERIMENT (s string ) Option {
117
- var c cueexperiment.Config
118
- if err := envflag .Parse (& c , s ); err != nil {
119
- panic (fmt .Errorf ("cuecontext.CUE_DEBUG: %v" , err ))
120
- }
121
-
122
- return Option {func (r * runtime.Runtime ) {
123
- r .SetGlobalExperiments (& c )
124
- }}
125
- }
Original file line number Diff line number Diff line change @@ -100,13 +100,11 @@ func (r *Runtime) SetDebugOptions(flags *cuedebug.Config) {
100
100
}
101
101
102
102
// SetGlobalExperiments that apply to language evaluation.
103
+ // It does not set the version.
103
104
func (r * Runtime ) SetGlobalExperiments (flags * cueexperiment.Config ) {
104
105
r .simplifyValidators = ! flags .KeepValidators
105
- if flags .EvalV3 {
106
- r .SetVersion (internal .EvalV3 )
107
- } else {
108
- r .SetVersion (internal .EvalV2 )
109
- }
106
+ // Do not set version as this is already set by NewWithSettings or
107
+ // SetVersion.
110
108
}
111
109
112
110
// IsInitialized reports whether the runtime has been initialized.
You can’t perform that action at this time.
0 commit comments