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

v1.4.4 fails with error using custom ignore file location #544

Open
randycoulman opened this issue Sep 28, 2024 · 6 comments
Open

v1.4.4 fails with error using custom ignore file location #544

randycoulman opened this issue Sep 28, 2024 · 6 comments

Comments

@randycoulman
Copy link

Precheck

  • Take a look at the open issues and be sure that your issue is not already covered.
  • Be sure your versions of Dialyxir and Erlex are up to date.

Environment

  • Elixir & Erlang/OTP versions (elixir --version):
Erlang/OTP 27 [erts-15.0.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

Elixir 1.17.2 (compiled with Erlang/OTP 27)
  • Which version of Dialyxir are you using? (cat mix.lock | grep dialyxir): 1.4.4

Current behavior

  • Describe current behavior. Include errors, stack traces, and any additional information that might be important here.

When I run mix dialyzer with v1.4.4, I get the following error. 1.4.3 runs correctly.

** (File.Error) could not read file stats ".dialyzer_ignore.exs": no such file or directory
    (elixir 1.17.2) lib/file.ex:435: File.stat!/2
    (dialyxir 1.4.4) lib/mix/tasks/dialyzer.ex:191: Mix.Tasks.Dialyzer.run/1
    (mix 1.17.2) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.17.2) lib/mix/cli.ex:96: Mix.CLI.run_task/2
    /Users/randy/.asdf/installs/elixir/1.17.2-otp-27/bin/mix:2: (file)

I think that the key thing to note is my dialyzer config, notably the fact that I'm specifying a custom location for the ignore_warnings setting:

  def project do
    [
      # ...
      dialyzer: [
        ignore_warnings: "config/dialyzer_ignore.exs",
        list_unused_filters: true,
        plt_add_apps: [:ex_unit, :mix],
        plt_local_path: "priv/plts"
      ],
      # ...
    ]
  end

Also note that my ignore file has an empty list in it, but I'm not sure that matters here.

If I comment out the ignore_warnings: line, dialyzer 1.4.4 works fine, but adds the No :ignore_warnings opt specified in mix.exs and default does not exist. line to its output.

If I move my ignore file to the standard .dialyzer_ignore.exs location, with or without the ignore_warnings: line, everything works as expected. It seems to be only the case where I specify a non-standard location for the ignore file that is broken.

Expected behavior

  • A short description of the expected behavior.

I'd expect mix dialyzer to run correctly using my custom ignore file location.

randycoulman added a commit to randycoulman/freedom_account that referenced this issue Sep 28, 2024
Upgrades all dependencies except for dialyxir, which [introduces a bug](jeremyjh/dialyxir#544) that affects us.

- Fix one test for breaking PhoenixTest change.
- Use new `Money.negate!` instead of our `MoneyUtils` variant.
- Re-format with new Styler version.
- Update usage of Gettext to match latest version
- Remove mix test.interactive config since that can now be done from the command line according to  developer preference.
@jeremyjh
Copy link
Owner

@lnenad would you mind taking a quick look at this, given this is only happening after your changes in #543 ?

@lnenad
Copy link
Contributor

lnenad commented Sep 30, 2024

Yes, it was my oversight, sorry @randycoulman! This PR fixes the issue #545

@jeremyjh
Copy link
Owner

@randycoulman any chance you can test with that branch in your project?

@randycoulman
Copy link
Author

@jeremyjh The branch works for me. Thanks!

@esambo
Copy link

esambo commented Oct 4, 2024

Any update on this? 1.4.4 is still broken for me too. I would love to see a new release that fixes this issue

@epinault
Copy link

epinault commented Oct 4, 2024

Just ran into this too today. And really need the fix to be published @jeremyjh as moving to 1.17/OTP27 is causing issues

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

5 participants