internal error in lint_module

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

internal error in lint_module

Andreas Stenius-2
Hi,

When compiling attached file, I get an internal error from the lint_module when using 19.0 (built from source, using kerl).

Compiling the same file using OTP 17.3 and 18.0 works fine.

$ ~/lib/erl/17.3/bin/erlc -v -Werror +debug_info +warn_export_vars +warn_shadow_vars +warn_obsolete_guard  -o ebin/ -pa ebin/ -I include/ src/ecapnp.erl

$ ~/lib/erl/17.3/bin/erlc -v -Werror +debug_info +warn_export_vars +warn_shadow_vars +warn_obsolete_guard  -o ebin/ -pa ebin/ -I include/ src/c++_capnp.erl 

$ ~/lib/erl/18.0/bin/erlc -v -Werror +debug_info +warn_export_vars +warn_shadow_vars +warn_obsolete_guard  -o ebin/ -pa ebin/ -I include/ src/c++_capnp.erl 

$ ~/lib/erl/19.0/bin/erlc -v -Werror +debug_info +warn_export_vars +warn_shadow_vars +warn_obsolete_guard  -o ebin/ -pa ebin/ -I include/ src/c++_capnp.erl 

src/c++_capnp.erl: internal error in lint_module;

crash reason: badarg


  in function  erl_eval:line/1 (erl_eval.erl, line 1327)

  in call from erl_eval:partial_eval/1 (erl_eval.erl, line 1297)

  in call from erl_lint:check_type/3 (erl_lint.erl, line 2840)

  in call from lists:foldl/3 (lists.erl, line 1263)

  in call from erl_lint:check_type/2 (erl_lint.erl, line 2728)

  in call from lists:foldl/3 (lists.erl, line 1263)

  in call from erl_lint:forms/2 (erl_lint.erl, line 658)

  in call from erl_lint:module/3 (erl_lint.erl, line 506)


Cheers,
Andreas


_______________________________________________
erlang-bugs mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-bugs

c++_capnp.erl (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: internal error in lint_module

Kostis Sagonas-2
On 08/17/2016 10:31 PM, Andreas Stenius wrote:
> Hi,
>
> When compiling attached file, I get an internal error from the
> lint_module when using 19.0 (built from source, using kerl).
>

Wild guess:

Most likely this is due to the internal representation of typed records
which has changed in 19.0.  Looks like you generated this file with some
older Erlang release and now you are trying to compile it with the 19.0
compiler and the linter does not like this.  If you generate the file
with a 19.x release, then most likely its subsequent compilation will work.

Hope it helps,

Kostis
_______________________________________________
erlang-bugs mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-bugs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: internal error in lint_module

Andreas Stenius-2
Thanks Kostis, you were absolutely right.
The records looks much cleaner now, too btw ;)

//Andreas

On Wed, Aug 17, 2016 at 11:21 PM Kostis Sagonas <[hidden email]> wrote:
On 08/17/2016 10:31 PM, Andreas Stenius wrote:
> Hi,
>
> When compiling attached file, I get an internal error from the
> lint_module when using 19.0 (built from source, using kerl).
>

Wild guess:

Most likely this is due to the internal representation of typed records
which has changed in 19.0.  Looks like you generated this file with some
older Erlang release and now you are trying to compile it with the 19.0
compiler and the linter does not like this.  If you generate the file
with a 19.x release, then most likely its subsequent compilation will work.

Hope it helps,

Kostis

_______________________________________________
erlang-bugs mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-bugs
Loading...