x/tools/gopls: released version v0.17.1 depends on a dev version of golang.org/x/tools which is removed by go mod tidy
without a replace
directive
#71427
Labels
Milestone
Go version
1.23.5
Output of
go env
in your module/workspace:What did you do?
I have gopls in my
tools.go
so it is controlled by go.mod: https://github.com/zemn-me/monorepo/blob/91a487a370933573cf8ba6b46e3563a39c617ecb/sh/tools.go#L12[email protected] (@latest) depends on a weird dev version of x/tools (v0.27.1-0.20241219162658-575221bfbda3): https://cs.opensource.google/go/x/tools/+/refs/tags/gopls/v0.17.1:gopls/go.mod;l=15
When I run
go mod tidy
, it reverts the version to x/[email protected] (@latest), which I think is correct as per semver. This breaks the build asgopls
is incompatible with that version.What did you see happen?
Without replace directive (zemn-me/monorepo@91a487a):
What did you expect to see?
I fixed this issue with a replace directive, added to go.mod (zemn-me/monorepo@6999e71):
It fixes the issue, but it seems like it should not be needed:
The text was updated successfully, but these errors were encountered: