Skip to content

Commit

Permalink
internal/versions: disable a test case incompatible with CL 607955
Browse files Browse the repository at this point in the history
CL 607955 is changing the behavior of "//go:build" file versions.
Before, file versions did not apply if go version was set for the
package, but after CL 6079055, the package's go version does not
influence whether the file version is applied: max(fileVersion, go1.21)
will always be applied.

Once CL 607955 is released in a go 1.23 minor release, we can update the
test to require go1.23 and test for the new behavior (though it would
fail for users building with a version of go older than the minor
release with the behavior update).

For golang/go#68658

Change-Id: I99d39ce108274edf401d861e553ad923b508f936
Reviewed-on: https://go-review.googlesource.com/c/tools/+/608797
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
matloob committed Aug 27, 2024
1 parent 0734f62 commit adb7301
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/versions/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func Test(t *testing.T) {
pversion string
tests []fileTest
}{
{"", "", []fileTest{{"noversion.go", ""}, {"gobuild.go", ""}}},
// {"", "", []fileTest{{"noversion.go", ""}, {"gobuild.go", ""}}}, // TODO(matloob): re-enable this test (with modifications) once CL 607955 has been submitted
{"go1.22", "go1.22", []fileTest{{"noversion.go", "go1.22"}, {"gobuild.go", "go1.23"}}},
} {
name := fmt.Sprintf("types.Config{GoVersion:%q}", item.goversion)
Expand Down

0 comments on commit adb7301

Please sign in to comment.