-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dialyzer blames Erlang header instead of LFE code #494
Comments
For reference we found the problem on these versions: We upgraded to rebar 3.23.0 and rebar_lfe 0.4.10 to see if that affected anything. It did not. We looked into upgrading to lfe 2.1.4, but it breaks our build. |
Why/how does going to lfe 2.1.4 break your build? There is very little that happened between 2.1.3 and 2.14: a small change in the Makefile c97a44f |
So, we were bringing in 2.1.2 via the shortcut in
But with 2.1.4, it causes an error when we upgrade:
So, we do it the long way:
We can then unlock & upgrade successfully, but when we try to build our project:
The resulting Error: {case_clause,
{error,
{function_clause,
[{lfe_types,to_func_spec,
[[[[],[binary]]],11],
[{file,
"/home/dend/defun/llbeam/_build/default/lib/lfe/src/lfe_types.erl"},
{line,340}]},
{lists,map,2,[{file,"lists.erl"},{line,1559}]},
{lfe_codegen,comp_function_spec,3,
[{file,
"/home/dend/defun/llbeam/_build/default/lib/lfe/src/lfe_codegen.erl"},
{line,406}]},
{lists,flatmap_1,2,[{file,"lists.erl"},{line,1579}]},
{lists,flatmap_1,2,[{file,"lists.erl"},{line,1579}]},
{lfe_codegen,compile_attributes,1,
[{file,
"/home/dend/defun/llbeam/_build/default/lib/lfe/src/lfe_codegen.erl"},
{line,318}]},
{lfe_codegen,compile_module,2,
[{file,
"/home/dend/defun/llbeam/_build/default/lib/lfe/src/lfe_codegen.erl"},
{line,90}]},
{lfe_codegen,module,2,
[{file,
"/home/dend/defun/llbeam/_build/default/lib/lfe/src/lfe_codegen.erl"},
{line,75}]}]}}}
[{rebar3_lfe_prv_compile,compile_file,3,
[{file,"/home/dend/defun/llbeam/_build/default/plugins/rebar3_lfe/src/rebar3_lfe_prv_compile.erl"},
{line,103}]},
{rebar_base_compiler,compile_each,3,
[{file,"/home/runner/work/rebar3/rebar3/apps/rebar/src/rebar_base_compiler.erl"},
{line,211}]},
{rebar3_lfe_prv_compile,'-compile_app/2-lc$^0/1-0-',4,
[{file,"/home/dend/defun/llbeam/_build/default/plugins/rebar3_lfe/src/rebar3_lfe_prv_compile.erl"},
{line,84}]},
{rebar3_lfe_prv_compile,compile_app,2,
[{file,"/home/dend/defun/llbeam/_build/default/plugins/rebar3_lfe/src/rebar3_lfe_prv_compile.erl"},
{line,84}]},
{rebar3_lfe_prv_compile,'-compile/1-lc$^0/1-0-',2,
[{file,"/home/dend/defun/llbeam/_build/default/plugins/rebar3_lfe/src/rebar3_lfe_prv_compile.erl"},
{line,54}]},
{rebar3_lfe_prv_compile,compile,1,
[{file,"/home/dend/defun/llbeam/_build/default/plugins/rebar3_lfe/src/rebar3_lfe_prv_compile.erl"},
{line,54}]},
{rebar_core,do,2,
[{file,"/home/runner/work/rebar3/rebar3/apps/rebar/src/rebar_core.erl"},
{line,155}]},
{rebar_prv_do,do_task,5,
[{file,"/home/runner/work/rebar3/rebar3/apps/rebar/src/rebar_prv_do.erl"},
{line,87}]}] And here is the info from
|
Hello. There seems to be a strange issue when running
rebar3 dialyzer
on LFE modules that include an Erlang header file. A warning in the LFE code is flagged as occurring in the Erlang header file.Take, for example, a project with this source file
pets.lfe
:The
dog
record is defined ininclude/dog.lfe
:(defrecord dog (name 'fido))
The
cat
record ininclude/cat.hrl
:Running dialyzer detects that we never call
(kitty)
from theflet
, but dialyzer reports the issue incat.hrl
.I put this example together for this issue, but we have seen the problem a number of times in our larger project. I hope it isn't too obscure, and I appreciate your looking
into it when you get a chance.
The text was updated successfully, but these errors were encountered: