-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: crash - index out of range #35455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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: