Skip to content

Commit 450ba7f

Browse files
committed
cmd/cue: remove CUE_SYNTAX_OVERRIDE support
The parser does not do anything in response to `FromVersion` any more and hasn't for some time. Although we might want to provide explicit syntax overriding again in the future in some form, we will soon have support for per-file experiments and module-declared versions, so the need is likely to be considerably less. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I97d6fe3cc830ab816fc8808e2eff044813ea735b Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1217210 Reviewed-by: Daniel Martí <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
1 parent 8241d9c commit 450ba7f

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

cmd/cue/cmd/common.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,11 @@ import (
3232
"cuelang.org/go/cue/load"
3333
"cuelang.org/go/cue/parser"
3434
"cuelang.org/go/cue/token"
35-
"cuelang.org/go/internal"
3635
"cuelang.org/go/internal/cuedebug"
3736
"cuelang.org/go/internal/encoding"
3837
"cuelang.org/go/internal/filetypes"
3938
)
4039

41-
var requestedVersion = os.Getenv("CUE_SYNTAX_OVERRIDE")
42-
4340
func defaultConfig() (*config, error) {
4441
reg, err := getCachedRegistry()
4542
if err != nil {
@@ -48,15 +45,7 @@ func defaultConfig() (*config, error) {
4845
return &config{
4946
loadCfg: &load.Config{
5047
ParseFile: func(name string, src interface{}) (*ast.File, error) {
51-
version := internal.APIVersionSupported
52-
if requestedVersion != "" {
53-
switch {
54-
case strings.HasPrefix(requestedVersion, "v0.1"):
55-
version = -1000 + 100
56-
}
57-
}
5848
options := []parser.Option{
59-
parser.FromVersion(version),
6049
parser.ParseComments,
6150
}
6251
cuedebug.Init()

0 commit comments

Comments
 (0)