1

I have an erlang application with sub-applications in apps/ and dependencies in deps/. Running dialyzer on one of the sub-apps, e.g.:

$ dialyzer -r apps/app1/src --src

works, but lists as "unknown functions" various functions from applications in deps.

So, should I add the deps applications to the plt, or should I trust their authors to have done their own testing?

I can think of reasonable arguments for either:

  • might find downstream bugs;
  • will clog up clearing up my own code.
Ivan Uemlianin
  • 953
  • 7
  • 21

1 Answers1

2

Adding the dependencies to the plt gives dialyzer information about the dependencies.

It won't add anything wrong about the dependencies.

Alternatively you could pass your app with all dependencies to dialyzer, but this would repeatedly re-check the deps without any additional gain.

Peer Stritzinger
  • 8,232
  • 2
  • 30
  • 43
  • Thanks. It seems to me: if I don't add the dependencies, dialyzer will give me "unknown function" warnings; If I do add the dependencies, I might get type warnings and errors I don't want to deal with. The former seems more sensible, but I wonder if it's bad practice or anti-social. – Ivan Uemlianin Jul 15 '13 at 07:56
  • You don't get the warnings and errors about the code that's in the PLT when you use it. The warnings resulting are only about your code using the dependencies wrong – Peer Stritzinger Jul 16 '13 at 07:39
  • Thanks, I understand now. That's the answer then: I should add the dependencies to the PLT. – Ivan Uemlianin Jul 17 '13 at 08:50
  • how do you do this? – Tommy Apr 04 '17 at 20:22