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
With both the Neovim LSP and VS Code, both using gopls as my language server, I've attempted to rename this function from SetCompanionRetainHeight to SetCompanionBlockRetainHeight.
I cannot find a minimal way to reproduce this bug unfortunately.
What did you expect to see?
The function to be renamed, as well as all references to the function.
What did you see instead?
The function was renamed, but the function above it (checkHeightBound) was also renamed to SetCompanionBlockRetainHeight - incorrectly, of course. All prior references to checkHeightBound are now also renamed to SetCompanionBlockRetainHeight.
Not only this, but some prior references to SetCompanionRetainHeight still remain.
On a hunch, I grepped for method declarations in test packages: indeed export_test.go declares methods on Pruner. That's almost certainly the cause: a method index from one package graph is likely being incorrectly used in a different package graph. That would also explain why this failure mode is not frequently observed.
I came across a similar bug. In the following codebase renaming ControlBlock.Snd to Send. it renamed validateIncomingSegment to Send as well. Restarting VSCode and the language server did not fix the issue. Reinstalling gopls with latest fixed it.