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

Ignore only works with absolute path #500

Open
2 tasks done
maennchen opened this issue May 22, 2023 · 3 comments
Open
2 tasks done

Ignore only works with absolute path #500

maennchen opened this issue May 22, 2023 · 3 comments

Comments

@maennchen
Copy link
Contributor

maennchen commented May 22, 2023

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 26 [erts-14.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

Elixir 1.14.4 (compiled with Erlang/OTP 26)
  • 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

Ignore

[
  # Phoenix Bug
  {"lib/phoenix/router.ex", :pattern_match, 481}
]

Output

Finding suitable PLTs
Checking PLT...
[:absinthe, :absinthe_error_payload, :absinthe_phoenix, :absinthe_plug, :absinthe_relay, :acme_iam, :asn1, :castore, :certifi, :combine, :compiler, :connection, :cors_plug, :cowboy, :cowboy_telemetry, :cowlib, :crypto, :csv, :customer_book, :dataloader, :db_connection, :decimal, :ecto, :ecto_boot_migration, :ecto_enum, :ecto_sql, :eex, :elixir, :erlsom, :hackney, :httpoison, :idna, :inets, :jason, :jose, :kernel, :libcluster, :logger, :metrics, :mime, :mimerl, :mix, :myxql, :nimble_parsec, :oauth2, :openid_connect, :parse_trans, :phoenix, :phoenix_ecto, :phoenix_pubsub, ...]
PLT is up to date!
ignore_warnings: .dialyzer_ignore.exs

Starting Dialyzer
[
  check_plt: false,
  init_plt: '/home/maennchen/Development/acme_backend/_build/dev/dialyxir_erlang-26.0_elixir-1.14.4_deps-dev.plt',
  files: ['/home/maennchen/Development/acme_backend/_build/dev/lib/customer_book_api/ebin/Elixir.AcmeApi.Schema.Helpers.beam',
   '/home/maennchen/Development/acme_backend/_build/dev/lib/customer_book/ebin/Elixir.Acme.Application.beam',
   '/home/maennchen/Development/acme_backend/_build/dev/consolidated/Elixir.AcmeApi.Exception.beam',
   '/home/maennchen/Development/acme_backend/_build/dev/lib/customer_book_api/ebin/Elixir.AcmeApi.ErrorHelpers.beam',
   '/home/maennchen/Development/acme_backend/_build/dev/lib/customer_book/ebin/Elixir.Acme.HyperlinkManager.Hyperlink.Category.beam',
   ...],
  warnings: [:unknown]
]
Total errors: 1, Skipped: 0, Unnecessary Skips: 1
done in 0m5.58s
deps/phoenix/lib/phoenix/router.ex:481:pattern_match
The pattern can never match the type.

Pattern:
:error

Type:

  {%{
     :conn => nil,
     :log => :debug,
     :path_params => map(),
     :pipe_through => [any(), ...],
     :plug => Absinthe.Plug.GraphiQL,
     :plug_opts => [any(), ...],
     :route => <<_::8>>
   }, (map(), map() -> map()), (map() -> map()), {Phoenix.Router.Route, {_, _, _}}}


________________________________________________________________________________
done (warnings were emitted)
Halting VM with exit status 2

Expected behavior

Ignore is respected

Additional Context

Absolute Path

The following ignore is respected:

[
  # Phoenix Bug
  {Path.absname(Path.join(System.cwd!(), "deps/phoenix/lib/phoenix/router.ex")), :pattern_match, 481}
]

Erlang Version

Also, the error does not happen for OTP 25.3, but happens for 25.3.2 & 26.0.

Umbrella

The command is executed in an umbrella application.

@jeremyjh
Copy link
Owner

It looks like we're somehow dialyzing your dependencies, have you added paths in your config?

@maennchen
Copy link
Contributor Author

No, there's only specific dialyzer config in the umbrella root mix.exs:

      dialyzer: [
        ignore_warnings: ".dialyzer_ignore.exs",
        list_unused_filters: true,
        plt_add_apps: [:mix]
      ],

All child mix.exs do not have additional dialyzer config.

@maennchen
Copy link
Contributor Author

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