-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.
Milestone
Description
Consider a Go project with main.go looking like this:
package main
import (
"fmt"
"github.com/google/uuid"
)
func main() {
id := uuid.New()
fmt.Println(id)
}When I go to definition (F12) of uuid.New() I end up here:
func New() UUID {
return Must(NewRandom())
}So far so good.
But when I try to navigate futher to Must or NewRandom, I get a popup "No definition found...".
Whereas if I navigate to fmt.Println, I can navigate further into Fprintln, doPrintln, writeByte, etc.
Why is this difference in behavior between Go SDK packages and imported modules?
Shouldn't I be able to navigate within modules the same way I do in my own code and the Go SDK?
gopls version: v0.15.2
go version: 1.22
The full test project can be found at https://github.com/rustyx/issue-66827
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.