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

Guidance on what version the language server should run #112

Closed
cdegroot opened this issue Feb 4, 2020 · 2 comments
Closed

Guidance on what version the language server should run #112

cdegroot opened this issue Feb 4, 2020 · 2 comments

Comments

@cdegroot
Copy link
Contributor

cdegroot commented Feb 4, 2020

Environment

  • Elixir & Erlang versions (elixir --version): Lots :)
  • Operating system: Linux
  • Client (editor or IDE): Emacs 26.2 / Spacemacs development branch.

Description

I run a single Emacs server, and graphical or terminal clients; at any given time, I may have one or more Elixir projects open (using projectile) and I'm switching through a wide variety of Elixir/OTP version requirements, all neatly handled by asdf-vm.

As far as I can tell, only one language server is started by Emacs and shared by all the projects. I'm not sure whether that's intended or not but it does beg the question what version the language server should run under. Currently, Emacs starts language_server.sh from whatever project directory is current, and this version may be too old (or too new?) for other projects.

My hunch is that elixir-ls should be compiled with the lowest supported version and run with the highest supported version so that it understands everything that various projects throw at it, but I'm not sure. In any case, it smells to me that "what version to run this with" is a tad under-documented.

@axelson
Copy link
Member

axelson commented Feb 7, 2020

Currently for emacs with lsp-mode I'd expect one instance of ElixirLS to run for each project because in lsp-mode the ElixirLS definition is not defined with :multi-root t. Here's a similar example for go: emacs-lsp/lsp-mode#1275

You can verify how many servers are running with M-x lsp-describe-session

My hunch is that elixir-ls should be compiled with the lowest supported version and run with the highest supported version so that it understands everything that various projects throw at it, but I'm not sure. In any case, it smells to me that "what version to run this with" is a tad under-documented.

Currently how ElixirLS works is that it is compiled with the lowest supported version (currently 1.7.4 with erlang 20.3.8.23) and then it runs on the same version that the project is running (if running via asdf) or it runs based on whatever version of elixir is installed globally.

But I just started a discussion about changing the approach used to run ElixirLS #115

@cdegroot
Copy link
Contributor Author

Thanks. I guess that I got confused about compatibility issues/the number of instances running because of the incompatible logging changes that happened in 1.10. I think #115 is much more relevant (if the solution manages to be transparent) so closing this.

axelson added a commit that referenced this issue Jun 28, 2020
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

2 participants