4 ms·
I quite like mix and hex. Now all we need is sane, Elixir-y dialyzer errors!
by amorphid 8y ago
I quite like mix and hex. Now all we need is sane, Elixir-y dialyzer errors!
- jeremyjh 8y agoDisclaimer: I'm a maintainer but the next Dialyxir release makes a major improvement on this, thanks to contributions from Andrew Summers. He wrote a parser for the Erlangified term strings and uses the Elixir (1.6) pretty printer to print all the terms the way Elixir would. We're still fine-tuning the error messages and explanations but there is an RC on hex[0] - give it a spin if you haven't yet. [0] https://hex.pm/packages/dialyxir/1.0.0-rc.3 https://hex.pm/packages/dialyxir/1.0.0-rc.3
- qaq 8y agoWow nice. The rate of progress is amazing.
- dnautics 8y agothanks, the current state of dialyxir is quite good! I use it in my toolchain.
- _asummers 8y agoHi Jeremy! If anyone has any questions about this work, I'm willing to answer them!
- amorphid 8y agoI'll check it out tonight!
- mmartinson 8y agoAwesome. Thanks
- bostonvaulter2 8y agoYou should try Dialyxir 1.0.0-rc3! The error reporting is vastly improved by a GSoC student. Now you can get errors like this: ________________________________________________________________________________ apps/activity_feed/lib/activity_feed/push_notification_listener.ex:10:callback_type_mismatch Callback mismatch for @callback push/2 in ActivityFeed.ListenerBehaviour behaviour. Expected type: {:error, _} | {:ok, _} Actual type: :ok ________________________________________________________________________________ apps/activity_feed/lib/activity_feed/push_notification_listener.ex:24:pattern_match The pattern _ = {:error, _} can never match the type :error | :ok
- _asummers 8y agoNot quite -- that was me =). The GSOC student (Gabriel Gatu) is incorporating that work along with the incremental Dialyzer from the Elixir-ls project, and taking some of the new Dialyxir errors and morphing them a bit into a task that can be eventually merged back upstream into a more mainline mix task. You can track his progress here [0]. The lion's share of the work is now extracted into Erlex [1] which can be incorporated into other tools as needed. [0] https://github.com/gabrielgatu/mix-dialyzer https://github.com/gabrielgatu/mix-dialyzer [1] https://hex.pm/packages/erlex https://hex.pm/packages/erlex
- bostonvaulter2 8y agoOoops! Sorry for getting that mixed up! erlex sounds like a neat project! I hope you make an Elixir Forum post about it so that more people are aware of it, I think it probably has quite a few good uses.
- _asummers 8y agoNo trouble! I had unfortunate (or perhaps fortunate for Gabriel!) timing with its completion. Making a forum post is a good call! I need to throw some more docs in there, but I'll make one after that's in decent shape.