-
Notifications
You must be signed in to change notification settings - Fork 218
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
The json_term() spec is inconsistent with the README and current implementation #50
Comments
i don't use dialyzer typically so i'm not sure i'm equipped to tackle this but i'll see what i can do |
According to my little experiment, the fix is a simple inclusion of term -type json_term() :: list({binary(), json_term()})
| [{}]
| list(json_term())
... |
And it's also accurate to say that |
i just ran dialyzer against the current development branch and i didn't get either of these errors. could you let me know what version you ran dialyzer against? also the output from dialyzer would be great too |
Of course you will not see any warnings running dialyzer against just jsx (without the underspec warning turned on) because in this case dialyzer checks internal jsx consistency. Consider the following example: jsx's code handles APP_PLT = ./.app_plt
$(APP_PLT):
dialyzer --plt ~/.dialyzer_plt --build_plt --output_plt $(APP_PLT) deps/*/ebin
dialyze: build $(APP_PLT)
dialyzer --plts ~/.dialyzer_plt $(APP_PLT) --fullpath ebin -Wunmatched_returns -Werror_handling -Wrace_conditions Here And even if we put the dialyzer thing aside for a second inconsistency between the typespec and the README remains. |
okay thanks for helping me understand this. i think i've fixed it. let me know if you find any other problems |
You're welcome. 5868430 passes dialyzation, thank you. |
Therefore makes dialyzer real angry sometimes.
And then a screen full of warnings which disappear should I comment the clause with
jsx:encode([{}])
.The text was updated successfully, but these errors were encountered: