jeremyjh / dialyxir

Mix tasks to simplify use of Dialyzer in Elixir projects.
Apache License 2.0
1.69k stars 141 forks source link

Update PLT if dependency has changed #409

Open velimir opened 4 years ago

velimir commented 4 years ago

Current behavior

dialyxir checks that the old built plt contains the updated information about depencencies based on the hash of the lock and remove/add files that are not in the plt if necessary. If one of the depencies were changes, though the list of the files remain the same, plt for the changed files won't be rebuilt.

Expected behavior

dialyxir tracks version/hashsum of the depenencies that plt was built with and updates the plt if beam has changed.

jeremyjh commented 4 years ago

Sorry can you elaborate on this? How does a dependency change without changing the lock file? Is it a local dependency?

velimir commented 3 years ago

The root of this issue was an attempt to make a single project re-use dependency PLTs.

You are absolutely right, if a dependency is changed, the lock (and the hash of it) is changed as well, which triggers PLT re-build for all dependencies. If the PLT hash were implemeted on per dependency (or a file) level, it would allow to speed up the process rebuilding PLT only for dependencies/files that were changed.