You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We wanted to try eqwalizer on our elixir projects. I know it would be a lot better to implement a parser for Elixir projects, but as a first step we decompiled the beam files to erlang sources, and
we were running eqwalizer on those sources.
We have found some problems:
in the decompiled source there is a -file attribute:
this last function clause will cause this problem:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Utf8Error { valid_up_to: 429, error_len: Some(1) }', crates/elp/src/bin/[reporting.rs:101](http://reporting.rs:101/):78
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
actually, when I manually fix these problems eqwalizer works quite well, and it is able to spot the problems in the code (of course the line numbers are wrong). One remaining problem is that I could not figure out how to tell to eqwalizer where the declarations of Elixir types are. So for instance:
Elixir.String type is declared in $ELIXIR_DIR//lib/elixir/lib/string.ex. Similarly, I want to add all files where elixir types are declared. How can I add those using project.json?
I have one more question...
Let's say I have my_app application, which uses my_lib as a dependency. In my_app.erl I have the following:
Elixir.String.t() type is declared in the above-mentioned folder. With these settings, it still was not able to find the declaration of this type. Is it possible that to find the declaration eqwalizer also needs the erlang source code present in the src directory, or do you have any other ideas on what's going on wrong?
We wanted to try eqwalizer on our elixir projects. I know it would be a lot better to implement a parser for Elixir projects, but as a first step we decompiled the beam files to erlang sources, and
we were running eqwalizer on those sources.
We have found some problems:
-file
attribute:When this attribute is there eqwalizer simply ignores all problems. If I manually delete this line, it works.
this last function clause will cause this problem:
Elixir.String type is declared in
$ELIXIR_DIR//lib/elixir/lib/string.ex
. Similarly, I want to add all files where elixir types are declared. How can I add those using project.json?I have one more question...
Let's say I have my_app application, which uses my_lib as a dependency. In my_app.erl I have the following:
I've tried it with this project.json:
elp is still complaining about being not able to find the include file:
Do you have an idea what should I put into my project.json ?
The text was updated successfully, but these errors were encountered: