x/tools/gopls: crash - index out of range #35455
Comments
Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here. |
Hi, I think I have an idea where this is happening: I'm wondering if you could provide some information about the workspace you opened VSCode in: Specifically
|
Sure! The VSCode workspace features multiple directories mapped together (ie, our go monorepo, our frontend code, etc). The go directory is in a module. The root of the go directory contains a module, but all of the packages within it start at least two levels deep. As an example:
I believe there are 0 packages closer than 2 directories away from the root, due to code organization reasons. All of the go tools (go build, go mod, etc) seem to work totally fine with this organization structure. |
Just to make sure I understand, each of the directories in your VSCode workspace are root directories of a module (that is, each of them contain go.mod files) right? |
No - only one does. The rest are not go related: In that image, In the image, Edit: I noticed that VSCode sometimes only loads plugins/etc when working on related files. For the avoidance of doubt, I was working on .go files somewhere deep within the structure of |
Change https://golang.org/cl/206140 mentions this issue: |
@bmhatfield, Could you patch in https://golang.org/cl/206140 and let us know if it works? |
Confirmed that it's working for me locally:
(the first 5 |
Thanks for the fast turnaround! |
Hey there,
I manually keep gopls at current master to track upcoming changes.
This morning, VSCode warned me that it had stopped restarting gopls due to it crashing too many times (installed commit:
f7ea15e6
,go version go1.13.4 darwin/amd64
):The text was updated successfully, but these errors were encountered: