-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
elixir-ls: init at 0.5.0 #97245
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
elixir-ls: init at 0.5.0 #97245
Conversation
I'm not sure if I need to take any further action regarding the CI failure? It seems unrelated to this change, but I could definitely be wrong |
Looks like an unrelated evaluation error on master at the time; let's try again. |
@GrahamcOfBorg eval |
I'm not in favor of this, there are a lot of known problems when the LS is running on a different elixir version than what was used to compile. The precompiled version is compiled using Elixir 1.8 as you can see here: https://github.com/elixir-lsp/elixir-ls/blob/master/.release-tool-versions#L6 This version, when used with a runtime Elixir of 1.10, is known to cause problems with completing names that are in scope due to macro expansion. I have a derivation in my personal overlay that seems to work reliable. I have to admit though, that this derivation, as well as the helper function is largely inspired by some code of the user @hauleth. |
@NobbZ if you want to open a PR that's more robust than this I'm happy to close this in favour of a better solution |
@NobbZ I took a look at the implementation of That said I think a good compromise would be to fork the |
As an author of that script I can say a little about it. Right now the approach I took is only safe way to fetch deps. By safe I mean that it is future proof, as Mix do not have any guarantees about |
The only problem we ever had with that function was when an update of And I was pretty sure we reported it as a bug and asked for at least not failing if |
In that case I stand corrected, should this then be something that is merged into |
I have even started the repo for such functions - https://github.com/hauleth/nix-elixir, however I didn't have time to improve that recently. I will need to sit and fix that. Unfortunately I do not see a way to make overrides to |
I have updated my repo with overlay. Now it can be mostly copied to the NixPkgs almost as is. It adds support for ElixirLS, ErlangLS and Sourcer as well as adding |
Do you plan to contribute these? It might be useful to get the conversation going as the elixir infra in nixpkgs needs some love. I do know that there's a crowd that prefer the lockfiles to be turned into |
I'm happy to contribute if necessary, but it does seem more appropriate for the author to contribute @hauleth. Not to mention I don't think I'm knowledgeable enough to be the maintainer |
Sorry didn't mean to give the impression I thought the response was for me. I just wanted to clarify my position in case nobody else wants to add / maintain those utilities |
I've since tried testing this out myself. Note this is just a quick hacky attempt, I don't know that we can replace
Not sure why this is? Fixed output derivations aren't being phased out as part of flakes are they or something like that? I do have flake support turned on Side note: this whole thing prompted me to learn about fixed output derivations, and my apologies for my previous stance
I was clearly uninformed |
From first glance it seems as if you have missed to pass the sha. If you leave it out, then |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/state-of-the-beam-ecosystem-in-nix/4202/15 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Motivation for this change
close #73231, provide the elixir language server development tool
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)Notes
Didn't attempt to build from source given the current state of elixir support in
nixpkgs
(no reliable way to fetch elixir dependencies). I renamed the executable scripts to prevent naming conflicts, removed the scripts targeting windows and tested the language server usingkak-lsp
to ensure it functions properly.