x/tools/gopls: add tests for references includeDeclaration setting #36598
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
NeedsFix
The path to resolution is known, but the work has not been done.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Prior to CL 211999, calling
References
would always return the definition of the identifier in question as the first reference. That appears to have changed with this CL.Per previous work by Suzy, having the first location be the definition itself then allows the client to do custom sorting relative to the definition location.
I'm assuming this was an unintentional change?
What did you expect to see?
The definition location for an identifier to always be returned as the first item in the returned list.
What did you see instead?
Random locations (because the returned list has no defined order, despite it being a list)
cc @stamblerre @muirdm
FYI @leitzler
The text was updated successfully, but these errors were encountered: