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

Provide more clear explanation for message at the end of PLT generation #345

Open
mguimas opened this issue Jul 5, 2019 · 2 comments
Open

Comments

@mguimas
Copy link

mguimas commented Jul 5, 2019

Environment

$ elixir --version
Erlang/OTP 21 [erts-10.2.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]

Elixir 1.8.1 (compiled with Erlang/OTP 21)

$ cat mix.lock | grep dialyxir
  "dialyxir": {:hex, :dialyxir, "1.0.0-rc.6", "78e97d9c0ff1b5521dd68041193891aebebce52fc3b93463c0a6806874557d7d", [:mix], [{:erlex, "~> 0.2.1", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm"}

Current behavior

The message at the end of this

$ mix dialyzer --plt
Finding suitable PLTs
Checking PLT...
[:asn1, :certifi, :compiler,  ...]
Looking up modules in dialyxir_erlang-21.2.5_elixir-1.8.1_deps-dev.plt
Looking up modules in dialyxir_erlang-21.2.5_elixir-1.8.1.plt
Looking up modules in dialyxir_erlang-21.2.5.plt
Finding applications for dialyxir_erlang-21.2.5.plt
Finding modules for dialyxir_erlang-21.2.5.plt
Checking 14 modules in dialyxir_erlang-21.2.5.plt
Adding 173 modules to dialyxir_erlang-21.2.5.plt
Finding applications for dialyxir_erlang-21.2.5_elixir-1.8.1.plt
Finding modules for dialyxir_erlang-21.2.5_elixir-1.8.1.plt
Copying dialyxir_erlang-21.2.5.plt to dialyxir_erlang-21.2.5_elixir-1.8.1.plt
Looking up modules in dialyxir_erlang-21.2.5_elixir-1.8.1.plt
Checking 187 modules in dialyxir_erlang-21.2.5_elixir-1.8.1.plt
Adding 231 modules to dialyxir_erlang-21.2.5_elixir-1.8.1.plt
Finding applications for dialyxir_erlang-21.2.5_elixir-1.8.1_deps-dev.plt
Finding modules for dialyxir_erlang-21.2.5_elixir-1.8.1_deps-dev.plt
Copying dialyxir_erlang-21.2.5_elixir-1.8.1.plt to dialyxir_erlang-21.2.5_elixir-1.8.1_deps-dev.plt
Looking up modules in dialyxir_erlang-21.2.5_elixir-1.8.1_deps-dev.plt
Checking 418 modules in dialyxir_erlang-21.2.5_elixir-1.8.1_deps-dev.plt
Adding 1055 modules to dialyxir_erlang-21.2.5_elixir-1.8.1_deps-dev.plt
**No :ignore_warnings opt specified in mix.exs and default does not exist.** <-- THIS MESSAGE

is not sufficiently clear to the developer seeing it for the first time. What should the developer do?

Expected behavior

It seems that either Dialyxir should provide a default value for the :ignore_warnings option, or the developer should not be bothered with this message, which should then be cleared.

But if something must be done, please tell what must be done.

@mguimas mguimas changed the title Provider more clear explanation for message at the end of PLT generation Provide more clear explanation for message at the end of PLT generation Jul 5, 2019
@jeremyjh
Copy link
Owner

See the discussion in #224. I'm kind of leaning to your point of view now though; this message is probably a distraction in most cases. It is there so that if you have an ignore file with the wrong name, you get a clue what the problem is. I'm not sure if there is another way we could help solve that, or maybe we could just make the message sound less like a problem?

@mguimas
Copy link
Author

mguimas commented Jul 15, 2019

@jeremyjh I believe that if the user did not provide :ignore_warnings in mix.exs is because they simply accept the default or don't care.

Document what is the default value of :ignore_warnings in case this option is not given in mix.exs, or in case the corresponding file does not exist, and document this well in the help docs in mix help dialyzer.

Also, better than the current message, is to present the user with the value being used for the :ignore_warnings option during execution of mix dialyzer.

Both of these should be more than enough.

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