From 7603692ada892ffc22d3fa05fcfebefe6cba9742 Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Wed, 26 Oct 2022 10:55:02 -0400 Subject: [PATCH] go.mod: upgrade golang.org/x/tools to v0.2.0 This fixes the failure in apidiff, so remove the test skip. We also need to explicitly add a "go" line in the synthesized go.mod for the test module. Fixes golang/go#56162. Change-Id: Iae320af89eeca11f69bea1b0dfa86f342911973f Reviewed-on: https://go-review.googlesource.com/c/exp/+/445576 Run-TryBot: Jonathan Amsterdam Reviewed-by: Robert Findley TryBot-Result: Gopher Robot --- apidiff/apidiff_test.go | 3 +-- go.mod | 6 +++--- go.sum | 6 ++++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/apidiff/apidiff_test.go b/apidiff/apidiff_test.go index c06a576..9f15595 100644 --- a/apidiff/apidiff_test.go +++ b/apidiff/apidiff_test.go @@ -17,7 +17,6 @@ import ( ) func TestChanges(t *testing.T) { - t.Skip("broken by go1.20-pre3 compiler: see https://go.dev/issue/56162") dir, err := os.MkdirTemp("", "apidiff_test") if err != nil { t.Fatal(err) @@ -63,7 +62,7 @@ func splitIntoPackages(t *testing.T, dir string) (incompatibles, compatibles []s if err := os.MkdirAll(filepath.Join(dir, "src", "apidiff"), 0700); err != nil { t.Fatal(err) } - if err := os.WriteFile(filepath.Join(dir, "src", "apidiff", "go.mod"), []byte("module apidiff\n"), 0666); err != nil { + if err := os.WriteFile(filepath.Join(dir, "src", "apidiff", "go.mod"), []byte("module apidiff\ngo 1.18\n"), 0666); err != nil { t.Fatal(err) } diff --git a/go.mod b/go.mod index e421807..0df6ab3 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ go 1.18 require ( github.com/google/go-cmp v0.5.8 - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 - golang.org/x/tools v0.1.12 + golang.org/x/mod v0.6.0 + golang.org/x/tools v0.2.0 ) -require golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect +require golang.org/x/sys v0.1.0 // indirect diff --git a/go.sum b/go.sum index 29ad99b..12890ad 100644 --- a/go.sum +++ b/go.sum @@ -2,7 +2,13 @@ github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=