Running dialyzer on an application: should I add the dependencies to the PLT?

StackOverflow https://stackoverflow.com/questions/17565820

  •  02-06-2022
  •  | 
  •  

Вопрос

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.
Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top