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
$ go version
go version devel go1.18-3d7cb23e3d Wed Nov 17 01:56:19 2021 +0000 darwin/amd64
What did you do?
$ git clone https://go.googlesource.com/tools
$ go work init
$ cd
go.work tools
$ cat go.work
go 1.18
$ cd tools
$ go list
go list
panic: in workspace mode, but pruning is not workspace in newRequirements
goroutine 1 [running]:
cmd/go/internal/modload.newRequirements(0x0, {0x0?, 0x0, 0x5?}, 0x0)
/Users/hakim/sdk/gotip/src/cmd/go/internal/modload/buildlist.go:118 +0x718
cmd/go/internal/modload.LoadModFile({0x16d63e0, 0xc000124000})
/Users/hakim/sdk/gotip/src/cmd/go/internal/modload/init.go:695 +0x599
cmd/go/internal/modload.LoadPackages({0x16d63e0?, 0xc000124000}, {{0x0, 0x0}, 0xc00025a090, 0x0, {0x0, 0x0}, 0x0, 0x1, ...}, ...)
/Users/hakim/sdk/gotip/src/cmd/go/internal/modload/load.go:341 +0x1f7
cmd/go/internal/load.PackagesAndErrors({0x16d63e0?, 0xc000124000?}, {0xf?, 0x0?, 0x0?}, {0xc000140010, 0x0, 0x0})
/Users/hakim/sdk/gotip/src/cmd/go/internal/load/pkg.go:2647 +0x1cb
cmd/go/internal/list.runList({0x16d63e0?, 0xc000124000}, 0xc00019e300?, {0xc000140010?, 0x0, 0x0})
/Users/hakim/sdk/gotip/src/cmd/go/internal/list/list.go:508 +0x9f3
main.invoke(0x19b2140, {0xc000140010, 0x1, 0x1})
/Users/hakim/sdk/gotip/src/cmd/go/main.go:218 +0x2ee
main.main()
/Users/hakim/sdk/gotip/src/cmd/go/main.go:175 +0x78e
What did you expect to see?
Helpful error message either when running go work init without a directory, or
when running go list in the tools directory that's not included in go.work.
Or, maybe operate in non-go.work mode when running go list from the tools directory.
What version of Go are you using (
go version
)?What did you do?
What did you expect to see?
Helpful error message either when running
go work init
without a directory, orwhen running
go list
in the tools directory that's not included in go.work.Or, maybe operate in non-go.work mode when running
go list
from the tools directory.What did you see instead?
Panic
cc @matloob
The text was updated successfully, but these errors were encountered: