Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialyzer unformatted error #71

Closed
OvermindDL1 opened this issue Jan 20, 2017 · 2 comments
Closed

Dialyzer unformatted error #71

OvermindDL1 opened this issue Jan 20, 2017 · 2 comments

Comments

@OvermindDL1
Copy link

While building a plt dialyzer itself threw an error:

** (throw) {:dialyzer_error, [67, 111, 117, 108, 100, 32, 110, 111, 116, 32, 103, 101, 116, 32, 97, 98, 115, 116, 114, 97, 99, 116, 32, 99, 111, 100, 101, 32, 102, 111, 114, 32, 102, 105, 108, 101, 58, 32, 'c:/Users/<user>/Projects/<project>/_build/dev/lib/relx/ebin/relx.beam', 32, 40, 112, 108, 101, 97, 115, 101, 32, 114, ...]}
    dialyzer_plt.erl:469: :dialyzer_plt.compute_md5_from_file/1
    dialyzer_plt.erl:436: :dialyzer_plt.compute_new_md5_1/3
    dialyzer_plt.erl:406: :dialyzer_plt.check_plt/3
    dialyzer_cl.erl:254: :dialyzer_cl.check_plt/3
    dialyzer_cl.erl:187: :dialyzer_cl.plt_common/3
    dialyzer.erl:167: :dialyzer.run/1
    lib/dialyxir/plt.ex:166: Dialyxir.Plt.plt_add/2
    lib/dialyxir/plt.ex:41: Dialyxir.Plt.check_plt/4
    (elixir) lib/enum.ex:1755: Enum."-reduce/3-lists^foldl/2-0-"/3
    lib/dialyxir/plt.ex:28: Dialyxir.Plt.check_plts/1
    lib/mix/tasks/dialyzer.ex:128: Mix.Tasks.Dialyzer.check_plt/0
    lib/mix/tasks/dialyzer.ex:110: Mix.Tasks.Dialyzer.run/1
    (mix) lib/mix/task.ex:294: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2
    (elixir) lib/code.ex:370: Code.require_file/2

That error should probably be caught and pretty-printed (or at least iolist-to-binary'd) so we know what happened. :-)

@taiansu
Copy link

taiansu commented Feb 6, 2017

I encountered the same error with Elixir 1.4.1 & Erlang/OTP 19 on macOS.

** (throw) {:dialyzer_error, [67, 111, 117, 108, 100, 32, 110, 111, 116, 32, 103, 101, 116, 32, 97, 98, 115, 116, 114, 97, 99, 116, 32, 99, 111, 100, 101, 32, 102, 111, 114, 32, 102, 105, 108, 101, 58, 32, '/Users/tai/Projects/cogini/HOBS-website/source/_build/dev/lib/relx/ebin/relx.beam', 32, 40, 112, 108, 101, 97, 115, 101, 32, 114, ...]}
    dialyzer_plt.erl:469: :dialyzer_plt.compute_md5_from_file/1
    dialyzer_plt.erl:436: :dialyzer_plt.compute_new_md5_1/3
    dialyzer_plt.erl:406: :dialyzer_plt.check_plt/3
    dialyzer_cl.erl:254: :dialyzer_cl.check_plt/3
    dialyzer_cl.erl:187: :dialyzer_cl.plt_common/3
    dialyzer.erl:167: :dialyzer.run/1
    lib/dialyxir/plt.ex:166: Dialyxir.Plt.plt_add/2
    lib/dialyxir/plt.ex:41: Dialyxir.Plt.check_plt/4
    (elixir) lib/enum.ex:1755: Enum."-reduce/3-lists^foldl/2-0-"/3
    lib/dialyxir/plt.ex:28: Dialyxir.Plt.check_plts/1
    lib/mix/tasks/dialyzer.ex:128: Mix.Tasks.Dialyzer.check_plt/0
    lib/mix/tasks/dialyzer.ex:110: Mix.Tasks.Dialyzer.run/1
    (mix) lib/mix/task.ex:294: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2
    (elixir) lib/code.ex:370: Code.require_file/2

The first char list in the error message is 'Could not get abstract code for file: ' when manually print it out.

@jeremyjh
Copy link
Owner

jeremyjh commented Feb 7, 2017

0.4.4 handles this better; it will now print out the error string and highlight it. The problem here though is probably in relx; it looks like it may not include debug_info in its default configuration, only in its dialyzer profile. I'm afraid I don't know how to specify that as a build option in mix.exs, seems like it should be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants