-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Elixir projects always recompile / Dialyzer cannot open files #5664
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
Comments
I cannot reproduce this failure. Have you attempted another Erlang version to see if this is something specific to dialyzer in this Erlang version? I have used 18 and 19.0 and 19.2. |
@josevalim Is Dialyzer being included within the latest builds of Elixir? BTW, I just started seeing this issue with Erlang 19.1. I'll try testing against Erlang 19.2. |
What do you mean? Dialyzer ships with Erlang and we don't really do anything special, we just use it slightly in our test suite to check some code won't emit dialyzer warnings. |
I have improved the error when dialyzer fails in 4cfe280. Unfortunately we don't know why dialyzer failed to fetch the abstract code here (thats the error). |
@josevalim I didn't know if Dialyzer was being enabled by default within Erlang or Elixir. It could very well be an issue with Macports build of Erlang. Now, I'll try building from source and report back here. |
@conradwt dialyzer is included with Erlang (given the stacktrace it's there). However we can't debug why it doesn't work without more information. Perhaps Elixir isn't build with debug info? Do we have a way to do that? |
@fishcakez I'm just doing the following to build Elixir:
|
@conradwt I am unsure what to suggest. We could see what happens if you do:
|
@fishcakez Here's the output:
|
@conradwt ah, not sure whats going on here. Lets see |
@fishcakez Here's the output using [
|
Interesting, Kernel was compiled on ERTS-7.0.2 which is OTP-18.0.2. I wonder if Elixir been compiled on 18.0.2 and the abstract code is not valid on OTP-19.1 (the version listed at the top). Could you try again with Elixir compiled and run on the same major version of OTP? |
I could not reproduce this when I built on OTP-18.0.3 and ran tests with OTP-19.1. I did not have OTP-18.0.2 to hand unfortunately. |
@conradwt can you please try to run |
I wonder if its http://erlang.org/pipermail/erlang-bugs/2017-January/005206.html? |
@fishcakez This appears to be the same issue. Furthermore, OpenSSL depends on Zlib and Erlang has a dependency on OpenSSL. |
@josevalim It appears that there maybe an issue with the way the Erlang 19.1 port has been built because I was able to build Erlang 19.2 from source using |
Interesting. So it does seems to be a bug elsewhere. How was your earlier 19.1 built? |
i'm running into the same error. also on arch linux. i've tried with erlang 19.0 and erlang 19.2, both built with asdf. it's not really a problem for me, but if i can help, please let me know. |
turns out it actually is a problem, and it's also pretty clear what is causing it: as of http://erlang.org/pipermail/erlang-questions/2017-January/091452.html, i'm downgrading zlib for now, but i suspect this will be a problem when distributions with slower release cycles upgrade their zlib. |
@manukall excellent catch. We will keep our eyes open as this will certainly cause further issues down the road. |
@josevalim My earlier build of Erlang 19.1 was built through MacPorts. |
@conradwt the elixir team doesn't maintain elixir packages, so you would need to contact whoever maintains the package for the relevant package manager to get it fixed. |
I can confirm this on my archlinux installation too. Downgraded to zlib 1.2.8 and recompile problem disappeared... |
@conradwt, @josevalim I confirmed this when launched my script to auto clone and recompile 3 Elixir versions after my distro update. I want to create new issue, but found it, so I copied my post. Here you can find more detailed info about it: Environment
I tried to execute
You can find a output of Current behaviorOn:
1) Kernel.DialyzerTest: failure on setup_all callback, test invalidated
** (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, '/home/eiji/elixir-releases/tags/v1.4.1/bin/../lib/elixir/ebin/Elixir.Kernel.beam', 32, 40, 112, 108, 101, 97, 115, 101, 32, 114, ...]}
stacktrace:
dialyzer_plt.erl:469: :dialyzer_plt.compute_md5_from_file/1
dialyzer_plt.erl:458: :dialyzer_plt."-compute_md5_from_files/1-lc$^0/1-0-"/1
dialyzer_plt.erl:458: :dialyzer_plt."-compute_md5_from_files/1-lc$^0/1-0-"/1
dialyzer_plt.erl:458: :dialyzer_plt.compute_md5_from_files/1
dialyzer_cl.erl:74: :dialyzer_cl.build_plt/1
dialyzer.erl:167: :dialyzer.run/1
test/elixir/kernel/dialyzer_test.exs:27: Kernel.DialyzerTest.__ex_unit_setup_all_0/1
test/elixir/kernel/dialyzer_test.exs:3: Kernel.DialyzerTest.__ex_unit__/2
1) Kernel.DialyzerTest: failure on setup_all callback, test invalidated
** (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, '/home/eiji/elixir-releases/branches/v1.4/bin/../lib/elixir/ebin/Elixir.Kernel.beam', 32, 40, 112, 108, 101, 97, 115, 101, 32, 114, ...]}
stacktrace:
dialyzer_plt.erl:469: :dialyzer_plt.compute_md5_from_file/1
dialyzer_plt.erl:458: :dialyzer_plt."-compute_md5_from_files/1-lc$^0/1-0-"/1
dialyzer_plt.erl:458: :dialyzer_plt."-compute_md5_from_files/1-lc$^0/1-0-"/1
dialyzer_plt.erl:458: :dialyzer_plt.compute_md5_from_files/1
dialyzer_cl.erl:74: :dialyzer_cl.build_plt/1
dialyzer.erl:167: :dialyzer.run/1
test/elixir/kernel/dialyzer_test.exs:27: Kernel.DialyzerTest.__ex_unit_setup_all_0/1
test/elixir/kernel/dialyzer_test.exs:3: Kernel.DialyzerTest.__ex_unit__/2
1) Kernel.DialyzerTest: failure on setup_all callback, test invalidated
** (RuntimeError) dialyzer error: Could not get abstract code for file: /home/eiji/elixir-releases/branches/master/bin/../lib/elixir/ebin/Elixir.Kernel.beam (please recompile it with +debug_info)
stacktrace:
test/elixir/kernel/dialyzer_test.exs:115: Kernel.DialyzerTest.dialyzer_run/1
test/elixir/kernel/dialyzer_test.exs:27: Kernel.DialyzerTest.__ex_unit_setup_all_0/1
test/elixir/kernel/dialyzer_test.exs:3: Kernel.DialyzerTest.__ex_unit__/2 Expected behaviorAll tests should pass. btw. There are lots of deprecation warnings especially at master. I don't have other |
Thanks. Hopefully a new Erlang version will zlib fixes will be out soon. |
A fix is at erlang/otp@e271199. This has been included in OTP-18.3.4.5. |
@fishcakez: Is there any plans for other Erlang releases (especially >19)? I compiled Erlang from evm (version OTP_19.2) and still have same problem :/ |
@Eiji7 the commit I linked is in the |
@fishcakez: ok, thank you! |
Workarounds for Gentoo/Funtoo users:
|
OTP-19.2.3 was released which includes the fix erlang/otp@e271199 |
@conradwt, @fishcakez and @josevalim: |
Erlang 19.3 is also out with a fix for this. We can finally close this. :) |
TL;DR by @josevalim - This is an issue with zlib 1.2.9 and Erlang. To fix it, downgrade zlib or upgrade to latest Erlang possible.
Environment
macOS 10.12.2 (16C67)
Elixir 1.5.0-dev (b7bc5ae)
Erlang 19.1_0+hipe+ssl+wxwidgets (built and installed through MacPorts)
Zlib 1.2.11_0
Current behavior
I'm seeing the following test failure when performing the following command:
Expected behavior
I would expect zero test failures.
The text was updated successfully, but these errors were encountered: