문제

Can you copy and use a Dialyzer PLT output to another machine of different architecture? For example, I've built a PLT file on an x86_64 Linux machine. Can I use the file on an x86 FreeBSD or a Windows machine?

도움이 되었습니까?

해결책

considering that dialyzer plt file is in binary form there could be some problems in regards of binary size of some elements in 32/64 bit and maybe metadata about the erlang release which may not be portable between even release and release.

BTW, dialyzer plt file takes less than half an hour to compile and can be edited after that by command line, so why moving the file instead of just simply recreate it (which has also the advantage to always have the dialyzer file for that specific release and architecture)?

다른 팁

It is possible to copy Dialyzer's PLT, but you need two preconditions for all files included in the PLT on both machines:

  1. Same absolute paths: Dialyzer stores the absolute path for every file in the PLT. It is therefore necessary for that to be identical, in order to find the actual files on each machine.
  2. Same versions: For each .beam file included, the PLT stores an MD5 checksum of the relevant source code (embedded within the beam file due to debug_info being enabled). If as little as a single line is changed, the MD5 will differ and Dialyzer will assume the file to be changed and recalculate the information stored in the PLT.

@andrewtj on Twitter kindly told me a quote from Kostis Sagonas. Kostis writes that the copying of PLT file is possible, provided that the two machines have to have identical configurations. (I think having an identical configuration is not easy though...)

https://twitter.com/#!/andrewtj/status/94752252941709312

http://groups.google.com/group/erlang-programming/msg/c34baf501eee56c7

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top