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

How to pass options --statistics, --verbose, and --get_warnings to Dialyzer #482

Open
paulo-ferraz-oliveira opened this issue Mar 10, 2023 · 3 comments

Comments

@paulo-ferraz-oliveira
Copy link

Precheck

Searched issues, and README, for:

  • statistics,
  • verbose, and
  • get_warnings

Locally using:

  • dialyxir 1.2.0, and
  • erlex 0.2.6 (though not explicitly depending on it)

Environment

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

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

"dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"},

Current behavior

I can't seem to find a way to pass the following Dialyzer options to it and recover their output (i.e. even if they're being passed from e.g. mix dialyzer --statistics ... I'm not getting the output):

  • --statistics
  • --verbose
  • --get_warnings

Expected behavior

I'd like to understand if passing those options is possible in the current version (as I may be doing something wrong) and, if it's not, if it would be desired. This issue would serve as a reference for the desire, which I could also pull request for, if/when time allows.

@jeremyjh
Copy link
Owner

Hi, yes those are unsupported. I do not know how they work or where they are implemented in dialyzer, but it may be important to know that we are not invoking the dialyzer CLI tool, we're using the API. So we can't just pass through inputs and outputs, we'd have to implement those in the API and do something appropriate with the output it generates.

@paulo-ferraz-oliveira
Copy link
Author

paulo-ferraz-oliveira commented Mar 10, 2023

Hey, @jeremyjh.

Thanks for your feedback. Yeah, I noticed (looking at the mix task) you weren't using the CLI tool; I just didn't remember to check if those we're part of the API, though, sorry!

Shall we keep this open, while I create an equivalent to this for Erlang/OTP: Dialyzer?

Thanks.

Edit: Erlang/OTP issue #7007 - dialyzer: expose options --statistics, --verbose, and --get_warnings on the API 😄

@jeremyjh
Copy link
Owner

Yes I am fine to keep it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants