-
Notifications
You must be signed in to change notification settings - Fork 4
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
[R21] Fix complilation, specs, add specs to generated repo code #17
base: master
Are you sure you want to change the base?
Conversation
@@ -259,7 +259,10 @@ repo_sup_spec(Repo) -> | |||
repo_fun_template(Mod, Fun, Arity, Repo, Adapter) -> | |||
Args = splicing_args(Arity), | |||
Body = build_repo_fun(Repo, Adapter, Mod, atom_to_list(Fun), Args), | |||
{Fun, Arity, Body}. | |||
case build_repo_fun_spec(Repo, Fun, Args) of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing is, when you have behaviour and the callbacks are well defined in terms of specs, it shouldn't be necessary to duplicate the same spec every time you implement that behaviour, that's why you can use the @hidden
tag. I think it is something that has to be improved for dialyzer, but in the meantime, I will disable mandatory specs for all exported functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get your point, somehow having specs on callback is not enough. How would you disable mandatory specs?
@maximvl I think, for the implemented callbacks it shouldn't be necessary to add specs (the spec is already defined in the callback), since the spec will be the same and you will end up duplicating the same spec every time you implement a behavior. If dialyzer complains is maybe because you are forcing specs for all exported functions. |
Set build version to R21
@cabol I'm using current project configuration and check with |
@maximvl in the meta suite: init_per_suite(Config) ->
Dialyzer = {dialyzer_warnings, [
no_return,
unmatched_returns,
error_handling,
unknown
]},
[{application, cross_db}, Dialyzer | Config]. |
A new clean PR to replace #10