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

ERL-1480: Add no_underspecs to -dialyzer(_). #4033

Closed
OTP-Maintainer opened this issue Feb 7, 2021 · 6 comments · Fixed by #4517
Closed

ERL-1480: Add no_underspecs to -dialyzer(_). #4033

OTP-Maintainer opened this issue Feb 7, 2021 · 6 comments · Fixed by #4517
Assignees
Labels

Comments

@OTP-Maintainer
Copy link

Original reporter: paulo.ferraz.oliveira@gmail.com
Affected version: Not Specified
Component: Not Specified
Migrated from: https://bugs.erlang.org/browse/ERL-1480


I'd like it to be possible to suppress `underspecs` in a single function, while having it enabled for all the others.

I ran into an issue (reported here: [https://github.com/tomas-abrahamsson/gpb/issues/196)] whose solution might be this "option".

I see that something similar's been discussed in ERL-1379, already, but it appears it was abandoned.

This is especially useful when (like with `gpb`) our code includes generated code, whose analysis we can't suppress.
@OTP-Maintainer
Copy link
Author

paulo.ferraz.oliveira@gmail.com said:

Related pull request opened: https://github.com/erlang/otp/pull/3038.

@OTP-Maintainer
Copy link
Author

hasse said:

There is actually an OTP ticket (assigned to me in the current sprint)
that aims at introducing a new option, possibly several new options.
So we did not abandon ERL-1379; it's just that the turn-around time is
long.

I'm currently swamped with other things but hopefully I'll can have a
deeper look into this within a few weeks or so.

@OTP-Maintainer
Copy link
Author

paulo.ferraz.oliveira@gmail.com said:

Great. Thanks. I was mislead by the fact that that issue is marked as Resolved. Feel free to reject the pull request.

@uabboli
Copy link
Contributor

uabboli commented Feb 16, 2021

As per your suggestion I've added no_underspecs in GH-4517. Considered adding more options, but this is the only one that really adds something, I think.

@paulo-ferraz-oliveira
Copy link
Contributor

paulo-ferraz-oliveira commented Feb 16, 2021

Great, thanks. I think we can close this one. I'll try to find time to test it locally.

Note: I find developers of code generators will like it :-) since it'll allow to be as detailed as possible, in some cases, while maintaining a more default strictness, on others.

@paulo-ferraz-oliveira
Copy link
Contributor

Worked flawlessly (tested in a very small code base).

uabboli added a commit that referenced this issue Feb 18, 2021
* hasse/dialyzer/inv_options/OTP-16986/ERL-1480/GH-4033:
  dialyzer: Add option to be used with attribute -dialyzer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants