ppraisethesun

ppraisethesun

For some reason dialyzer task in elixir-ls keeps crashing.

Macbook pro 13 m1 
Big Sur 11.2.2 (20D80)
VSCode      - February 2021 (version 1.54)
ElixirLS    - 0.6.5
elixir      - 1.11.3 (compiled with Erlang/OTP 23 from sources - ref:d30c5c0185607f08797441ab8af12636ad8dbd7e)
erlang      - 23.2.7
asdf        - v0.8.0-c6145d0
13:05:20.785 [error] Task #PID<0.122.0> started from #PID<0.121.0> terminating
** (stop) {:nocatch, {:dialyzer_error, 'Analysis failed with error:\nCould not scan the following file(s):\n  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.13.2/ebin/zip.beam\n  Recompile with +debug_info or analyze starting from source code  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.13.2/ebin/win32reg.beam\n  Recompile with +debug_info or analyze starting from source code  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.13.2/ebin/uri_string.beam\n  Recompile with +debug_info or analyze starting from source code  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.13.2/ebin/unicode_util.beam\n  Recompile with +debug_info or analyze starting from source code  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.13.2/ebin/unicode.beam\n  Recompile with +debug_info or analyze starting from source code  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.13.2/ebin/timer.beam\n  Recompile with +debug_info or analyze starting from source code  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.13.2/ebin/sys.beam\n  Recompile with +debug_info or analyze starting from source code  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.13.2/ebin/supervisor_bridge.beam\n  Recompile with +debug_info or analyze starting from source code  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.13.2/ebin/supervisor.beam\n  Recompile with +debug_info or analyze starting from source code  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.13.2/ebin/sofs.beam\n  Recompile with +debug_info or analyze starting from source code  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.13.2/ebin/string.beam\n  Recompile with +debug_info or analyze starting from source code  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.13.2/ebin/slave.beam\n  Recompile with +debug_info or analyze starting from source code  Could not get Core Erlang code for: /Users/roman/.asdf/installs/elixir/ref-d30c5c0185607f08797441ab8af12636ad8dbd7e/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validate' ++ ...}}
    (dialyzer 4.3) dialyzer_cl.erl:699: :dialyzer_cl.cl_error/2
    (dialyzer 4.3) dialyzer_cl.erl:401: :dialyzer_cl.do_analysis/4
    (dialyzer 4.3) dialyzer.erl:160: :dialyzer.run/1
    (language_server 0.6.5) lib/language_server/dialyzer/manifest.ex:146: ElixirLS.LanguageServer.Dialyzer.Manifest.build_elixir_plt/0
    (language_server 0.6.5) lib/language_server/dialyzer/manifest.ex:14: anonymous fn/1 in ElixirLS.LanguageServer.Dialyzer.Manifest.build_new_manifest/0
    (elixir 1.11.3) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
    (stdlib 3.14) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Function: #Function<2.129723316/0 in ElixirLS.LanguageServer.Dialyzer.Manifest.build_new_manifest/0>
    Args: []

Deleting _build, deps, .elixir_ls directories did not help.
I tried compiling elixir with different erlang versions down to 23.0, but it did not seem to help.
If I run dialyzer manually it succeeds both in dev and test environments.
Switching to precompiled elixir 1.11.3 helps, but I lose the ability to go to the sources.

Does anyone else have this problem?

Showing Posts 1 to 7

heathen

heathen

Yes, I have the same problem

NobbZ

NobbZ

The Erlang, was it built from sources or a prebuilt binary?

heathen

heathen

In my case both Erlang and Elixir were built from sources (Erlang 24.0-rc1, Elixir v1.11.4) with asdf

heathen

heathen

Seems that I finally got it working: it works with Erlang 24.0-rc1 (installed via asdf install but effectively built from sources), Elixir 1.11.4-OTP-23 (asdf install precompiled) and vscode-elixir-ls rebuilt from sources. I also changed elixir-ls language server dialyxir dependency from “~> 1.0.0” to “~> 1.1.0” (elixir-ls/apps/language_server/mix.exs).

Started ElixirLS v0.6.5
Elixir version: "1.11.4 (compiled with Erlang/OTP 23)"
Erlang version: "24"
ElixirLS compiled with Elixir 1.11.4 and erlang 24
 ~/P/v/elixir-ls > elixir -v                                                                                                  
Erlang/OTP 24 [RELEASE CANDIDATE 1] [erts-12.0] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit]

Elixir 1.11.4 (compiled with Erlang/OTP 23)
 ~/P/v/elixir-ls >
jsm

jsm

Could you maybe elaborate on that last point for a bit? How exactly did you change the dialyxir dependency for the extension? The extension comes prebuilt for VS Code, right? Or did you compile the extension locally as well?

heathen

heathen

Yes, I’ve compiled the extension locally and then installed it to the VS Code as mentioned here. But please note that ElixirLS will not work with any projects require OTP version lower than you’ve used for elixir-ls compilation so if you compile it with OTP-24 it will give errors for OTP-23 projects (at least it does for me).

jsm

jsm

This issue seems to be related to temporary files created when building elixir from source. I’ve made a PR for asdf’s elixir plugin to fix this issue for elixir versions installed from source using asdf: Install from-sources elixir with `make DESTDIR=... install` by juulSme · Pull Request #99 · asdf-vm/asdf-elixir · GitHub.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews