Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime/debug: BuildInfo doesn't contain VCS info depending on the build command #68084

Closed
EzxD opened this issue Jun 20, 2024 · 2 comments
Closed

Comments

@EzxD
Copy link

EzxD commented Jun 20, 2024

Go version

go version go1.22.4 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/paulseebach/Library/Caches/go-build'
GOENV='/Users/paulseebach/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/paulseebach/go/pkg/mod'
GONOPROXY='github.com/askrella'
GONOSUMDB='github.com/askrella'
GOOS='darwin'
GOPATH='/Users/paulseebach/go'
GOPRIVATE='github.com/askrella'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/paulseebach/.go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/paulseebach/.go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.4'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/paulseebach/code/askrella/simpleo-backend/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/l5/dt51qvv11wgdwbv18l68867r0000gn/T/go-build2194274985=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

  • added versioning with go's buildinfos
  • built the binary locally with go build ./cmd/local
  • shipped it to dev (with CI/CD)

What did you see happen?

  • VCS info in the BuildInfo locally worked fine
  • VCS info wasn't present on dev
  • comparing the build process and saw CI runs the built like this: go build ./cmd/local/main.go
  • tried it locally with go build ./cmd/local/main.go -> VCS Info wasn't present

What did you expect to see?

  • when building the binary with go build ./cmd/local/main.go the VCS info should be present too
@seankhliao
Copy link
Member

Duplicate of #51279

@seankhliao seankhliao marked this as a duplicate of #51279 Jun 20, 2024
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants