im-tollu

im-tollu

@Joseph, isn’t that true, that when you add /consolidated to paths, you loose default /ebin inclusion? But if you try to include /ebin as well, Dialyzer complains about duplicate modules.

It seems that it would solve the problem to generate stubs for built-in types inside defprotocol macro.

0
Post #11
im-tollu

im-tollu

@jeremyjh , Thanks a lot!

Using your “ignore_warnings:” config parameter I’ve suppressed “:0: Unknown function … :‘impl’/1” warnings. I used string “':‘impl’/1” to filter them out.

Still, it would be great to have defprotocol macro updated so that it could make Dialyzer happy without workarounds.

Best regards

0
Post #12
NobbZ

NobbZ

As I wasn’t able to find one on a first glance, you should probably be the first who opens a ticket at GitHub - elixir-lang/elixir: Elixir is a dynamic, functional language for building scalable and maintainable applications · GitHub

But please check first if this happens for consolidated protocols as well as unconsolidated.

Perhaps it is simple enough to just make dialyxir use a dialyzer environment per default, that does (or does not) consolidate protocols.

0
Post #13
im-tollu

im-tollu

@NobbZ, thanks!
Well, I used

def project do
  ...
  consolidate_protocols: false
  ...
end

to switch off consolidation - and still get the same error.

Here is the ticket: https://github.com/elixir-lang/elixir/issues/7708

2
Post #14
— All posts loaded —