gopls/internal/cache: set GO111MODULE=on for go.work view#606
gopls/internal/cache: set GO111MODULE=on for go.work view#606koct9i wants to merge 1 commit intogolang:masterfrom
Conversation
GO111MODULE=auto disables modules when go tool sees only go.work file. $ go version go version go1.23.1 linux/amd64 $ echo 'go 1.24' > go.work $ go version go version go1.24.0 linux/amd64 $ GO111MODULE=auto go version go version go1.23.1 linux/amd64 When go in $PATH is too old this breaks gopls for repositories like this: https://github.com/containers/container-libs/ Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
|
Original issues looks like this |
|
This PR (HEAD: 30741a5) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/724262. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/724262. |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be Please don’t reply on this GitHub thread. Visit golang.org/cl/724262. |
|
Message from Konstantin Khlebnikov: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/724262. |
GO111MODULE=auto disables modules when go tool sees only go.work file.
$ go version
go version go1.23.1 linux/amd64
$ echo 'go 1.24' > go.work
$ go version
go version go1.24.0 linux/amd64
$ GO111MODULE=auto go version
go version go1.23.1 linux/amd64
When go in $PATH is too old this breaks gopls for repositories like this:
https://github.com/containers/container-libs/
Fixes: golang/go#76728