Open tothlac opened 1 year ago
We were trying to make it work using the following project.json :
{
"apps": [
{
"name": "asdfqqqq",
"dir": "/home/joe/Projects/asdfqqqq",
"ebin": "/home/joe/Projects/asdfqqqq/_build/dev/lib/asdfqqqq/ebin",
"extra_src_dirs": ["test"],
"include_dirs": ["include"],
"macros": ["TEST"],
"src_dirs": ["erlangized_src/"]
}
],
"deps": [
{
"name": "elixir",
"dir": "/home/joe/.manager/elixir",
"ebin": "/home/joe/.managerl/erlang-OTP-23.2.3/elixirs/elixir-v1.12.2/lib/elixir/lib/elixir/ebin",
"extra_src_dirs": [],
"include_dirs": [],
"macros": [],
"src_dirs": ["lib"]
}
],
"source_root": "/home/joe/Projects/asdfqqqq",
"otp_lib_dir": "/home/joe/.managerl/erlang-OTP-23.2.3/lib/"
}
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?
Contributions are welcome.
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 ?