golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.06k stars 17.68k forks source link

x/exp/cmd/gorelease: unexpected go.sum complaint #70354

Open kramvan1 opened 3 hours ago

kramvan1 commented 3 hours ago

Go version

go 1.22.9 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE='on'
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/me/Library/Caches/go-build'
GOENV='/Users/me/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/me/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/me/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go@1.22/1.22.9/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/opt/homebrew/Cellar/go@1.22/1.22.9/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.9'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/me/go/src/.../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/_4/psrhrty902b4x_gbdfgv8pgh0000gn/T/go-build2882118008=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

gorelease using latest version v0.0.0-20241009180824-f66d83c29e7c

What did you see happen?

diagnostics

go.sum: one or more sums are missing. Run 'go mod tidy' to add missing sums.

What did you expect to see?

No issues with go.sum, as running go mod tidy makes NO difference here.

This was reported before with https://github.com/golang/go/issues/64051 Seems like a good bug to me.

This is against a private internal repo, so can share anything about that.

gabyhelp commented 3 hours ago

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

timothy-king commented 3 hours ago

This is against a private internal repo, so can share anything about that.

More information would really help for progress on this. Like a minimized reproducer or an anonymized go.sum file could really help. The contents of the variables in the gorelease.go line:

        if !sumsMatchIgnoringPath(string(goSumData), string(newGoSumData), modPath) {

would also be useful.