Which version of elixir-otp-erlang can we use with dialyzer?

Background

As some of you know, the newest version of Elixir (1.7.3) has a bug that prevents the usage of dialyzer. This specially affects the 1.7.3-otp-21 release.

Now, I am aware that some previous versions were free from this problem, but I don’t know which ones.

Question

What is the latest version of elixir-otp-erlang that is not affected by this bug?

1.7.2-otp-21 seemed to work fine when I last run it

2 Likes

1.7.3 isn’t the newest, I’m running:

╰─➤  elixir --version
Erlang/OTP 21 [erts-10.1.1] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:1] [hipe]

Elixir 1.7.4 (compiled with Erlang/OTP 21)

And I use dialyzer excessively without issue?

1 Like

try/catch produces byte code that makes dialyzer complain.

I’m looking at a large try/catch in my large codebase here and dialyzer is running cleanly (it really shouldn’t, but it is, the lackings of it being a positive typer)? Is it only certain forms of try/catch constructs?

You even liked the post where I link to the issue on github…

https://github.com/elixir-lang/elixir/issues/8157

So, yes, I think we can consider this confirmed.

Hmm, actually I think my big server might still be running 1.6.something, so that would explain it (similar issue to the syntax parsing bug I posted recently too, that server is not on 1.7 yet…)

Well, you can ignore those warnings for now.

To be honest, I have not even discovered this bug until you put my nose into it.

I do not consider 1.7 bad just because of this small thing.

1 Like

I have tested the following builds:

  • 1.7.2-otp-21
  • 1.7.3-otp-21
  • 1.7.4-otp-21

All failed to work properly.

The bug can be reproduced with the MWE:

https://github.com/Fl4m3Ph03n1x/dialyxir-problem

Does anyone know any other builds?

I’m unable to test it right now but I’m positive it works - dialyzer (at least on MacOSX 10.13) I have no idea about prometheus, make sure you remove the _build folder and re-compile if you haven’t between tries and make sure that you’re actually running with those versions of the build (and if you installed dialyxir globally as an archive you might also need to clean it up?)

  • It most definitely doesn’t work.
  • I have a _build folder
  • Every time you run mix dialyzer, if the runtime has changed, the entire project gets recompiled automatically
  • I don’t have dialyxir installed globally. That’s just pain waiting to happen :stuck_out_tongue:

Let me know if you have the time to test it, I am curious now.