Skip to content

Create a ECJ version of BlazeJavaCompilerPlugin #5

@guw

Description

@guw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions