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

cmd/go: internal error in go work sync #65363

Open
trajan0x opened this issue Jan 30, 2024 · 0 comments
Open

cmd/go: internal error in go work sync #65363

trajan0x opened this issue Jan 30, 2024 · 0 comments
Assignees
Labels
GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@trajan0x
Copy link

trajan0x commented Jan 30, 2024

Go version

go version go1.21.5 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/trajan0x/Library/Caches/go-build'
GOENV='/Users/trajan0x/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/trajan0x/go/pkg/mod'
GONOPROXY='github.com/synapsecns/*'
GONOSUMDB='github.com/synapsecns/*'
GOOS='darwin'
GOPATH='/Users/trajan0x/go'
GOPRIVATE='github.com/synapsecns/*'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.21.5/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.21.5/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.5'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/dev/null'
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/12/8xtw48x951g0vv4z_ctcr2hr0000gn/T/go-build1424252971=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

  1. git clone https://github.com/synapsecns/sanguine
  2. go work sync
  3. git checkout 995354fca4e89c0931ea5f6f0a77f170aac2f13e (this is happening across a couple commits and I found it on Add native ETH support to relayer synapsecns/sanguine#1840, just providing a single commit on master for reproducibility)

(Note: recipe won't work for this kinda bug, but I created a repl of the repo here and ran the command just for ease of debugging.

What did you see happen?

go: cloud.google.com/go@v0.110.7 requires
        github.com/google/s2a-go@v0.1.4
panic: internal error: found a version conflict, but no constraint it violates

goroutine 1 [running]:
cmd/go/internal/modload.editRequirements({0x1010edbd0, 0x1014830a0}, 0x14013bbaaa0, {0x0, 0x0, 0x1400bb7e828?}, {0x14007bac000, 0x108, 0x1400bb7e800?})
        /opt/homebrew/Cellar/go/1.21.5/libexec/src/cmd/go/internal/modload/edit.go:336 +0x2bc0
cmd/go/internal/modload.EditBuildList({0x1010edbd0, 0x1014830a0}, {0x0, 0x0, 0x0}, {0x14007bac000, 0x108, 0x200})
        /opt/homebrew/Cellar/go/1.21.5/libexec/src/cmd/go/internal/modload/buildlist.go:640 +0x64
cmd/go/internal/workcmd.runSync({0x1010edbd0, 0x1014830a0}, 0x140000265b8?, {0x14?, 0x1010248c0?, 0x100adbc6c?})
        /opt/homebrew/Cellar/go/1.21.5/libexec/src/cmd/go/internal/workcmd/sync.go:117 +0x4d0
main.invoke(0x10143fd80, {0x140000201a0, 0x1, 0x1})
        /opt/homebrew/Cellar/go/1.21.5/libexec/src/cmd/go/main.go:268 +0x4f0
main.main()
        /opt/homebrew/Cellar/go/1.21.5/libexec/src/cmd/go/main.go:186 +0x754

What did you expect to see?

Success, another error, but not a panic.

The fact that this isn't handled gracefully tells me it's probably unintended behavior. But I'm a little unsure based on the context in edit.go

@bcmills bcmills changed the title go work sync internal error cmd/go: internal error in go work sync Jan 30, 2024
@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go modules labels Jan 30, 2024
@bcmills bcmills self-assigned this Jan 30, 2024
@bcmills bcmills added this to the Go1.23 milestone Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants