Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: go vet doesn't use go.work on Go 1.18 beta 2 #51072

Closed
guilhem opened this issue Feb 8, 2022 · 3 comments
Closed

cmd/go: go vet doesn't use go.work on Go 1.18 beta 2 #51072

guilhem opened this issue Feb 8, 2022 · 3 comments
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@guilhem
Copy link

guilhem commented Feb 8, 2022

What version of Go are you using (go version)?

$ go version
go version go1.18beta2 linux/amd64

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/guilhem/.cache/go-build"
GOENV="/home/guilhem/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/guilhem/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/guilhem/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/snap/go/9149"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/snap/go/9149/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18beta2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/guilhem/sources/egress-proxy-operator/go.mod"
GOWORK="/home/guilhem/sources/egress-proxy-operator/go.work"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2255486588=/tmp/go-build -gno-record-gcc-switches"

What did you do?

  • add a go.work file
  • go work edit -replace github.com/elazarl/goproxy=/home/guilhem/sources/goproxy/
  • go vet fail using previous version
  • go build works

What did you expect to see?

go vet should work like go build using right go.work replace command.

What did you see instead?

go vet fail.

@mdlayher mdlayher changed the title affected/package: go vet doesn't use go.work cmd/go: go vet doesn't use go.work on Go 1.18 beta 2 Feb 8, 2022
@mvdan
Copy link
Member

mvdan commented Feb 8, 2022

cc @matloob

@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 8, 2022
@cherrymui cherrymui added this to the Go1.18 milestone Feb 8, 2022
@cherrymui
Copy link
Member

Temporarily label Go1.18 as go.work is new for this release.

@timothy-king timothy-king added the Analysis Issues related to static analysis (vet, x/tools/go/analysis) label Feb 8, 2022
@gopherbot
Copy link

Change https://go.dev/cl/385176 mentions this issue: cmd/go: support workspaces in vet

@golang golang locked and limited conversation to collaborators Feb 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants
@guilhem @timothy-king @mvdan @gopherbot @cherrymui and others