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