x/tools/gopls: panic if subdirectories have files with different package #40043
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What did you do?
During some refactoring I added a comment and gopls crashed. I managed to narrow it down to the fact that I accidentally had two files in the same directory with different packages. I have autocompletion within comments enabled in VSCode.
It only seems to apply in subdirectories.
https://github.com/sorenh/gopls-bug has steps to reproduce. It wasn't 100% reproducible. It seemed to be most reliably reproducible if I opened VSCode afresh (with a directory tree as found in that repo) and then tried adding a comment.
What did you expect to see?
gopls shouldn't crash.
What did you see instead?
gopls panicked
Build info
Go info
The text was updated successfully, but these errors were encountered: