Fl4m3Ph03n1x
Background
I am trying dialyxir to find out if it is worth it, however I have a bunch of errors on the compile phase and I want to fix them.
What did you do?
Created a pet project to try out dialyzer with dialyxir.
mix new dialzyer_projectcd dialyzer_project- Install
dialyxirglobally - Added the dialyxir dependency
mix dialyzer
After this, I see a ton of red messages on my screen:
Finding suitable PLTs
Checking PLT...
[:compiler, :elixir, :kernel, :logger, :stdlib]
Looking up modules in dialyxir_erlang-21.1_elixir-1.7.3_deps-dev.plt
Looking up modules in dialyxir_erlang-21.1_elixir-1.7.3.plt
Finding applications for dialyxir_erlang-21.1_elixir-1.7.3.plt
Finding modules for dialyxir_erlang-21.1_elixir-1.7.3.plt
Checking 185 modules in dialyxir_erlang-21.1_elixir-1.7.3.plt
Adding 230 modules to dialyxir_erlang-21.1_elixir-1.7.3.plt
:dialyzer.run error: Analysis failed with error:
Could not scan the following file(s):
Could not get Core Erlang code for: /home/fl4m3/.asdf/installs/elixir/1.7.3/lib/elixir/ebin/elixir_tokenizer.beam
Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/fl4m3/.asdf/installs/elixir/1.7.3/lib/elixir/ebin/elixir_parser.beam
Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/fl4m3/.asdf/installs/elixir/1.7.3/lib/elixir/ebin/elixir_utils.beam
...
Seems that every possible Erlang package has this issue.
But astonishingly enough, the command still analyses the project and still shows errors. I have installed erlang and elixir using asdf.
Question
How can I fix the compile errors?
Trending in Questions
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
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
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
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
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
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
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
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
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
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
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
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Marked As Solved- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Fl4m3Ph03n1x
Fixed the issue. Turns out I had a lingering version of dialyxir isntalled globally with asdf
elixir 1.7.3-otp-21. I had to go to~/.asdf/installs/elixir/1.7.3-otp-21/.mix/archivesand manually delete the dialyxir folder.Once I did that, everything worked out perfectly. So as a cautionary tale of advise for future readers, never install dialyxr locally and globally.
If you have dialyxir installed globally, make sure none of your projects has a local reference to it, or you will be in for a world of pain.
Special thanks to @NobbZ for helping out with the Git issue.
Also Liked
jeremyjh
You need to
asdf local elixir 1.7.3-otp-21.That will get you the Elixir that is precompiled with the correct version of OTP.
NobbZ
Please try again with master, if the error remains please file a bug report at Issues · jeremyjh/dialyxir · GitHub and use one of the older RCs until the issue has been resolved and a new release (candidate) is available.
slashdotdash
Thanks for the tip @jeremyjh.
I’ve been struggling with Dialyzer usage and didn’t realise it was because I needed to install the appropriate Elixir/OTP version when using asdf (as below).
Last Post!
NobbZ
Well, except for very few exceptions, do not use
mix archive.installat all.This is why I also PR’d and removed global installation instructions from the README.