Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/gopls: autocomplete not working as expected #32654
What version of Go are you using (
I can't. I illustrated 2 things in below. One is
I also captured logs during this GIF recording. I've attached both below. Let me know if you need anything else.
I see various errors like
An easy way to check if this is happening:
If they don't match, then things have gotten out of sync. If they do match, I am out of ideas.
I'm having the exact same issue as this user. For me it happens from the very beginning, so I was able to capture the log at a minimal size.
If I run gopls for awhile, I sometimes am able to see this error pop up:
Sadly, the Cache does look to be exactly correct. It updates with every keystroke to the correct contents.
Is there any other info I can provide to help debug this issue?
EDIT: Okay the problem just went away when I enabled GO111MODULES=on . Originally I had to disable the modules because of gopls taking up over 4GB of memory on an older version. I'll operate with the modules being enabled for awhile and see if the issue props up again. But issues with modules disabled could be a consistent setting between myself and the original poster.
@stamblerre, sorry for late reply. See, I am trying to reproduce same behavior on my project since 2 days that uses
I am constantly watching and will record both GIF and a log for this when i face with same issue. But it seems fixed here.
Dunno why i got wrong behavior in the first place. Perhaps, something was different at that time but as i said, it just works at the moment.
Thank you so much for your help & fast fixes for both of my issues!