Skip to content

Commit

Permalink
[release-branch.v0.9] update cueversion.LanguageVersion to v0.9.2
Browse files Browse the repository at this point in the history
The language version should always be at least the tagged
version. We're about to tag v0.9.2 so update the language
version accordingly.

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I691d73a76c8861957d1f3dd687f77c4ba7805d3d
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1196787
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>
  • Loading branch information
rogpeppe committed Jun 26, 2024
1 parent f7e7c33 commit a02ef5a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion cmd/cue/cmd/testdata/script/modfix_initial.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ foo: "bar"
-- want-module --
module: "foo.com"
language: {
version: "v0.9.0"
version: "v0.9.2"
}
custom: {
legacy: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ module: "premodules.example"
-- premodules-module.cue.fixed --
module: "premodules.example"
language: {
version: "v0.9.0"
version: "v0.9.2"
}
-- premodules/cue.mod/pkg/premodules.example/root.cue --
package root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cmp stderr ${WORK}/v0.99.0-toonew.stderr
cmp stderr ${WORK}/v0.99.0-toonew.stderr

-- v0.99.0-toonew.stderr --
language version "v0.99.0" declared in module.cue is too new for current language version "v0.9.0"
language version "v0.99.0" declared in module.cue is too new for current language version "v0.9.2"
-- v0.99.0/cue.mod/module.cue --
module: "downstream.example"
language: version: "v0.9.0"
Expand Down
2 changes: 1 addition & 1 deletion internal/cueversion/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
// This determines the latest version of CUE that
// is accepted by the module.
func LanguageVersion() string {
return "v0.9.0"
return "v0.9.2"
}

// ModuleVersion returns the version of the cuelang.org/go module as best as can
Expand Down
30 changes: 15 additions & 15 deletions mod/modfile/modfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ deps: "other.com/something@v0": v: "v0.2.3"
parse: Parse,
data: `
module: "foo.com/bar@v0"
language: version: "v0.9.0-alpha.0"
language: version: "v0.9.2-alpha.0"
source: kind: "git"
`,
want: &File{
Language: &Language{
Version: "v0.9.0-alpha.0",
Version: "v0.9.2-alpha.0",
},
Module: "foo.com/bar@v0",
Source: &Source{
Expand All @@ -107,12 +107,12 @@ source: kind: "git"
parse: Parse,
data: `
module: "foo.com/bar@v0"
language: version: "v0.9.0-alpha.0"
language: version: "v0.9.2-alpha.0"
source: kind: "self"
`,
want: &File{
Language: &Language{
Version: "v0.9.0-alpha.0",
Version: "v0.9.2-alpha.0",
},
Module: "foo.com/bar@v0",
Source: &Source{
Expand All @@ -127,7 +127,7 @@ source: kind: "self"
parse: Parse,
data: `
module: "foo.com/bar@v0"
language: version: "v0.9.0-alpha.0"
language: version: "v0.9.2-alpha.0"
source: kind: "bad"
`,
wantError: `source.kind: 2 errors in empty disjunction:(.|\n)+`,
Expand Down Expand Up @@ -305,7 +305,7 @@ _foo: "blah.example"
parse: Parse,
data: `
module: "foo.com/bar"
_foo: "v0.9.0"
_foo: "v0.9.2"
language: version: _foo
`,
wantError: `invalid module.cue file syntax: references not allowed in data mode:
Expand All @@ -315,7 +315,7 @@ language: version: _foo
parse: Parse,
data: `
module: "foo.com/bar"
let foo = "v0.9.0"
let foo = "v0.9.2"
language: version: foo
`,
wantError: `invalid module.cue file syntax: references not allowed in data mode:
Expand All @@ -327,8 +327,8 @@ invalid module.cue file syntax: references not allowed in data mode:
parse: Parse,
data: `
module: "foo.com/bar"
#x: "v0.9.0"
language: version: "v0.9.0"
#x: "v0.9.2"
language: version: "v0.9.2"
`,
wantError: `invalid module.cue file syntax: definitions not allowed in data mode:
module.cue:3:1`,
Expand All @@ -337,12 +337,12 @@ language: version: "v0.9.0"
parse: Parse,
data: `
module: "foo.com/bar@v0"
language: version: "v0.9.0"
language: version: "v0.9.2"
custom: "somewhere.com": foo: true
`,
want: &File{
Module: "foo.com/bar@v0",
Language: &Language{Version: "v0.9.0"},
Language: &Language{Version: "v0.9.2"},
Custom: map[string]map[string]any{
"somewhere.com": {
"foo": true,
Expand All @@ -360,7 +360,7 @@ module: "foo.com/bar"
`,
want: &File{
Module: "foo.com/bar",
Language: &Language{Version: "v0.9.0"},
Language: &Language{Version: "v0.9.2"},
},
wantDefaults: map[string]string{
"foo.com/bar": "v0",
Expand All @@ -372,7 +372,7 @@ module: "foo.com/bar"
`,
want: &File{
Module: "test.example",
Language: &Language{Version: "v0.9.0"},
Language: &Language{Version: "v0.9.2"},
},
wantDefaults: map[string]string{
"test.example": "v0",
Expand All @@ -385,7 +385,7 @@ module: ""
`,
want: &File{
Module: "test.example",
Language: &Language{Version: "v0.9.0"},
Language: &Language{Version: "v0.9.2"},
},
wantDefaults: map[string]string{
"test.example": "v0",
Expand All @@ -400,7 +400,7 @@ other: field: 123
`,
want: &File{
Module: "foo.com",
Language: &Language{Version: "v0.9.0"},
Language: &Language{Version: "v0.9.2"},
Custom: map[string]map[string]any{
"legacy": {
"some": true,
Expand Down

0 comments on commit a02ef5a

Please sign in to comment.