paulanthonywilson

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?

First Post!

D4no0

D4no0

Here is the place in code where this error is raised: otp/lib/dialyzer/src/dialyzer_cplt.erl at 53ffb6a1363180ec67c36e3baa9745ee73e7b5a3 · erlang/otp · GitHub

I cannot figure out though what the code tries to accomplish, it seems there is some kind of file tracking involved.

Does this happen after invalidating the cache?

Most Liked

paulanthonywilson

paulanthonywilson

I did link to that in my question :wink:

I am about to invalidate the cache. It definitely doesn not happen locally.

[edit s/no/not/]

D4no0

D4no0

Did invalidating of cache help?

paulanthonywilson

paulanthonywilson

Yes, thanks. Building and caching a new plt worked.

Last Post!

paulanthonywilson

paulanthonywilson

Sorry, I was kidding. Good look with wading through the job swamp!

We were also not pinning the exact erlang version and seem to have just hit the issue again when an updated image was used from Docker. It’s good to have an explanation.

Where Next?

Popular in Questions Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement