ucr-riple / NullAwayAnnotator

A tool to help adapting code bases to NullAway type system.
MIT License
13 stars 6 forks source link

Detect compiler failures and print an appropriate error message in such cases #237

Open msridhar opened 4 months ago

msridhar commented 4 months ago

I believe whenever the annotator runs to either build the target itself or to build downstream deps, it expects the compilation run to succeed, i.e., complete without compilation errors. (NullAway needs to be run at the WARNING level for this to occur.) If this is true, then annotator should detect when a build command fails, print an appropriate error message, and terminate the run. Right now, the annotator ignores build failures, which often leads to an incrutable failure later in the annotator run, like crashing due to the absence of some expected tsv file.

This could be implemented by directly checking the return code of the executed command in executeCommand or at callers of this function if that's better.