Search code examples
erlangdialyzerparse-transform

How to use dialyzer with parse transform modules


I'm trying to use dialyzer on my erlang application but here's the output :

dialyzer \
        --src -r src \
        -pa /home/niahoo/src/popos \
        -pa /home/niahoo/src/popos/deps/parse_trans \
        --verbose
  Checking whether the PLT c:/MinGW/msys/1.0/home/niahoo/.dialyzer_plt is up-to-date... yes
  Proceeding with analysis...
dialyzer: Analysis failed with error:
Could not scan the following file(s): [{"c:/MinGW/msys/1.0/home/niahoo/src/popos/src/tools/r.erl",
                                        ["c:/MinGW/msys/1.0/home/niahoo/src/popos/src/tools/r.erl:none: undefined parse transform 'exprecs'\n"]},
                                       {"c:/MinGW/msys/1.0/home/niahoo/src/popos/src/game/party2.erl",
                                        ["c:/MinGW/msys/1.0/home/niahoo/src/popos/src/game/party2.erl:none: undefined parse transform 'playerdupli'\n"]}]
Last messages in the log cache:
  Reading files and computing callgraph... 

I tried to put playerdupli.erl in the same directory as party2.erl, but the output is the same. exprecs.erl is in the deps: deps/parse_trans/src.

The code compiles and runs without error, including parse_transform stuff. I'm on MinGW (Windows 8 64). Any idea ?

Thanks


Solution

  • An alternative that is always easier, is to compile with +debug_info and let dialyzer analyze the resulting .beam files.