Skip to content

Commit

Permalink
x/tools: drop support for Go toolchains older than go1.16
Browse files Browse the repository at this point in the history
This change removes all testenv.NeedsGo1Point(16) and earlier
calls from tests, which assert that the go command used at run
time is at least go1.16; this is now assumed.

Also, we assume that a Go toolchain of at least go1.16 is used
to build the packages in this repo. This is asserted by the
introduction of a reference to io.Discard in go/packages.

Change-Id: Ie12d721b44e057ad9936042afb255fa90b2ac5a8
Reviewed-on: https://go-review.googlesource.com/c/tools/+/457657
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
  • Loading branch information
adonovan authored and rinchsan committed Feb 19, 2023
1 parent 18bc08d commit 2eb424a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions internal/imports/mod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,6 @@ package z

// Tests that we handle GO111MODULE=on with no go.mod file. See #30855.
func TestNoMainModule(t *testing.T) {
testenv.NeedsGo1Point(t, 12)
mt := setup(t, map[string]string{"GO111MODULE": "on"}, `
-- x.go --
package x
Expand Down Expand Up @@ -996,7 +995,6 @@ type modTest struct {
// extraEnv is applied on top of the default test env.
func setup(t *testing.T, extraEnv map[string]string, main, wd string) *modTest {
t.Helper()
testenv.NeedsGo1Point(t, 11)
testenv.NeedsTool(t, "go")

proxyOnce.Do(func() {
Expand Down Expand Up @@ -1193,7 +1191,6 @@ import _ "rsc.io/quote"

// Tests that crud in the module cache is ignored.
func TestInvalidModCache(t *testing.T) {
testenv.NeedsGo1Point(t, 11)
dir, err := os.MkdirTemp("", t.Name())
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -1290,7 +1287,6 @@ import (
}

func BenchmarkScanModCache(b *testing.B) {
testenv.NeedsGo1Point(b, 11)
env := &ProcessEnv{
GocmdRunner: &gocommand.Runner{},
Logf: log.Printf,
Expand Down

0 comments on commit 2eb424a

Please sign in to comment.