josefs/Gradualizer

rebar3 plugin: Support excluding modules when using --use_beam

tsloughter opened this issue · 3 comments

Right now excluding modules is only supported for running against source files. I went to see about adding support for this when using --use_beam but found the plugin calls type_check_dir on the ebin dir so nothing I could do from the plugin itself. I figured I'd open an issue for help before jumping into gradualizer:type_check_dir to see if its feasible to exclude modules.

When not using beam files for analysis I get errors because of include files not being found that are when built regularly with rebar3. I can open a separate issue about that.

I figured I'd open an issue for help before jumping into gradualizer:type_check_dir to see if its feasible to exclude modules.

This part of Gradualizer is simple so don't be afraid of looking inside it. 😁 type_check_dir simply does a filelib:wildcard("*.{erl,beam}") and passes the list of files to type_check_files.

I think we should move the exclude and include options from the rebar3 plugin to the gradualizer module and add wrapper options in the cli --exclude and --include too. There's no reason these are only available in the rebar3 plugin.

When not using beam files for analysis I get errors because of include files not being found that are when built regularly with rebar3. I can open a separate issue about that.

Yes please, a separate issue for this would be good.

Done in #470

I plan to work on the cli option as well when I have time.