jeremyjh
Hi everyone,
Andrew Summers has been working on a feature for dialyxir that among other things will Elixirfy the Erlang term representations - in particular this will improve the readability of structs in dialyzer warnings. It also gives us the ability to tweak or expand on the wording of the messages.
Ideally we’d have a test suite based on a corpus of real-world warning messages - but that doesn’t really exist to my knowledge. This is at the point though that alpha testing would be helpful to identify cases where types are not parsed when they could be or fail when attempted.
If you’d like to help out, and your project is already using Elixir 1.6 (we rely on this to help with pretty printing) you can update your mix.exs to use this branch:
{:dialyxir, git: "https://github.com/jeremyjh/dialyxir", branch: "elixir-formatter", runtime: false}
If parsing fails with an exception dialyxir should automatically print the message using :dialyzer formatter (like it the released version does today). If that happens please post about it in the PR.
Also there is a new command line option --raw - if you see output that you think doesn’t look good or doesn’t parse things that want for parsing, please re-run with mix dialyzer --raw and post the output tuples to that PR.
Thanks in advance!
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
jeremyjh
This feature has merged to master - I really want to thank Andrew for all the work he’s put into this.
Also, I wanted to mention another feature Andrew added, which is
--explain- this contains help text about what the class of warning means. Somix dialyzer --explain no_returnwill now do exactly that. Suggestions / improvements to this learning resource would be greatly appreciated.asummers
Thank you everyone for your bug reports and patience as I fixed them
Please make issues with any unclear language or issues you might still be having! I think the output is substantially more readable, and encourage you to play around with it. The
--format shortoption is particularly nice for CI pipelines.axelson
All of this sounds really interesting and useful and the output is already much more readable then the previous output. Quick question, is it possible to get the
--explainoutput available via iEX?asummers
Totally should be. Are you thinking in an editor capacity? Can you make an issue and we can work out the details.
asummers
Actually you can just invoke the
explain/0function in all theDialyxir.Warningsmodules.There currently isn’t an accessible list of all available warnings, but that should be trivial to throw behind a function.
Curious what the use case is though, we might be able to do better.
axelson
That function doesn’t appear to be quite what I’m thinking. This is what I get:
When I would want to be able to run something more like this:
The use-case is either just accessing the explanations via iEX manually while coding, as well as I can forsee it being useful for an editor integration.
asummers
Right, so that one is just missing an explanation. if you call:
I think it will do what you want. I’m not sure how to force it to respect the new lines besides
IO.puts.axelson
But from an output like:
How is a user supposed know that maps
no_returnmaps toDialyxir.Warnings.NoReturn?asummers
Totally fair question, that part is missing
asummers
@axelson Added

Dialyxir.Warnings.warnings/0that will give the atom to module mapping, so you can to_string or whatever else you need to do from there. Also adds a--listoption to just see them in general. Please open a GitHub issue if that isn’t sufficienthttps://github.com/jeremyjh/dialyxir/pull/171/files