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

Turn compiler plugin into simple SPI #275

Closed

Conversation

mcimadamore
Copy link
Collaborator

@mcimadamore mcimadamore commented Nov 18, 2024

This PR is a small followup to the changes to turn compiler code reflection support into a compiler plugin.
Turns out that the new plugin required several hacks and workaround, to make sure that the plugin would only run when strictly required (not to affect outcome of compilation if the plugin was disabled). We can get rid of all such workarounds by turning the plugin into a plain and simple SPI. There is a new ReflectMethodsProxy interface, which is implemented by the new module (see ReflectMethods.Provider). This allows javac to more or less call into the new pipeline step as it did before the incubating change, which leads to code that is much simpler to maintain.


Progress

  • Change must not contain extraneous whitespace

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/babylon.git pull/275/head:pull/275
$ git checkout pull/275

Update a local copy of the PR:
$ git checkout pull/275
$ git pull https://git.openjdk.org/babylon.git pull/275/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 275

View PR using the GUI difftool:
$ git pr show -t 275

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/babylon/pull/275.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 18, 2024

👋 Welcome back mcimadamore! A progress list of the required criteria for merging this PR into code-reflection will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 18, 2024

@mcimadamore This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

Turn compiler plugin into simple SPI

Reviewed-by: psandoz

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the code-reflection branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the code-reflection branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 18, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 18, 2024

Webrevs

Copy link
Member

@PaulSandoz PaulSandoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should rename ReflectMethodsProxy to CodeReflectionTransformer use similar naming?

@mcimadamore
Copy link
Collaborator Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 18, 2024

Going to push as commit 152f4678c2ec50d5bbff04d76be7b007676b39e7.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 18, 2024
@openjdk openjdk bot closed this Nov 18, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 18, 2024
@openjdk
Copy link

openjdk bot commented Nov 18, 2024

@mcimadamore Pushed as commit 152f467.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants