Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mix dialyzer reports dependency missing #511

Closed
alappe opened this issue Jul 12, 2023 · 3 comments · Fixed by #512
Closed

mix dialyzer reports dependency missing #511

alappe opened this issue Jul 12, 2023 · 3 comments · Fixed by #512

Comments

@alappe
Copy link
Contributor

alappe commented Jul 12, 2023

Environment

  • Elixir & Erlang/OTP versions (elixir --version):
Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
Elixir 1.15.1 (compiled with Erlang/OTP 24)
  • Which version of Dialyxir are you using? (cat mix.lock | grep dialyxir): "dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"},

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
Copy link
Contributor

danschultzer commented Jul 18, 2023

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
Copy link
Contributor Author

alappe commented Jul 18, 2023

Alright, thank you for the feedback.

@jeremyjh
Copy link
Owner

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

Annopaolo added a commit to Annopaolo/astarte that referenced this issue Nov 15, 2023
`mix dialyzer` randomly fails when using Dialyxir < 1.4
with `dependency missing` (see jeremyjh/dialyxir#511).
This happens most notably in CI.
Update dialyxir to latest (1.4.2) version to fix it.

Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants