Skip to content
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

Create a ECJ version of BlazeJavaCompilerPlugin #5

Open
guw opened this issue Mar 24, 2022 · 0 comments
Open

Create a ECJ version of BlazeJavaCompilerPlugin #5

guw opened this issue Mar 24, 2022 · 0 comments

Comments

@guw
Copy link
Contributor

guw commented Mar 24, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant