You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a command build with go that has a build script that uses ldflags to set the version, commit hash, etc. Standard stuff.
However, if someone uses go get to get my command, and then runs the build script (which just calls go install -ldflags with the right flags.... then nothing happens.
go install should not short circuit the build if you pass in ldflags, because by definition, the new binary will be different than the old one (ok, possibly it'll be the same as the old one, but go install can't know that).
The text was updated successfully, but these errors were encountered:
Please answer these questions before submitting your issue. Thanks!
What did you do?
What did you expect to see?
binary created in $GOPATH/bin with appropriate values set
What did you see instead?
go install short circuited and didn't rebuild because the packages hadn't changed.
Does this issue reproduce with the latest release (go1.9.2)?
yes
System details
Thoughts
This is related to #22469
I have a command build with go that has a build script that uses ldflags to set the version, commit hash, etc. Standard stuff.
However, if someone uses
go get
to get my command, and then runs the build script (which just callsgo install -ldflags
with the right flags.... then nothing happens.go install
should not short circuit the build if you pass in ldflags, because by definition, the new binary will be different than the old one (ok, possibly it'll be the same as the old one, butgo install
can't know that).The text was updated successfully, but these errors were encountered: