-
Notifications
You must be signed in to change notification settings - Fork 35
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
Flag to enable type checking per file in a project #34
Comments
I think it is a good suggestion. I would like a type checker to be able to detect as many This can already be done in the build scripts and tools for each project. For small projects, I think it can be enabled in one go. It could be enabled using configuration in the rebar config file or Makefile. For larger projects, a build tool can make use a list of files to type check. A continuous integration tool can keep track of the number of errors and to highlight new errors introduced by a commit or a build. In the long run, I think is a reasonable that a typechecker (this or another) becomes part of the Erlang compiler. Compiler options such as Compile options can also be added in each file, using e.g. |
I agree this is a good, practical idea. Gradualizer itself already works on a per module basis ( |
@gomoripeti I think you're absolutely right! If I understand the source correctly, gradualizer mostly (only?) reports errors for the modules you list and there isn't really a need to add the concept of a project since gradualizer keeps a database of types running in between the separate calls to Is there anything actionable here or should we just keep this in mind for the future? I feel there might be some nugget worth documenting but not sure what exactly. |
@Zalastax, the actionable thing might be to document this in a user documentation. We currently don't have any such documentation sadly, apart from the rudimentary info in the README. Feel free to create some initial documentation if you're up for it. |
I think the Wiki could be a good initial place for that. @josefs can you enable it / create an initial page / let me edit it? |
@Zalastax, good idea! I've created an initial page and given you permission to edit. Knock yourself out :-) |
In the JavaScript world, Flow and TypeScript can enable type checking on a per file basis in a project setup. This allows for gradual enabling of the type checker so that there is not an overwhelming amount of errors when starting out. Without a similar solution I think it will be difficult to add gradualizer to a big code base - especially if we do a good job with type inference.
The text was updated successfully, but these errors were encountered: