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

Indexing project fails because rebar3 is not included in bundled Elixir #451

Closed
cschmatzler opened this issue May 8, 2024 · 4 comments · Fixed by #452 or #453
Closed

Indexing project fails because rebar3 is not included in bundled Elixir #451

cschmatzler opened this issue May 8, 2024 · 4 comments · Fixed by #452 or #453

Comments

@cschmatzler
Copy link

Fresh install of 0.21.1 using elixir-tools.nvim, I don't get any completions or symbols for my project because indexing fails.
The log shows the following:

23:25:05.192 [debug] sent notification server -> client window/logMessage

23:25:05.192 [info] Shall I install rebar3? (if running non-interactively, use "mix local.rebar --force") [Yn] 

23:25:05.197 [debug] sent notification server -> client $/progress

23:25:05.197 [debug] sent notification server -> client window/logMessage

23:25:05.197 [warning] Unexpected compiler response: {:error, %{message: "Could not find \"rebar3\" to compile dependency :poolboy, please ensure \"rebar3\" is available", __struct__: Mix.Error, __exception__: true, mix: 1}}

Since the runtime is now bundled with next-ls, I don't know how I can install rebar myself. All dependencies work locally using Elixir 1.16.2, OTP 26.2.4 both installed using mise.

@mhanberg
Copy link
Collaborator

mhanberg commented May 8, 2024

Can you delete this directory ~/.cache/elixir-tools/nextls/elixir and then restart?

I think maybe something went wrong where it unarchived the bundle but failed before installing rebar and hex.

@mhanberg
Copy link
Collaborator

mhanberg commented May 9, 2024

Actually I think #452 will fix it.

if you can, can you try and build it locally and try (you'll need to first do ./burrito_out/next_ls_<os>_<arch> maintenance uninstall and then set the cmd field in the setup in elixir-tools.nvim to point to the binary for your OS

you'll need zig installed tho, but mise should install it

BURRITO_TARGET=linux_amd64 MIX_ENV=prod mix release --overwrite

you can see the valid burrito targets for your machine in mix.exs (or else it will build all of them)

or i can release the linked patch and you update and see if it works

@mhanberg
Copy link
Collaborator

mhanberg commented May 9, 2024

OK, update when you can and tell me if it solves your problem

@cschmatzler
Copy link
Author

Hey, sorry I couldn’t test it before you cut a release, time zones and stuff meant I was snoring away.
Can confirm that 0.21.2 fixes the issue and my project gets indexed now. Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants