-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fix #265: New Rule: export used types #273
Conversation
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.
Great job! The only thing missing, from my perspective, is to make the rule run on beam files and test that.
Should we mention, somewhere, that exported types can also be |
I'm not sure of the intention of the question as a bystander, but FWIW opaque types have to be exported to be useful at all. In the local module they're just types, i.e. no difference between |
I know 😄, there's even a compiler warning if I'm not mistaken. What I'm hinting at is that this rule will make consumers just go "Oh, I need to add an export_type here" and do it without thinking about the consequences of potentially exposing a non-opaque. If it was they're intention before, sure, the type should already be opaque and exposed; if it wasn't, now that it's being exposed there are consequences to it. |
Co-authored-by: Brujo Benavides <elbrujohalcon@gmail.com>
Once we have a new release, we should run it on OTP itself. |
Here's a pointer from the OTP team and exporting types: "Our policy is to be restrictive with exporting types. Only input and return types should be necessary to export." which correlates with the rule. |
No description provided.