You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried the new go tool command with https://sqlc.dev. Installation and a version upgrade worked fine, but a version downgrade left the tool broken. go mod tidy didn't help. I had to revert the changes to go.mod and start anew.
Compilation failures of the tool occurred after specifying a lower version.
What did you expect to see?
I expect to be able change the tool version as needed without error. I can do this today with go run, for example:
$ go run github.com/sqlc-dev/sqlc/cmd/sqlc@v1.27.0 version
v1.27.0
$ go run github.com/sqlc-dev/sqlc/cmd/sqlc@v1.28.0 version
go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53
v1.28.0
$ go run github.com/sqlc-dev/sqlc/cmd/sqlc@v1.27.0 version
v1.27.0
The text was updated successfully, but these errors were encountered:
kalafut
changed the title
cmd/go: get -tool doesn't fully/correctly downgrade tools
cmd/go: go get -tool doesn't fully/correctly downgrade tools
Feb 12, 2025
this is like any other dependency, upgrading can bring in newer versions of indirect dependencies, these aren't downgraded , but are incompatible with older versions of your direct dependency
go run pkg@version is not comparable because it's stateless every time.
closing as while it may be unfortunately, it's working as intended
Go version
go version go1.24.0 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
I tried the new
go tool
command with https://sqlc.dev. Installation and a version upgrade worked fine, but a version downgrade left the tool broken.go mod tidy
didn't help. I had to revert the changes togo.mod
and start anew.What did you see happen?
Compilation failures of the tool occurred after specifying a lower version.
What did you expect to see?
I expect to be able change the tool version as needed without error. I can do this today with
go run
, for example:The text was updated successfully, but these errors were encountered: