Description
Edit: After more thought and discussion embedding the import path in binary seems like the way to go. This would enable upgrading an installed binary application in many cases.
Original submission below:
I'd like to have go get and go install produce a manifest along with the binary that indicates when the binary was compiled, what package produced it.
This is useful to understand why I have binaries in my bin/ and would allow e.g. updating them in bulk later through some mechanism (TBD outside of this issue).
Why this should be enabled by default? Many existing tools (e.g. editors) have a mechanism to install tools (e.g. go guru). To have a complete manifest, including already shipping editors and external applications, this should be updated by default (if someone insists, with opt-out flag).
Please answer these questions before submitting your issue. Thanks!
-
What version of Go are you using (
go version
)?$ go version go version go1.7 darwin/amd64
-
What operating system and processor architecture are you using (
go env
)?Uh, isn't this redundant to 1.?
-
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.$ go get golang.org/x/review/git-codereview
-
What did you expect to see?
A manifest file listing where the binary came from being generated along with the binary
E.g.
2016-08-21T07:33:00Z package golang.org/x/review/git-codereview SHA256:619b8b31e9aed60e19051d403e01214847124370752bae131a0d96c022830e25
This could be a simple text file in $GOPATH/bin/.manifest or something more fancy. KISS would support a simple log format. The exact fields open to discussion, but I feel that timestamp, package and hash of the binary generated are minimal; possibly VCS version could be nice.
-
What did you see instead?
No manifest file generated.