Closed as not planned
Description
I noticed that when my go.work file is in GOROOT, gopls@master no longer loads both std and cmd. This is because we've started using go env GOWORK
to find go.work files, and this does not behave as expected when the go.work file is in GOROOT.
Tested with go version devel go1.21-f62c9701b4 Tue Apr 4 07:17:19 2023 +0000 linux/amd64
Simple repro:
$ cd $(go env GOWORK)
$ go work init src src/cmd
$ go env GOWORK
/path/to/GOROOT/go.work
$ cd src
$ go env GOWORK
<nothing>