paulanthonywilson
Dialyzer error: Old PLT file
I’m working with a team that are running (relatively) old versions of Elixir and Erlang. Last month I added dialyzer, via dialyxir (can never spell that) to their build. Today we are running into an issue:
:dialyzer.run error: Old PLT file /apps/[redacted]/priv/plts/application.plt
The build is on Azure. The PLTs are cached using Azure Pipeline caching (here if you want to know but I wouldn’t if I could avoid it).
Dialyxir config is
defp dialyzer do
[
plt_add_apps: [:mix, :ex_insights],
plt_file: {:no_warn, "priv/plts/application.plt"},
ignore_warnings: "dialyzer.ignore_warnings"
]
end
The plts are excluded from source control.
Versions:
elixir 1.14.2-otp-25
erlang 25.3.2.6
I know I can fix the issue by invalidating the cache but I would like to understand how it happened in the first place. The only thing I’ve been able to find is this somewhat cryptic Erlang mailing list q&a. Old PLT file? .
The checking is going on here which looks like there is some discrepancy between an internally held hash in the PLT and the file contents.
Thoughts?
Most Liked
paulanthonywilson
I did link to that in my question ![]()
I am about to invalidate the cache. It definitely doesn not happen locally.
[edit s/no/not/]
D4no0
Did invalidating of cache help?
paulanthonywilson
Yes, thanks. Building and caching a new plt worked.
RobertoSchneiders
We have the same issue in a project using Elixir 1.18.3 and GitHub Actions. It has been happening for quite a while now. It seems completely random. Once this error appears, I have to clear the cache to fix it.
This is how I’m saving the PLT cache, I’m wondering if there is something else that should be considered for the cache key.
- name: Save PLT cache
id: plt_cache_save
uses: actions/cache/save@v4
if: steps.plt_cache.outputs.cache-hit != 'true'
with:
key: |
plt-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
path: |
priv/plts
D4no0
If you are paying for the service, which a lot of companies that depend on github do, a difference between a pipeline running 2 minutes and 4 minutes becomes a valid concern.







