jeremyjh / dialyxir

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

`mix dialyzer` reports dependency missing #511

Closed alappe closed 10 months ago

alappe commented 1 year ago

Environment

Current behavior

mix dialyzer in this project prints

DEPENDENCY MISSING
------------------------
If you are reading this message, then Elixir and Erlang are installed but the
Erlang Dialyzer is not available. Probably this is because you installed Erlang
with your OS package manager and the Dialyzer package is separate.

On Debian/Ubuntu:

  `apt-get install erlang-dialyzer`

Fedora:

   `yum install erlang-dialyzer`

Arch and Homebrew include Dialyzer in their base erlang packages. Please report a Github
issue to add or correct distribution-specific information.

but using e.g.

$ iex -S mix
Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

Interactive Elixir (1.15.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Code.ensure_loaded?(:dialyzer)
true
iex(2)>

The elixir/erlang is installed on macOS via asdf, .tool-versions:

elixir 1.15.1
erlang 26.0.2

It's an umbrella project and I run it in the umbrella itself.

Expected behavior

After I upgraded dialyxir, elixir and erlang I expected it to work the same as before.

danschultzer commented 1 year ago

Elixir 1.15.4 resolved this for us.

Scratch that, I'm still getting the issue. It works if you let it compile everything again by removing _build directory. I suspect this is an issue in Elixir 1.15 with the new code path pruning rather than dialixir/dialyzer.

alappe commented 1 year ago

Alright, thank you for the feedback.

jeremyjh commented 10 months ago

Fix published in 1.4: https://hex.pm/packages/dialyxir/1.4.0