Skip to content

Gracefully deactivate when binary not found #230

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

Closed
mqudsi opened this issue Dec 24, 2017 · 1 comment
Closed

Gracefully deactivate when binary not found #230

mqudsi opened this issue Dec 24, 2017 · 1 comment

Comments

@mqudsi
Copy link

mqudsi commented Dec 24, 2017

rust's rls language server is built in a very buggy fashion and it is considered "normal" for it to be missing after running rustup update if the nightly build of rls is broken.

The latest development builds of LanguageClient properly detect this case (languageclient: Not executable! is echoed to the error log) but thereafter deoplete chokes up:

"src/main.rs" 19L, 413C
languageclient: Not executable!
[deoplete] Traceback (most recent call last):
[deoplete]   File "/home/mqudsi/.config/nvim/dein/repos/github.com/Shougo/deoplete.nvim/rplugin/python3/deoplete/deoplete.py", line 136, in gather_results
[deoplete]     ctx['candidates'] = source.gather_candidates(ctx)
[deoplete]   File "/home/mqudsi/.config/nvim/dein/repos/github.com/autozimu/LanguageClient-neovim/rplugin/python3/deoplete/sources/LanguageClientSource.py", line 29, in gather_candidates
[deoplete] Traceback (most recent call last):
[deoplete]   File "/home/mqudsi/.config/nvim/dein/repos/github.com/Shougo/deoplete.nvim/rplugin/python3/deoplete/deoplete.py", line 136, in gather_results
[deoplete] Too many errors from "LanguageClient". This source is disabled until Neovim is restarted.
[deoplete]   File "/usr/local/lib/python3.5/dist-packages/neovim/api/nvim.py", line 230, in call
[deoplete]     ctx['candidates'] = source.gather_candidates(ctx)
[deoplete]     return self.request('nvim_call_function', name, args, **kwargs)
[deoplete]   File "/home/mqudsi/.config/nvim/dein/repos/github.com/autozimu/LanguageClient-neovim/rplugin/python3/deoplete/sources/LanguageClientSource.py", line 29, in gather_candidates
[deoplete]   File "/usr/local/lib/python3.5/dist-packages/neovim/api/nvim.py", line 131, in request
[deoplete]     self.vim.funcs.LanguageClient_omniComplete()
[deoplete]     res = self._session.request(name, *args, **kwargs)
[deoplete]   File "/usr/local/lib/python3.5/dist-packages/neovim/api/nvim.py", line 230, in call
[deoplete]   File "/usr/local/lib/python3.5/dist-packages/neovim/msgpack_rpc/session.py", line 98, in request
[deoplete]     return self.request('nvim_call_function', name, args, **kwargs)
[deoplete]     raise self.error_wrapper(err)
[deoplete]   File "/usr/local/lib/python3.5/dist-packages/neovim/api/nvim.py", line 131, in request
[deoplete] neovim.api.nvim.NvimError: b'Vim(return):E900: Invalid channel id'
[deoplete]     res = self._session.request(name, *args, **kwargs)
[deoplete] Errors from: LanguageClient.  Use :messages for error details.
[deoplete]   File "/usr/local/lib/python3.5/dist-packages/neovim/msgpack_rpc/session.py", line 98, in request
[deoplete]     raise self.error_wrapper(err)
[deoplete] neovim.api.nvim.NvimError: b'Vim(return):E900: Invalid channel id'
[deoplete] Errors from: LanguageClient.  Use :messages for error details.                                                                                                                          

Would it be possible for LanguageClient to handle such error cases more gracefully in such a manner that deoplete does not throw a fit?

(again, this is not filed as a bug report but rather a feature defect. If a reproducible case is still required, kindly let me know and I'll be happy to oblige.)

@mqudsi
Copy link
Author

mqudsi commented Dec 26, 2017

Thank you kindly.

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

1 participant