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

RLS server could not be connected #121

Closed
berkus opened this issue Sep 22, 2017 · 5 comments
Closed

RLS server could not be connected #121

berkus opened this issue Sep 22, 2017 · 5 comments

Comments

@berkus
Copy link

berkus commented Sep 22, 2017

Hi, after recent LSP update Rust RLS stopped working:

LSP: Config added: clangd (enabled)
LSP: Config added: jsts (enabled)
LSP: Config added: ocaml (enabled)
LSP: Config added: golsp (enabled)
LSP: Config added: reason (enabled)
LSP: Config added: dotty (enabled)
LSP: Config added: pyls (enabled)
LSP: Config added: rls (enabled)
environment variables loaded using: /usr/local/bin/fish -l

LSP: no clients found for window 8
LSP: no clients found for window 8
LSP: starting in /Users/berkus/Hobby/carma
LSP: starting ['rustup', 'run', 'nightly', 'rls']
LSP: request 1: initialize 
LSP: client registered for window 8 {'rls': <LSP.main.Client object at 0x1119844d0>}
LSP: got json:  {"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":2,"hoverProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":[".",":"]},"definitionProvider":true,"refer
LSP: notify: initialized
LSP: LSP stderr process ended.
LSP: notify: textDocument/didOpen
LSP: client unexpectedly died: [Errno 32] Broken pipe
LSP: LSP stdout process ended.

>>> from os import environ
>>> print(environ['PATH'])
/usr/local/sbin:/usr/local/bin:/Users/berkus/.cargo/bin:/Users/berkus/Tools/go/bin:/Users/berkus/Tools/bin:/Users/berkus/.gem/ruby/2.0.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/MacGPG2/bin
LSP: checking for clients on on  /Users/berkus/Hobby/carma
LSP: notify: textDocument/didChange
LSP: client unexpectedly died: [Errno 32] Broken pipe
LSP: notify: textDocument/didChange
LSP: client unexpectedly died: [Errno 32] Broken pipe
LSP: request 2: textDocument/completion 
LSP: client unexpectedly died: [Errno 32] Broken pipe

So RLS could be started but then crashes or otherwise ends, nothing interesting in the logs to that extent.
Running rustup run nightly rls from the command line seems to start the server at least.

@tomv564
Copy link
Contributor

tomv564 commented Sep 22, 2017

Hi Berkus, there was a discussion in the RLS repo here about a crash in the server when LSP sends the initialized notification: rust-lang/rls#214

It looks like the RLS fix was merged, but I also made a preventative fix to LSP.

If it takes a while for the RLS fix to reach you, you could install the LSP package from master (see https://packagecontrol.io/docs/usage).

@berkus
Copy link
Author

berkus commented Sep 22, 2017

Thanks, I will check if nightly rls is updated today.

@golddranks
Copy link
Contributor

Sadly, the RLS on Rust nightly is seldom updated. Of course, one can build RLS from source and cargo install it.

If it continues crashing, it would help to set the RUST_LOG env var to rls=trace, to get a better picture what is it doing and why does it crash. But it's likely to be fixed on the master of RLS, because a recent change made the parsing a lot more lenient.

@berkus
Copy link
Author

berkus commented Sep 25, 2017

Ok, i followed the instructions and updated LSP to the master build - it seems to work more stable now, although some completions are still missing, trying to figure out what's up with that.

@tomv564
Copy link
Contributor

tomv564 commented Oct 2, 2017

Going to close this issue now, LSP is still continually improving completions behaviour. Please open a new issue if you can narrow down a problem with RLS!

@tomv564 tomv564 closed this as completed Oct 2, 2017
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