Worth noting that the ignore build tag is already treated in a special way by Go tools, such as go mod tidy ignoring it.
It seems reasonable to me to have -tags=ignore error with a helpful message; all use cases of // +build ignore I've seen involve running the file directly to ignore build constraints, like go run ignored.go. And the standard library breaks with that build tag, anyway.
@mvdan, I think we should continue to allow go list -tags=ignored to list these files, since that works in a lot of cases today (especially with the -e flag). I agree that we could improve the error message from commands that actually build dependencies, though.
What version of Go are you using (
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
What did you do?
//+build ignorebuild flag to the top of a test file
go test -v --tags=ignore ../.
What did you expect to see?
My test output
What did you see instead?
go test -v --tags=ignore ../.Output
The text was updated successfully, but these errors were encountered: