elixir-lsp/elixir-ls

Probably whitespace in the path is triggering an error

Sheol27 opened this issue · 7 comments

I'm trying to use elixirls both on VsCode and NeoVim, and i'm facing the same issue:

an exception was raised:\n ** (Mix.Error) Could not compile dependency :telemetry, \"/Users/nick name/.mix/elixir/1-16/rebar3 bare compile --paths /Users/nick name/Dev/distage/.elixir_ls/build/test/lib/*/ebin\" command failed. Errors may have been logged above. You can recompile this dependency with \"mix deps.compile telemetry --force\", update it with \"mix deps.update telemetry\" or clean it with \"mix deps.clean telemetry\"\n (mix 1.16.0) lib/mix.ex:580: Mix.raise/2\n (mix 1.16.0) lib/mix/tasks/deps.compile.ex:301: Mix.Tasks.Deps.Compile.do_command/5\n (mix 1.16.0) lib/mix/tasks/deps.compile.ex:211: Mix.Tasks.Deps.Compile.do_rebar3/2\n (mix 1.16.0) lib/mix/tasks/deps.compile.ex:93: anonymous fn/4 in Mix.Tasks.Deps.Compile.compile/2\n (elixir 1.16.0) lib/enum.ex:1700: Enum.\"-map/2-lists^map/1-1-\"/2\n (mix 1.16.0) lib/mix/tasks/deps.compile.ex:77: Mix.Tasks.Deps.Compile.compile/2\n (mix 1.16.0) lib/mix/tasks/deps.loadpaths.ex:87: Mix.Tasks.Deps.Loadpaths.deps_check/2\n (mix 1.16.0) lib/mix/tasks/deps.loadpaths.ex:48: Mix.Tasks.Deps.Loadpaths.run/1\n (mix 1.16.0) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5\n (mix 1.16.0) lib/mix/tasks/loadpaths.ex:37: Mix.Tasks.Loadpaths.run/1\n (mix 1.16.0) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5\n (mix 1.16.0) lib/mix/tasks/compile.ex:153: Mix.Tasks.Compile.run/1\n (mix 1.16.0) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5\n (language_server 0.19.0) lib/language_server/build.ex:442: ElixirLS.LanguageServer.Build.run_mix_compile/1\n (language_server 0.19.0) lib/language_server/build.ex:80: anonymous fn/3 in ElixirLS.LanguageServer.Build.build/3\n (stdlib 5.2) timer.erl:270: :timer.tc/2

I'm using elixir 1.16 and otp 26

Please create a simple repo that reproduces it. I have projects using telemetry dependency that compile without problems.

Here you are

I just initialised a basic phoenix project, with mix phx.new.

As I mentioned before, i think that the problem is due to whitespaces, since my home folder is something like "/Users/user name/". I know it's not a best practice, but i cannot change since i'm using a company computer

Sorry, I cannot reproduce that. I cloned your repo to a directory with space and it builds in ElixirLS without problems. Have you tried removing deps, _build and .elixir_ls dirs?

Yes, I tried deleting those folders. If can help I'm on macOS M1 Pro. Is there any other information I can give you to help ?

Check your rebar3 install. Which version do you have? Do you set MIX_REBAR3 env?
Please try to build elixir from source with quotes added in this line https://github.com/elixir-lang/elixir/blob/ab756dafc2e400ce292d047183436cbbd66a00be/lib/mix/lib/mix/tasks/deps.compile.ex#L210 or report a bug to elixir project

Yes! It works! @lukaszsamson