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
$ go run github.com/FiskFan1999/go_runtime_debug@main
go: downloading github.com/FiskFan1999/go_runtime_debug v1.0.0
2022/04/09 03:31:38 go go1.18
path github.com/FiskFan1999/go_runtime_debug
mod github.com/FiskFan1999/go_runtime_debug v1.0.0 h1:oFg1YfNX13U5L6jYv5sPCsGbT2ccQmz4H9xWPZx1UJc=
build -compiler=gc
build CGO_ENABLED=1
build CGO_CFLAGS=
build CGO_CPPFLAGS=
build CGO_CXXFLAGS=
build CGO_LDFLAGS=
build GOARCH=amd64
build GOOS=linux
build GOAMD64=v1
Unfortunately we get inconsistent output depending on wether the binary was built from source or via go run (this results in the same output as go install). And for compiling from source, I don't know any way to get the tag number for the current revision without a exec call to git which is what we do in the makefile anyway. Perhaps we should stick with what we have now and say people shouldn't install ergo via go install, because that would be missing important files anyway. Just wanted to put this out there and see what are your thoughts on the matter.
The text was updated successfully, but these errors were encountered:
Thanks, this is interesting. I think for now I'm pretty comfortable sticking with make install as the recommended "local install" mechanism, but I'll leave this open in case we want to revisit in future.
New in go 1.18, the compiler embeds information about how a module was built. This can include the vcs commit string, or the version number.
If implemented, this could replace the functionality provided by
ergo/Makefile
Lines 3 to 4 in 1f08c97
Output when calling
go build
from source. Notevcs.revision
which is the revision hash of the current commit.Output when running via
go run
Unfortunately we get inconsistent output depending on wether the binary was built from source or via
go run
(this results in the same output asgo install
). And for compiling from source, I don't know any way to get the tag number for the current revision without a exec call togit
which is what we do in the makefile anyway. Perhaps we should stick with what we have now and say people shouldn't install ergo viago install
, because that would be missing important files anyway. Just wanted to put this out there and see what are your thoughts on the matter.The text was updated successfully, but these errors were encountered: