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

x/vgo: test does not run vet #26278

Closed
zombiezen opened this issue Jul 8, 2018 · 3 comments

Comments

@zombiezen
Copy link
Contributor

commented Jul 8, 2018

I expect this is likely because vet hasn't been updated to use the vgo layout yet. I figured I'd report it so that if others run across this, they can subscribe to updates.

What did you do?

Wrote a package that fails vet and tried to run vgo test. Simple case:

package main

import "fmt"

func main() {
        fmt.Printf("%d\n")
}

What did you expect to see?

This is the output from Go 1.10.3, which I expected to match:

# foo
./foo.go:6: Printf format %d reads arg #1, but call has only 0 args

What did you see instead?

testing: warning: no tests to run
PASS
?       foo 0.011s [no test files]

System details

go version go1.10.3 linux/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/light/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/light"
GOPROXY=""
GORACE=""
GOROOT="/home/light/go"
GOTMPDIR=""
GOTOOLDIR="/home/light/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build416808611=/tmp/go-build -gno-record-gcc-switches"
VGOMODROOT="/home/light/src/zombiezen.com/go/gg"
GOROOT/bin/go version: go version go1.10.3 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.10.3
uname -sr: Linux 4.4.0-43-Microsoft
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu GLIBC 2.23-0ubuntu10) stable release version 2.23, by Roland McGrath et al.

@gopherbot gopherbot added this to the vgo milestone Jul 8, 2018

@myitcv

This comment has been minimized.

Copy link
Member

commented Jul 8, 2018

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jul 10, 2018

Working as expected, if not exactly intended.

The way vet gets invoked is sufficiently different between Go 1.10 and Go 1.11 that it was too much work to keep vgo running vet when GOROOT is Go 1.10. If you have GOROOT pointing at Go 1.11 then you'll get vet during test; otherwise, not. Sorry.

@rsc rsc closed this Jul 10, 2018

@zombiezen

This comment has been minimized.

Copy link
Contributor Author

commented Jul 10, 2018

OK, thanks for the explanation!

@golang golang locked and limited conversation to collaborators Jul 10, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.