[erlang-questions] Can't run my command line Erlang program
Kostis Sagonas
kostis@REDACTED
Sat Nov 16 12:26:26 CET 2013
On 11/15/2013 10:34 PM, Andrew Pennebaker wrote:
> Thanks, I might do that!
>
> ...so there's no way to tell dialyzer to just automatically add stdlibs
> to plt?
Dialyzer is agnostic of what stdlib is, whether it contains a module
named string or not, or for that matter whether you want to use the
string module from stdlib or some other module named string in your
application. So you need to tell it what applications to cache in your
.dialyzer_plt when you build it for the first time.
By the way, the sequence of commands you use below is not the one that I
would use. Instead, I would first build a minimal PLT once:
dialyzer --build_plt --apps erts kernel stdlib
and then use this PLT to analyze the modules of my application:
erlc -Wall +debug_info *.erl
dialyzer *.beam
You do not need to add your application's modules to the PLT to analyze
them. If at some point you discover that you need more stuff from the
OTP libraries to analyze your application (e.g. the 'random' module),
you can add them incrementally by a command of the form:
dialyzer --add_to_plt --apps crypto
Hope it helps,
Kostis
> On Fri, Nov 15, 2013 at 2:52 AM, Anthony Molinaro
> <anthonym@REDACTED <mailto:anthonym@REDACTED>> wrote:
>
> You can add them to your .plt with something like
>
> # dialyzer --add_to_plt --apps crypto stdlib proper ...
>
> Which should get rid of the warnings.
>
> -Anthony
>
>
> On Nov 14, 2013, at 8:03 PM, Andrew Pennebaker
> <andrew.pennebaker@REDACTED <mailto:andrew.pennebaker@REDACTED>>
> wrote:
>
>> Is there a way to clear the "unknown functions" from dialyzer
>> output? They tend to distract from any warnings I'm trying to find.
>>
>> $ make lint
>> erlc -Wall +debug_info ios7crypt.erl
>> dialyzer *.beam --build_plt --quiet
>> dialyzer *.beam
More information about the erlang-questions
mailing list