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

R language server reported as available even when language server package is missing (but R is installed) #97

Closed
krassowski opened this issue Nov 5, 2019 · 3 comments · Fixed by #463
Labels
bug Something isn't working good first issue Good for newcomers lang:r r-languageserver, Rlang, etc.

Comments

@krassowski
Copy link
Member

While node modules-based specs check for the package presence, the shell-based specs only check for the command existence:

https://github.com/krassowski/jupyterlab-lsp/blob/e393acec2d7d8444ee8ae56c54e644a53b9a308d/py_src/jupyter_lsp/specs/utils.py#L34-L42

In the case of R, Rscript is available whenever R is installed - even if the languageserver package is not installed. We can very easily get a one-liner R script to check if the package is installed. This should probably be a method of SpecBase called in __call__; it could be named is_installed(self) or something like this.

Note: this does not affect python's plys as the checked command (pyls) is directly linked to the LSP server installation.

@krassowski krassowski added bug Something isn't working good first issue Good for newcomers labels Nov 5, 2019
@krassowski krassowski added this to the 0.7 milestone Nov 5, 2019
@krassowski
Copy link
Member Author

krassowski commented Nov 5, 2019

The existing code which checks for installation should probably be moved into this new method; the child classes would then be able to call super().is_installed() if they need to access the result of command/node existence check.

@bollwyvl
Copy link
Collaborator

bollwyvl commented Nov 5, 2019 via email

@krassowski
Copy link
Member Author

I guess we could look in library paths, but this would be much less reilable than just using a dedicated mechanism.

@krassowski krassowski modified the milestones: 0.7, 0.8 Jan 22, 2020
@krassowski krassowski modified the milestones: 0.8, 1.2 Aug 12, 2020
@krassowski krassowski modified the milestones: 1.2, 2.1 Sep 4, 2020
@krassowski krassowski removed this from the 2.1 milestone Jan 9, 2021
@krassowski krassowski added the lang:r r-languageserver, Rlang, etc. label Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers lang:r r-languageserver, Rlang, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@bollwyvl @krassowski and others