-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
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
While working on https://go.dev/cl/634197, I tried the new "Add test for function 'fingerprint'" code action within Emacs+eglot, and got an unhelpful "Internal error". I tried it again from the gopls CLI, and got a different error:
$ gopls codeaction -kind=source.addTest -exec ./gopls/internal/cache/methodsets/fingerprint.go:54
gopls: edits not applied because of getFile: file:///Users/adonovan/w/xtools/gopls/internal/cache/methodsets/fingerprint_test.go: open /Users/adonovan/w/xtools/gopls/internal/cache/methodsets/fingerprint_test.go: no such file or directory
Then I tried it from VS Code, and it worked great. (That said, the code action was not visible in the Command-. quick menu, and had to be selected from the right-click > Source Actions... menu. We should reinvestigate the endlessly fiddly algorithm that governs this.)
So, I don't think there's a bug in gopls' Code Action or command handler, but there is in the CLI, and in Eglot, and perhaps they are related.
Metadata
Metadata
Assignees
Labels
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.