Search code examples
elixirerlang-otpdialyzer

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


Background

The newest version of Elixir (1.7.X) has a bug that prevents the usage of dialyzer 16.

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

What I tried

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:

Question

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


Solution

  • I wrote a script (using official docker images) to test against all 1.7 versions and all of them failed.

    The lasted version that works seems to be 1.6.6.

    root@0697cad23f07:/data# mix dialyzer
    Finding suitable PLTs
    Checking PLT...
    [:accept, :compiler, :crypto, :elixir, :kernel, :logger, :mime, :plug, :plug_crypto, :prometheus, :prometheus_ex, :prometheus_plugs, :stdlib]
    PLT is up to date!
    Starting Dialyzer
    [
      check_plt: false,
      init_plt: '/data/_build/dev/dialyxir_erlang-20.3.8.14_elixir-1.6.6_deps-dev.plt',
      files_rec: ['/data/_build/dev/lib/myapp/ebin'],
      warnings: [:unknown]
    ]
    Total errors: 0, Skipped: 0
    done in 0m2.83s
    done (passed successfully)