Skip to content
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

ide-go the gopls language server stopped unexpectedly #8

Open
wuleninja opened this issue Mar 26, 2020 · 10 comments
Open

ide-go the gopls language server stopped unexpectedly #8

wuleninja opened this issue Mar 26, 2020 · 10 comments

Comments

@wuleninja
Copy link

Description

ide-gopls does not load at Atom's startup.

Steps to Reproduce

  1. Open Atom with ide-gopls installed.

Expected behavior:

No error hint.

Actual behavior:

2 error hints (red) :

ide-go the gopls language server stopped unexpectedly.
Exit code -2

then

gopls language server for Go unable to start
Error: spawn gopls ENOENT

Reproduces how often:

Always.

Versions

atom --version
Atom    : 1.45.0
Electron: 4.2.7
Chrome  : 69.0.3497.128
Node    : 10.11.0
apm --version
apm  2.4.3
npm  6.2.0
node 10.2.1 x64
atom 1.45.0
python 2.7.16
git 2.21.1

Additional Information

OS : macOS 10.15.3

Current workaround

  1. Close the error hints
  2. Uninstall ide-gopls
  3. Install it again, without restarting Atom
  4. Work with ide-gopls
@stamblerre
Copy link

It sounds like gopls may have crashed in this case. Is there any way for you to view the gopls logs when this happens?

@wuleninja
Copy link
Author

There does not seem to be any documentation about how to access the gopls logging through this package.

The fact that it works right after being installed, could it be a clue ? It's like the installation of ide-gopls manages to launch gopls correctly, whereas its launching at Atom's startup does not.

@stamblerre
Copy link

The tips here may prove useful in investigating. I likely won't have a chance to look at this for a while, but that may be a place to start.

@wuleninja
Copy link
Author

wuleninja commented Mar 27, 2020

Thanks ! I've started looking into it, though I'm not very at ease with debugging in this kind of environment.

Looks like disabling / enabling the package again also works as a workaround.

@xh3b4sd
Copy link

xh3b4sd commented May 16, 2020

I experience the same problem. I played around a bit and tried to figure out what the current state of the art with all the packages and their configuration might be. It is currently pretty complicated to get Golang IDE features right. Starting Atom with open *.go files causes gopls to crash.

Screenshot 2020-05-16 at 13 11 05

Screenshot 2020-05-16 at 13 11 18

Disabling/enabling ide-gopls and atom-ide-ui seems to resolve the problem as a workaround. Closing all Golang source files and starting Atom seems then also to be fine and no crashing of gopls appears to happen.

I cannot really do more than report this but would be curious to know if someone is looking at the issue. I am afraid hacking go in Atom becomes a dying art.

@stamblerre
Copy link

If you can get a gopls log when you see this, I can advise about what might be causing gopls to crash.

I cannot really do more than report this but would be curious to know if someone is looking at the issue. I am afraid hacking go in Atom becomes a dying art.

Unfortunately, this does seem to be the case. The LSP client library on which this extension depends is used by all Atom LSP extensions, and it does not support recent versions of the protocol (atom/atom-languageclient#280). I would suggest trying out VS Code as an alternative since it is quite similar to Atom. You can also see more details about popular Go editors in the Developer Tools section of the Go 2019 user survey: https://blog.golang.org/survey2019-results.

@xh3b4sd
Copy link

xh3b4sd commented May 18, 2020

Looks like I am riding a dead horse. 🙈 I tried VS Code recently but it smelled too much like Windows 95. Can you tell me where I find the gopls logs?

@stamblerre
Copy link

It looks like you will need to add this configuration: https://github.com/atom/atom-languageclient#debugging.

@xh3b4sd
Copy link

xh3b4sd commented May 18, 2020

So what does it tell you when you debug it on your end? How can the issue be fixed?

@stamblerre
Copy link

I'm sorry, but I will likely not have time to debug this issue, particularly since it seems like there is an existing workaround. I'm happy to advise on gopls-specific issues, but fixes for editor-specific issues will have to be made by community contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants