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
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
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 have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Hello,
I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter).
The diffic...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
I think I’ve found a small improvement I could contribute to <%= web_namespace %>.CoreComponents (installer/templates/phx_web/compo...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
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
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #phoenix_html
- #elixirconf-us
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
NobbZ
Check your OTP version and the version of elixir, especially which OTP version was used to compile it.
Both OTP versions need to be either greater than or equal to 21 or lesser than that. It’s not allowed to have one at 21 and one at 20.
My guess is that you have installed a current OTP and also are using a precompiled elixir version. Those are compiled with OTP 19 as far as I remember.
Fl4m3Ph03n1x
This is the result of
asdf current:Questions:
$MIX_HOMEenv variable set?Checking the docs on dialyxir I found this:
NobbZ
Please open up iex and check the banner for the very exact version of elixir. Usually it tells you something like “compiled with”.
Fl4m3Ph03n1x
Like this?
I have updated the original post with more information about the error. I am sure the PLT tables are not being built correctly, but at this point I have no idea on how to fix it.
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.
Fl4m3Ph03n1x
Thanks for popping in!
After a long time of waiting, it finally finished, but now I have the following warnings/errors:
Am I missing some config flag?
I am using the
{:dialyxir, "~> 1.0.0-rc.4", only: [:dev], runtime: false}, perhaps it is not stable enough?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.
Fl4m3Ph03n1x
@NobbZ Thanks for the input, I have now created issues in the project’s page.
Once ( if ) the issue gets resolved, I will updated this discussion so future readers can also benefit from my findings or in case someone goes through the same.
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).
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.