What release are you using? go version
Can you show the whole file, or at least the part up until the build directive?
I certainly could (and will) but I have narrowed down the "problem":
First I create a file a.go which is part of a package main and
deliberately panics
go install <packagespec>
Then I add // + build ignore and perform to this file and perform another
go install <packagespec>
What happens is, that the file IS ignored, but go install doesn't
recognize, that not visiting this file will change program semantics. go
install overoptimizes now and doesn't build the command again.
By ignoring this file go install and go build assumes that there is no
need to compile and link everything together again.
Manually go clean -i <packagespec> OR go install -a <packagespec> works
of course.
Seems like a bug in the dependency walker and hardly a feature as the
file _changes_ by adding +build ignore which should cause a recompile /
reinstall of dependent objects.
Johann
Please file an issue:
Andrew