Search code examples
erlangdialyzer

Can I tell Dialyzer to ignore some modules?


I'm building a PLT using

dialyzer  --output_plt lib.plt --build_plt --apps stdlib kernel mnesia ssl public_key crypto erts asn1 inets sasl odbc

It spits out some errors about unknown functions in modules I don't care about. For example:

  Compiling some key modules to native code... done in 1m10.81s
  Creating PLT lib.plt ...
Unknown functions:
  compile:file/2
  compile:forms/2
  compile:noenv_forms/2

Can I tell dialyzer to ignore these? Should I actually care about them?


Solution

  • As a follow-up to this question, I've been using rebar3 and its rebar3 dialyzer command does the right thing as far as I'm concerned. (That is, it shows all the warnings that are caused by my code and does not show warnings that are not caused by my code.) I think it works by building a PLT for system modules and then using that as an input when running dialyzer against the project.