From 095bbfc4edd425a3602fd58de4664a6b1e76dbea Mon Sep 17 00:00:00 2001 From: Benjamin Wang Date: Mon, 1 Aug 2022 15:11:49 +0800 Subject: [PATCH] lock down the version of shadow to v0.1.11 The latest vesion v0.1.12 was just released On Jul 27, 2022, and it is causing issue (see below) on the govet check, ``` govet_shadow' started at Sun Jul 31 23:23:27 PDT 2022 go get: upgraded golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 => v0.0.0-20220722155237-a158d28d115b go get: upgraded golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 => v0.0.0-20220722155257-8c9f86f7a55f go get: upgraded golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135 => v0.1.12 /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-prometheus@v1.2.0/client_metrics.go:7:2: missing go.sum entry for module providing package golang.org/x/net/context (imported by go.etcd.io/etcd/etcdserver/etcdserverpb); to add: go get go.etcd.io/etcd/etcdserver/etcdserverpb /root/go/pkg/mod/google.golang.org/grpc@v1.26.0/internal/transport/controlbuf.go:28:2: missing go.sum entry for module providing package golang.org/x/net/http2 (imported by go.etcd.io/etcd/embed); to add: go get go.etcd.io/etcd/embed /root/go/pkg/mod/google.golang.org/grpc@v1.26.0/internal/transport/controlbuf.go:29:2: missing go.sum entry for module providing package golang.org/x/net/http2/hpack (imported by github.com/soheilhy/cmux); to add: go get github.com/soheilhy/cmux@v0.1.4 /root/go/pkg/mod/google.golang.org/grpc@v1.26.0/server.go:36:2: missing go.sum entry for module providing package golang.org/x/net/trace (imported by go.etcd.io/etcd/embed); to add: go get go.etcd.io/etcd/embed ``` It isn't good to always to use the latest version. Instead, we should lock down the version, and v0.1.11 was confirmed to be working. Signed-off-by: Benjamin Wang --- test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test b/test index 5c9b4c005cd..f0477af8b23 100755 --- a/test +++ b/test @@ -466,7 +466,7 @@ function govet_shadow_pass { # shellcheck disable=SC2206 fmtpkgs=($fmtpkgs) # Golang 1.12 onwards the experimental -shadow option is no longer available with go vet - go get golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow + go get golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@v0.1.11 export PATH=${GOPATH}/bin:${PATH} # shellcheck disable=SC2230 shadow_tool=$(which shadow)