Open
Description
The Bazel javac compiler supports plugins via BlazeJavaCompilePlugin. We need to create a version of this, which allows integration with ECJ.
Specifically the following two methods are offered by BlazeJavaCompilePlugin
:
/**
* Performs analysis actions after the attribute phase of the javac compiler. The attribute phase
* performs symbol resolution on the parse tree.
*
* @param env The attributed parse tree (after symbol resolution)
*/
public void postAttribute(Env<AttrContext> env) {}
/**
* Performs analysis actions after the flow phase of the javac compiler. The flow phase performs
* dataflow checks, such as finding unreachable statements.
*
* @param env The attributed parse tree (after symbol resolution)
*/
public void postFlow(Env<AttrContext> env) {}
This work also includes patching ECJ to allow contributing such plug-ins programmatically.
Activity