-
Notifications
You must be signed in to change notification settings - Fork 196
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
Support asdf-vm setup in wrapper scripts #78
Conversation
This seems to make sense to me and it appears it is safe to call |
It would probably be fine to merge, but I'd prefer the creation of a
separate emacs package, a minor asdf mode, or something similar (There were
minor mode like that for rbenv, chruby, etc.) - I'm not sure it is
elixir-ls 's job to handle this.
…On Sat, Dec 7, 2019 at 1:49 PM Jason Axelson ***@***.***> wrote:
This seems to make sense to me and it appears it is safe to call
"$HOME/.asdf/asdf.sh" multiple times. And according to the recent
ElixirForum poll
https://elixirforum.com/t/which-elixir-version-manager-are-you-using-poll/27186
76% of developers in the poll are using asdf, and 13% are not using any
version manager. That means that this PR likely covers a majority of users.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#78?email_source=notifications&email_token=AAAQSSNIKF434R35FCOSGTDQXPVZ7A5CNFSM4JR5I73KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGGNAHI#issuecomment-562876445>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAQSSLLJRSSFDZJA5K4FQ3QXPVZ7ANCNFSM4JR5I73A>
.
|
Though I am, of course, open to being convinced :) |
This is not emacs specific. It could happen when stuff is called from any idea. I just found it on emacs (and only in certain circumstances asdf-vm isn’t setup already) because I have an excellent taste in IDEs ;). But I don’t think I’d be hard pressed to come up with a way to reproduce it with other environments as well. As far as I’m concerned it’s a sort of belt-and-suspenders approach to make sure that if the user uses asdf-vm, it is setup and used correctly no matter how we’re invoked. (I think the #1 route to not have asdf setup is when users are confused which of bashrc/bash_profile/... is invoked at login and which only for interactive shells. I still don’t know ;)) |
Okay, that's fair. I'm sold.
…On Sat, Dec 7, 2019 at 3:27 PM Cees de Groot ***@***.***> wrote:
This is not emacs specific. It could happen when stuff is called from any
idea. I just found it on emacs (and only in certain circumstances asdf-vm
isn’t setup already) because I have an excellent taste in IDEs ;). But I
don’t think I’d be hard pressed to come up with a way to reproduce it with
other environments as well. As far as I’m concerned it’s a sort of
belt-and-suspenders approach to make sure that if the user uses asdf-vm, it
is setup and used correctly no matter how we’re invoked.
(I think the #1 <#1> route to
not have asdf setup is when users are confused which of
bashrc/bash_profile/... is invoked at login and which only for interactive
shells. I still don’t know ;))
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#78?email_source=notifications&email_token=AAAQSSIUVH3WOO7DARHZODLQXQBJLA5CNFSM4JR5I73KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGGOXAY#issuecomment-562883459>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAQSSLJCRBCZB4XVX4ZE7TQXQBJLANCNFSM4JR5I73A>
.
|
Thanks for contributing! 🙌 |
IDEs often don't have the same environment as the command line and this can, in certain circumstances, break Elixir. I've had multiple projects that could not start elixir-ls from Emacs, for example, due to subtle PATH differences.
asdf-vm is probably the most widely used version manager for Elixir projects; this PR invokes its configuration script if it exists, ensuring that Elixir gets invoked in the same way as on the command line.
I'm not super happy with explicitly supporting a single version manager, but it smells like "the standard" in Elixir land and if the config script is not available, this PR is a no-op anyway.