Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/vet: doesn't work when importing a package which is not yet installed #4895
What steps will reproduce the problem? my main.go imports a local package: import ( "flag" "fmt" "grid" "thing/v36/thing" "log" "os" ... which works perfectly forever in go run, go fmt, go ... but recently I ran go vet and get: mtj$ go vet main.go vet: main.go:8:2: could not import thing/v36/thing (can't find import: thing/v36/thing) exit status 1 (No, it's not really called 'thing' but I'm not prepared to disclose the actual name.) Which compiler are you using (5g, 6g, 8g, gccgo)? 8g Which operating system are you using? Mac OS X Which version are you using? (run 'go version') tip, but this is not new in the tip...has been true for a few days at least go version devel +655b43c97d76 Sun Feb 24 22:47:22 2013 +0800 darwin/amd64 Please provide any additional information below.
It would definitely be nice for 'go vet' to be able to run in degraded mode. I ran it on a large uncompiled tree over the weekend and was pretty annoyed by all the import messages. Also annoying, and harder to fix: 'go vet' complains about not being able to import "C" when analyzing cgo programs. We need to decide what the model is. My suggestion is that 'go vet' uses as much information as it has, but doesn't complain that it needs more.
Status changed to Accepted.