[erlang-questions] Report: sheriff + dialyzer = hard time for "parse_transform"

Loïc Hoguin <>
Thu Aug 16 00:54:04 CEST 2012


On 08/16/2012 12:31 AM, Zabrane Mickael wrote:
> Hi Loïc,
> I'm evaluating Sheriff for our team.
> Under R15B01 (OSX/Linux):
> $ git clone https://github.com/extend/sheriff.git
> $ cd sheriff
> $ make
> ==> edown (compile)
> ==> parse_trans (compile)
> ==> sheriff (compile)
> Now:
> $ make build-plt (takes few minutes)
> $ make dialyze
> Checking whether the PLT .sheriff_dialyzer.plt is up-to-date... yes
>    Proceeding with analysis...
> dialyzer: Analysis failed with error:
> Could not scan the following file(s): [{"/home/zab/sheriff/src/sheriff.erl",
>                                          ["/home/zab/sheriff/src/sheriff.erl:none: error in parse transform 'parse_trans_codegen': {undef,\n                                                 [{parse_trans_codegen,\n                                                   parse_transform,\n                                                   [[{attribute,1,file,\n                                                      {\"/home/zab/sheriff/src/sheriff.erl\",\n                                                       1}},\n                                                     {attribute,21,module,\n                                                      sheriff},\n                                                     {attribute,24,export,\n                                                      [{check,2},\n                                                       {parse_transform,2},\n                                                       {build_type,3}]},\n                                                   
  {attribute,39,spec,\n                                                      {{check,2},\n                                                       [{type,39,'fun',\n                                                         [{type,39,product,\n                                                           [{type,39,any,[]},\n
> [...]
> Any fix?

Don't think I ever tried to dialyze it, tests were good enough for that 
purpose. This sounds like a parse_trans error, but why would it only 
occur on dialyzing? Regardless dialyzer would work fine if operating on 
compiled files with debug enabled.

This has no effect on the actual usefulness of sheriff anyway.

Loïc Hoguin
Erlang Cowboy
Nine Nines

More information about the erlang-questions mailing list