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

Delombok OpenRewrite source code before publishing #1407

Closed
thomaszub opened this issue Feb 23, 2022 · 6 comments
Closed

Delombok OpenRewrite source code before publishing #1407

thomaszub opened this issue Feb 23, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@thomaszub
Copy link
Contributor

The published source code contains Lombok annotations. These annotations make debugging really hard as the Java byte code and source code differ from each other.

Please consider to delombok the source code before publishing.

@pway99
Copy link
Contributor

pway99 commented Feb 23, 2022

Hi @thomaszub, unfortunately, rewrite does not yet support lombok annotations. You can follow issue #1297 for progress on lombok annotation support.

@pway99 pway99 closed this as completed Feb 23, 2022
@thomaszub
Copy link
Contributor Author

Hi @pway99, I was not completely clear in my above statement. I did not mean the Lombok support of rewrite as is already tracked by #1297, but the Lombok annotations in the rewrite source code itself.

Take for example
https://github.com/openrewrite/rewrite/blob/5f79c2babfff71a2016b6f7bdeac12c62fc9f531/rewrite-gradle/src/main/java/org/openrewrite/gradle/ChangeDependencyArtifactId.java

This code can be hardly debugged because the published source code differs from the Java Byte code. This makes debugging really hard. Please consider to delombok the rewrite source code before publishing.

@thomaszub thomaszub changed the title Delombok source code before publishing Delombok OpenRewrite source code before publishing Feb 24, 2022
@fupgang
Copy link

fupgang commented Feb 24, 2022

To clarify, some example:
When debugging using the sources fetched from maven central, the line numbers do not match. Thus I was not able to place some breakpoints.
(This problem does not exist when I import the rewrite modules in my workspace instead, the IDE than handles lombok correctly.)

@pway99
Copy link
Contributor

pway99 commented Feb 24, 2022

@thomaszub and @fupgang thanks for the clarification, we'll have a look.

@pway99 pway99 reopened this Feb 24, 2022
@pway99
Copy link
Contributor

pway99 commented Feb 25, 2022

Hi @thomaszub, After a bit more review, I have found an experience similar to what @fupgang mentioned where rewrite modules added to the workspace can be debugged with some slight differences between the source and decompiled class files. Would you like to join us on Slack where we can discuss further and even meet up if that would help?

@tkvangorder tkvangorder added the enhancement New feature or request label Mar 1, 2022
@pway99 pway99 self-assigned this Mar 2, 2022
@pway99
Copy link
Contributor

pway99 commented Mar 15, 2022

Hello @thomaszub and @fupgang, This issue can only be reproduced by mismatched dependency versions between the rewrite-maven-plugin, rewrite-*, and the test recipe.

Thanks again for your help, and please don't hesitate to ping us on Slack if you have any further questions.

@pway99 pway99 closed this as completed Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

4 participants