-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/gopls: gopls reports Internal error when run from Emacs' eglot #39896
Comments
Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here. |
|
At @heschik's suggestion, I wonder if this error response comes from the |
Could be, and I'll investigate. But would it be possible to return invalid argument, or a better log diagnostic, than internal error? |
Sorry if I wasn't clear - I think that Eglot is returning the internal error. We can probably wrap the error message to confirm this, but |
ah, thank you. |
Change https://golang.org/cl/240619 mentions this issue: |
FWIW -- I lost track of this, and the most recent version of eglot seems to have fixed it. Thank you! |
I'm new to eglot (an Emacs interface to language servers), gopls, and Go modules, so I'm not sure how to debug this.
What did you do?
This happens whenever I start eglot from within Emacs on my machine at home.
This happens all the time, but here's a simplfiied version:
If you aren't an Emacs user, this starts Emacs bypassing my config file, inits the package manager (so eglot, an add-on is available), does the same with go-mode. Load any Go file and turn eglot on, and it fails.
What did you expect to see?
Eglot start up and be able to call various language server features.
What did you see instead?
Emacs shows an error, and reports this in its internal log:
[eglot] Connected! Server
gopls' now managing
go-mode' buffers in project `tools'.[eglot] Server reports (type=1): Error loading workspace folders (expected 1, got 0)
failed to load view for file:///home/tjs/go/src/golang.org/x/tools/: Internal error
If I go a step further, and enable the -rpc.trace option, I can get the following in gopls' log file. In this case, I was trying to run eglot on .../godoc/godoc.go, but I got this to happen on everything I tried to attach to.
Build info
go get
, with repository at aa94e73 (current HEAD)Go info
The text was updated successfully, but these errors were encountered: