Skip to content
New issue

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

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

Already on GitHub? # to your account

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

Closed
randycoulman opened this issue Sep 28, 2024 · 14 comments · Fixed by #549
Closed

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

randycoulman opened this issue Sep 28, 2024 · 14 comments · Fixed by #549

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
Contributor

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

@scohen
Copy link

scohen commented Oct 28, 2024

Peeps, this has also broken Lexical's builds as well, can we get some work on this?

@jeremyjh
Copy link
Owner

Hey everyone, I apologize but I've been slammed at work for last 3 weeks, launching a major platform feature. This is currently stalled in CI failures in #545. If someone wants to take a look at that, I'd be grateful, I think @lnenad is stuck. The build matrix is a bit surprising. Otherwise I will make time for it this weekend.

@epinault
Copy link
Contributor

epinault commented Nov 1, 2024

why not retiring some version? the OTP + Elixir is more agressive and maybe it s time to ignore some of the old versions at this point? like OTP23 and lower, elixir 1.12 and lower?

@pdm-jd
Copy link
Contributor

pdm-jd commented Nov 12, 2024

☝️ This PR fixes it and adds tests for the various scenarios.

@epinault
Copy link
Contributor

will you push a new version 1.4.5 soon then?

@jeremyjh
Copy link
Owner

1.4.5 is released

@epinault
Copy link
Contributor

thank you!

@randycoulman
Copy link
Author

Thanks @jeremyjh! Confirmed that this fixes my original issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
7 participants