1. 35
  1. 4

    Including version control info in the binary is a great feature!

    1. 1

      I’m excited - my team has been encoding this in our binaries using linker flags, it’s going to be nice to get this for free!

      1. 0

        I’m actually not that impressed with this feature. It makes tracking down the source of a dev build (i.e. go build) a bit easier, but I feel like it’s duplicating existing feature.

        It could have bridged the gap between go install and go build outputs (the latter previously did not have access to VCS information and therefore main module version). We use go install at $work because it embeds module version information and builds are reproducible (as long as everyone is on the same Go version that does not come from nixpkgs). The only downside is that the code should be pushed upstream before running go install.

        Now we get a few more flags to set in addition to -trimpath should someone use the new VCS information to finally implement main module versions for go build output since the extended VCS build information is not (yet, hopefully) set in go install output. Other than that, it’s nice to have an extensible Settings field in build info.