Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Building with Go 1.12 fails with "go tool vet" directly is unsupported; use "go vet" #2486

Closed
k-wall opened this issue Mar 21, 2019 · 4 comments

Comments

@k-wall
Copy link
Member

k-wall commented Mar 21, 2019

As noted in Go's release notes, go tool vet is no longer supported

cd /Users/keith/src/forks/enmasse/go/src/github.com/enmasseproject/enmasse && go tool vet cmd pkg
vet: invoking "go tool vet" directly is unsupported; use "go vet"
make[1]: *** [test_go_vet] Error 1

We want to keep compatibility with Go 1.10 and Go 1.11 so we need the build system to work with all three.

It appears with Go 1.12 the vet arguments are different. It appear to scan for packages and finds system libraries.

cd /Users/keith/src/forks/enmasse/go/src/github.com/enmasseproject/enmasse && go vet cmd
# cmd/internal/bio
/usr/local/Cellar/go/1.12/libexec/src/cmd/internal/bio/buf.go:45:18: method Seek(offset int64, whence int) int64 should have signature Seek(int64, int) (int64, error)
/usr/local/Cellar/go/1.12/libexec/src/cmd/internal/bio/buf.go:57:18: method Seek(offset int64, whence int) int64 should have signature Seek(int64, int) (int64, error)
# cmd/link
/usr/local/Cellar/go/1.12/libexec/src/cmd/link/link_test.go:15:2: struct field tag "\n\tLondon. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln�s Inn Hall. Imp

@k-wall k-wall changed the title Building with Go 1.12 fails with go tool vet" directly is unsupported; use "go vet" Building with Go 1.12 fails with "go tool vet" directly is unsupported; use "go vet" Mar 21, 2019
@ctron
Copy link
Contributor

ctron commented Mar 21, 2019

I can run go vet with Go 1.11.2 … And I think we could get away focusing on Go 1.11.x

@jbtrystram
Copy link
Contributor

I just ran into this as well : looks like Go 1.12 is default in fedora 30.

Also, Go vet is not happy with the pkg argument :

[enmasse] cd /home/jbtrystram/go/src/github.com/enmasseproject/enmasse/go/src/github.com/enmasseproject/enmasse && go vet pkg
can't load package: package pkg: cannot find package "pkg" in any of:
	/usr/lib/golang/src/pkg (from $GOROOT)
	/home/jbtrystram/go/src/pkg (from $GOPATH)

@secondsun
Copy link
Contributor

@jbtrystram go vet ./pkg/... makes it happy

secondsun added a commit to secondsun/enmasse that referenced this issue Jun 28, 2019
@secondsun
Copy link
Contributor

PR with fix : #2951

k-wall pushed a commit that referenced this issue Jul 23, 2019
* fix: go tool vet does not work on Fedora 30

Fixes issue #2486

* updating changelog
@k-wall k-wall closed this as completed Oct 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants