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

Compatibility with OTP 24 #503

Closed
tcrossland opened this issue Mar 3, 2021 · 2 comments
Closed

Compatibility with OTP 24 #503

tcrossland opened this issue Mar 3, 2021 · 2 comments

Comments

@tcrossland
Copy link
Contributor

tcrossland commented Mar 3, 2021

The language server terminates repeatedly when using OTP 24 (and elixir master). I've tried compiling elixir-ls with the same version of OTP and Elixir, but compilation fails complaining about the use of erlang:get_stacktrace/0 which has been removed in OTP 24 (I think that might be an issue with rebar3 in elixir master).

Environment

  • Elixir & Erlang versions (elixir --version):
    • Erlang/OTP 24 [RELEASE CANDIDATE 1] [erts-12.0] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit] [dtrace]
    • Elixir 1.12.0-dev (compiled with Erlang/OTP 24)
  • Operating system:
    • macOS Big Sur Version 11.2.1
  • Editor or IDE name (e.g. Emacs/VSCode):
    • VSCode
  • Editor Plugin/LSP Client name:
    • ElixirLS

Logs

Started ElixirLS v0.6.5
Elixir version: "1.12.0-dev (compiled with Erlang/OTP 24)"
Erlang version: "24"
ElixirLS compiled with Elixir 1.8.2 and erlang 21
MIX_ENV: test
MIX_TARGET: 
[Info  - 3:56:36 PM] Compile took 1053 milliseconds
[Info  - 3:56:36 PM] [ElixirLS WorkspaceSymbols] Indexing...
[Info  - 3:56:36 PM] [ElixirLS Dialyzer] Checking for stale beam files
[Info  - 3:56:36 PM] [ElixirLS WorkspaceSymbols] Module discovery complete

15:56:37.234 [error] Task #PID<0.349.0> started from #PID<0.315.0> terminating
** (ArithmeticError) bad argument in arithmetic expression
    (language_server 0.6.5) lib/language_server/providers/workspace_symbols.ex:519: ElixirLS.LanguageServer.Providers.WorkspaceSymbols.build_range/1
    (language_server 0.6.5) lib/language_server/providers/workspace_symbols.ex:487: ElixirLS.LanguageServer.Providers.WorkspaceSymbols.build_result/4
    (language_server 0.6.5) lib/language_server/providers/workspace_symbols.ex:397: anonymous fn/4 in ElixirLS.LanguageServer.Providers.WorkspaceSymbols.index/1
    (elixir 1.12.0-dev) lib/enum.ex:2352: Enum."-reduce/3-lists^foldl/2-0-"/3
    (language_server 0.6.5) lib/language_server/providers/workspace_symbols.ex:386: anonymous fn/1 in ElixirLS.LanguageServer.Providers.WorkspaceSymbols.index/1
    (elixir 1.12.0-dev) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
    (elixir 1.12.0-dev) lib/task/supervised.ex:35: Task.Supervised.reply/5
    (stdlib 3.15) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Function: #Function<32.766573/0 in ElixirLS.LanguageServer.Providers.WorkspaceSymbols.do_process_chunked/2>
    Args: []

15:56:36.909 [error] Task #PID<0.347.0> started from #PID<0.315.0> terminating
** (ArithmeticError) bad argument in arithmetic expression
    (language_server 0.6.5) lib/language_server/providers/workspace_symbols.ex:519: ElixirLS.LanguageServer.Providers.WorkspaceSymbols.build_range/1
    (language_server 0.6.5) lib/language_server/providers/workspace_symbols.ex:487: ElixirLS.LanguageServer.Providers.WorkspaceSymbols.build_result/4
    (language_server 0.6.5) lib/language_server/providers/workspace_symbols.ex:397: anonymous fn/4 in ElixirLS.LanguageServer.Providers.WorkspaceSymbols.index/1
    (elixir 1.12.0-dev) lib/enum.ex:2352: Enum."-reduce/3-lists^foldl/2-0-"/3
    (language_server 0.6.5) lib/language_server/providers/workspace_symbols.ex:386: anonymous fn/1 in ElixirLS.LanguageServer.Providers.WorkspaceSymbols.index/1
    (elixir 1.12.0-dev) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
    (elixir 1.12.0-dev) lib/task/supervised.ex:35: Task.Supervised.reply/5
    (stdlib 3.15) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Function: #Function<32.766573/0 in ElixirLS.LanguageServer.Providers.WorkspaceSymbols.do_process_chunked/2>
    Args: []
@lukaszsamson
Copy link
Collaborator

Non stable elixir and OTP versions are not supported but we will appreciate a PR fixing that.

@tcrossland
Copy link
Contributor Author

tcrossland commented Mar 3, 2021

Understood, I wasn't requesting support, just registering the issue in readiness for OTP 24 (rc1 was released last week).

Will put together a PR if I manage to figure out how to fix it.

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

No branches or pull requests

2 participants