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

Unable to run on a phoenix project #542

Closed
lnenad opened this issue Sep 25, 2024 · 4 comments
Closed

Unable to run on a phoenix project #542

lnenad opened this issue Sep 25, 2024 · 4 comments

Comments

@lnenad
Copy link
Contributor

lnenad commented Sep 25, 2024

Environment

  • Elixir & Erlang/OTP versions (elixir --version):
Erlang/OTP 25 [erts-13.2.2.3] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]
Elixir 1.17.2 (compiled with Erlang/OTP 25)
  • Which version of Dialyxir are you using? (cat mix.lock | grep dialyxir):

"dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"},

Current behavior

I have an existing phoenix project and I am trying to add dialyxir to it. I get the following error when trying to execute mix dialyzer

** (Protocol.UndefinedError) protocol Enumerable not implemented for nil of type Atom. This protocol is implemented for the following type(s): Date.Range, File.Stream, Function, GenEvent.Stream, HashDict, HashSet, IO.Stream, Jason.OrderedObject, List, Map, MapSet, Phoenix.LiveView.LiveStream, Range, Stream
    (elixir 1.17.2) lib/enum.ex:1: Enumerable.impl_for!/1
    (elixir 1.17.2) lib/enum.ex:166: Enumerable.reduce/3
    (elixir 1.17.2) lib/enum.ex:4423: Enum.reduce/3
    (dialyxir 1.4.3) lib/dialyxir/formatter.ex:35: Dialyxir.Formatter.format_and_filter/5
    (dialyxir 1.4.3) lib/dialyxir/dialyzer.ex:65: Dialyxir.Dialyzer.Runner.run/2
    (dialyxir 1.4.3) lib/dialyxir/dialyzer.ex:93: Dialyxir.Dialyzer.dialyze/3
    (dialyxir 1.4.3) lib/mix/tasks/dialyzer.ex:274: Mix.Tasks.Dialyzer.run_dialyzer/2
    (dialyxir 1.4.3) lib/mix/tasks/dialyzer.ex:205: Mix.Tasks.Dialyzer.run/1

Expected behavior

  • I would expect it to work

Not sure whether my code is causing this issue as I am not well versed in elixir but looking at the stack trace I would expect this to be related to the lib.

@jeremyjh
Copy link
Owner

@lnenad is it possible you have a blank ignore file?

#405

@lnenad
Copy link
Contributor Author

lnenad commented Sep 26, 2024

Oh man you are right, I tried searching here, googling and AI and couldn't find the reason. Can I submit a PR to check for this situation as this just seems like a silly reason for it to bug out completely?

@jeremyjh
Copy link
Owner

@lnenad absolutely!

@lnenad
Copy link
Contributor Author

lnenad commented Sep 26, 2024

@jeremyjh done! #543

@lnenad lnenad closed this as completed Sep 29, 2024
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

No branches or pull requests

2 participants