-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Environment
-
Elixir & Erlang versions (
elixir --version
):Erlang/OTP 20 [erts-9.1.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] Elixir 1.5.2
-
Operating system: OSX (
sw_vers
):ProductName: Mac OS X ProductVersion: 10.13.1 BuildVersion: 17B1003
Current behavior
Any usage of the defprotocol
macro in a project dependency causes dialyzer to complain:
Guard test 'or'('false','false') can never succeed
Expected behavior
It would be nice if this did not occur, as every project containing dependencies with protocols must then mark these warnings as allowed to get clean dialyzer runs. It's one thing for the language to not get a clean dialyzer run itself but it is a bit of a hassle if it causes projects' dialyzer runs to fail indirectly because of how the defprotocol
macro is implemented.
Dialyzer can't provide very useful backtracing into the cause of this since it is a macro. Since this is a low-priority, nice-to-have, hard-to-implement issue I'm fine if this is just closed out but I thought it'd be nice to have it reported somewhere and I couldn't see any such a report anywhere already.
If closed off I will approach maintainers of Elixir dialyzer tasks and see if this can instead be included in a set of default ignores.