x/tools/gopls: panic on invalid filename #49223
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 version of Go are you using (
go version
)?What did you do?
Used gopls via vim-go. Opened up one of the fugitive.vim plugin diff views, a textDocument/definition request was sent which crashed gopls.
What did you expect to see?
No panic, but ResponseMessage with ResponseError
What did you see instead?
The following request was sent to gopls:
This resulted in gopls panic:
I think that regressions was introduced in v0.7.1:
https://github.com/golang/tools/blob/e08545a2921d85f5ac0c3f1dde9997511237c957/internal/lsp/definition.go#L16
To be clear, I don't expect gopls to be able to handle things outside of defined URI scheme, but valid payload with invalid values should not result in panic.
The text was updated successfully, but these errors were encountered: