-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Dialyzing "checklist" #581
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
@yrashk If in fact this is elixir outputting binary where we could output a char list, we could also swap to outputting the char list in the abs tree. i am fine with that. |
I think char list will be safer, as long as what we get back in elixir is a On Sat, Oct 27, 2012 at 2:20 AM, José Valim [email protected]:
|
Current discovery: dialyzer seemingly can't handle "large" guard expressions (say 15-16+ orelse exprs make it spin for some long timer, with seemingly exponential growth) |
This code seems to make dialyzer crunch for a looong time (and longer if you add more clauses): https://gist.github.com/e07da354506aedcccd0c |
We can definitely change the relevant guard but I want to understand what's happening first because I am a bit uncertain about what you are doing. For that, I want some more information. Unless I am mistaken, adding to an existing PLT (say to ~/.dialyzer_plt) should not be generating any warnings other than that there are unknown functions or types. If you want to add the info under
So, I do not see why you get the crash you are reporting.because warnings should not be produced by this command. What are you using and how can I reproduce this? While I am writing all these more comments were added above. I would appreciate an exact sequence of commands to run to reproduce these also. Unrelated personal info: My reaction may not be so fast since I just got a child! -- our first... |
First of all, my congratulations with the birth of the baby! 👶
|
fyi @josevalim — with our latest workaround (3c15bcc) I successfully PLTd the whole elixir. |
What's more interesting, if I change |
It'd be fair to note here that |
anyhow, that is still quite valid erlang code, I don't think dialyzer should choke on it :) |
I am trying to get elixir built into a PLT and I am running into various issues. Let me list them here so we can go through them and fix'em.
I can't quite spot what's happening there. The only thing that gets my attention in this module is ladders of "orelse"s and such (try running rp(beam_lib:chunks(Elixir-Macro, [abstract_code])) in erlang shell and you'll see what I mean)
Seemingly (according to --plt_info) these modules still make it into PLT. Here's an email I sent to Kostis (@kostis) with the explanation of this problem:
I found an issue that is seemingly preventing me from adding a bunch
of modules to plt. The issue that one of the dialyzer aux functions
crashes with function_clause:
When I started investigating I matched that <<55 bytes>> piece with
the File variable below:
However, according to format_warning's spec, the first argument is
dial_warning(), and according to dialyzer.hrl, this is
{dial_warn_tag(), file_line(), {atom(), [term()]}}
and file_line() is-type file_line() :: {file:filename(), non_neg_integer()}
.Which means, the filename accepted should be file:filename(), which is
currently (according to file.erl) is string() | binary()
Therefore, format_warning requiring the list there is in the wrong, if
I am not mistaken.
I wonder, however, why that bit got binarized even in pure .erl files? Something about our compilation process?
So far these seem to be the only obstacle. #1 is trivially fixable (I have a patch if necessary), #3 is seemingly minor as well (but we better figure out why it gets to that warning in the first place (spawn/5?!) and why File gets binarized there). #2 is a completely mystery to me so far.
I'd love if @kostis could help us but I know he is a busy man :)
The text was updated successfully, but these errors were encountered: