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/vet: build tag checks running in vetxonly mode #26102

Closed
rsc opened this issue Jun 28, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@rsc
Copy link
Contributor

commented Jun 28, 2018

When we "go test" t1, and t1 imports t2, we run vet in vetx-only mode on t2 to compute any vet-specific export data. That vetx-only run is not supposed to report problems with t2. But it is:

$ cd $GOPATH/src/t1
$ ls
t1_test.go
$ cat t1_test.go
package t1

import _ "t2"
$ ls ../t2
t2x.go	t2y.go
$ cat ../t2/t2x.go
package t2
$ cat ../t2/t2y.go
// +build !foo-bar

package t2
$ go1.10 test
testing: warning: no tests to run
PASS
ok  	t1	0.013s
$ go test
# t2
../t2/t2y.go:1: invalid non-alphanumeric build constraint: [!foo-bar]
testing: warning: no tests to run
PASS
ok  	t1	0.012s
$ go test
testing: warning: no tests to run
PASS
ok  	t1	0.012s
$ go test -a
# t2
../t2/t2y.go:1: invalid non-alphanumeric build constraint: [!foo-bar]
testing: warning: no tests to run
PASS
ok  	t1	0.012s
$ 

@rsc rsc added this to the Go1.11 milestone Jun 28, 2018

@rsc rsc added the release-blocker label Jun 28, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Jun 28, 2018

Change https://golang.org/cl/121395 mentions this issue: cmd/vet: don't run buildtag check when in vetxonly mode

@mvdan

This comment has been minimized.

Copy link
Member

commented Jun 28, 2018

I had worked on the buildtag check recently, so the fix was easy to find. Sent a CL above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.