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

Jakarta Generated support #3668

Open
KyRobbins opened this issue May 16, 2024 · 2 comments
Open

Jakarta Generated support #3668

KyRobbins opened this issue May 16, 2024 · 2 comments

Comments

@KyRobbins
Copy link

KyRobbins commented May 16, 2024

Noting the feature addition resulting from #3248, am I mistaken, or does that annotation use SOURCE retention, and again, unless I'm mistaken, Lombok doesn't generate intermediate source files, but rather just making modifications otw to compiled class files.

If that's all true, what value is there in using the jakarta annotation option? For instance, again, if I'm not mistaken, I believe Jacoco relies on the compiled class files, so therefore the @jakarta.annotation.Generated annotation would not be there to benefit from their AnnotationGeneratedFilter feature.

@KyRobbins
Copy link
Author

Following up with my above question, I'm wondering if it would be feasible to have a

lombok.addCustomGeneratedAnnotation = com.example.Generated

There could even either be a configuration or a standard for annotation properties, so either:

lombok.addCustomGeneratedAnnotationSource = true

Or just make it a standard that the annotation takes one literal string parameter to define the source of the generated code.
This would easily allow people to inject any annotation they want to use.

@Rawi01
Copy link
Collaborator

Rawi01 commented May 23, 2024

You are right that this doesn't change anything for JaCoCo but there are other tools that work on source level and use the delombok output. If you want to exclude your code from JaCoCo you can add lombok.addLombokGeneratedAnnotation = true to your config file or update to the edge release.

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

2 participants