Description
Go version
go version go1.24rc2 linux/amd64
Output of go env
in your module/workspace:
AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/jamie/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/jamie/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1856760023=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/home/jamie/workspaces/dependency-management-data/go.mod'
GOMODCACHE='/home/jamie/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/jamie/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/jamie/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24rc2.linux-amd64'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/jamie/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/jamie/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24rc2.linux-amd64/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.24rc2'
GOWORK=''
PKG_CONFIG='pkg-config'
What did you do?
As noted in 99designs/gqlgen#3505 I'm trying out Go 1.24's go tool
functionality with gqlgen
.
This appears to only impact gqlgen
, so may be an issue with them directly (99designs/gqlgen#3505) but it's unclear if that's the expectation of moving to go tool
, and so I've raised it here to also see if there's anything the Go team are able to help with.
However, this also seems to be reproducible in Go 1.24rc2 (I have not tested previous RCs), so seems to be most likely due to changes in the Go toolchain.
I have created a branch on one of my projects here to indicate the changes and help test.
Using go tool
# from https://gitlab.com/tanna.dev/dependency-management-data/-/commits/spike/go-tools-124-gql
% cd internal/graph
% go tool github.com/99designs/gqlgen generate --verbose
% echo $?
1
Using go run
# from https://gitlab.com/tanna.dev/dependency-management-data/-/commits/spike/go-tools-124-gql
% cd internal/graph
% git reset --hard c5030b01 # make sure we don't have any `go tool` changes
% go get github.com/99designs/gqlgen@v0.17.49
% go run github.com/99designs/gqlgen generate
exit status 1
What did you see happen?
The go generate
command fails with exit code 1
and no additional information
What did you expect to see?
The go generate
command succeeds, or errors with more information.
Activity
gqlgen
using Go 1.24'sgo tool
directive results in an error 99designs/gqlgen#3505[-]`go tool`: receiving an `exit status 1`[/-][+]`go tool`: receiving an `exit status 1` for certain dependencies[/+]seankhliao commentedon Jan 27, 2025
I think whatever problem you're having is unrelated to
go tool
. Installinggqlgen
directly and running it also results in a nonzero exit status with no output.Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions
gabyhelp commentedon Jan 27, 2025
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
jamietanna commentedon Jan 27, 2025
Thanks Sean - the reason I'd raised this here is that this appears to be directly related to the changes in Go 1.24's
go tool
orgo run
caching - usinggo run
which worked in Go 1.23 is now no longer working in Go 1.24rc2seankhliao commentedon Jan 27, 2025
gqlgen
is depending on too old a version of x/tools to be compatible with the latestgo
, that's unrelated togo run
/go tool
.jamietanna commentedon Jan 27, 2025
Oh interesting, thank you - so bumping that should resolve this? I assume it's due to new directives that the old
/x/tools
can't understand