Skip to content

Partial change to show better versioning #121

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
wants to merge 1 commit into from
Closed

Partial change to show better versioning #121

wants to merge 1 commit into from

Conversation

cdegroot
Copy link
Contributor

Work in progress/proof of concept for issue #115

This installs sources and modifies the language server script to compile and use the right version on-the-fly. Compiled versions are cached so a slow start only happens once.

@axelson
Copy link
Member

axelson commented Feb 13, 2020

This seems like a promising approach. Just wanted to drop a note that we need to ensure that language_server.bat still works as well (which means we can't rely on a full unix environment). If that starts to prove difficult then perhaps part of the launcher code could be written in Elixir to make cross platform support easier?

@cdegroot
Copy link
Contributor Author

Absolutely. I just whipped something up using Make/tar/... because I know these tools and it was the quickest way to show something but I'm fully expecting to tear this apart and rebuild it to support Win/Mac/*nix. I think most of the Makefile bits can be redone in Elixir; I haven't done Window scripting for a while, but at the end of the day there's always Powershell :).

@axelson
Copy link
Member

axelson commented Feb 14, 2020

Okay, sounds good 👍

export ERL_LIBS="$SCRIPTPATH:$ERL_LIBS"
version=$(elixir -v|grep ^Elixir| sed 's/Elixir \(.*\) (compiled with Erlang\/OTP \(.*\))/\1-\2/')

target_dir=~/.cache/elixir-ls/$version

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to respect XDG dirs here?

Suggested change
target_dir=~/.cache/elixir-ls/$version
target_dir="${XDG_CACHE_HOME:-~/.cache}/elixir-ls/$version"

This pull request was closed.
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

Successfully merging this pull request may close these issues.

3 participants