You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Christoph Henrici (Jira)" <ji...@apache.org> on 2024/05/29 14:15:00 UTC

[jira] [Comment Edited] (GROOVY-11388) Does Groovy support Java Anntotation Processors?

    [ https://issues.apache.org/jira/browse/GROOVY-11388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17850379#comment-17850379 ] 

Christoph Henrici edited comment on GROOVY-11388 at 5/29/24 2:14 PM:
---------------------------------------------------------------------

Great thanks for the clear answer.  I don‘t think it boils down to futures of the a specific Annotation set … like Lombok, but general. In Java there are some quite valid Annotation Processors since a couple of years. And also simple in-house processors are easily imaginable. As you write „most Lombok annotations …“ … but not all. 

That said, i prefer the clear statement : „not supported“ …. the boundaries and responsibilities are clear.  

That said, I certainly would love to look into this …. but i don‘t think my skill set is sufficient , unfortunately. That said , if you could give me started place, area to look into , i would do that … and know possibly another very knowledgeable developer , who could help.  

Great thanks for your help, and keep up with the great Job with Groovy, you all. 


was (Author: chenrici):
Great thanks for the clear answer.  I don‘t think it boils down to futures of the a specific Annotation set … like Lombok, but general. In Java there are some quite valid Annotation Processors since a couple of years. And also simple in-house processors are easily imaginable. As you write „most Lombok annotations …“ … but not all. 

That said, i prefer the clear statement : „not supported“ …. the boundaries and responsibilities are clear.  

That said, I certainly would love to look into this …. but i don‘t think my skill set is sufficient , unfortunately. That said , if you could give me started place, area to look into , i would do that … 

Great thanks for your help, and keep up with the great Job with Groovy, you all. 

> Does Groovy support Java Anntotation Processors? 
> -------------------------------------------------
>
>                 Key: GROOVY-11388
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11388
>             Project: Groovy
>          Issue Type: Question
>            Reporter: Christoph Henrici
>            Priority: Major
>
> My question is simple : Does Groovy support Annotation Processors, like Mapstruct , Lombok or even custom Processors : [https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html] ?
> Something like: 
>  
> {code:java}
> import lombok.Builder
> import lombok.NonNull
> import lombok.Value
> @Value
> @Builder
> class TestE {
> …
> {code}
>  
> Please, no opionated answers, just facts and fact based explanations. There are many confuseing, strongly subjective and optinated posts in the web (Stacktrace and such, and even here), which trend towards no, you don‘t need it, i don't recommend, Lombok is a hack etc etc, but nothing really conclusive, substantial and objective. 
> My Testcase does seems to indicate that at least the Lombok Annotation Processor is not supported , see : [https://github.com/chhex/groovylombok/tree/main]
> But it also may well be, that i am missing something in the Gradle Build. 
> The enviroment i tested in: 
> {code:java}
> $ ./gradlew -versionGradle 7.3.3Build time:   2021-12-22 12:37:54 UTC
> Revision:     6f556c80f945dc54b50e0be633da6c62dbe8dc71Kotlin:       1.5.31
> Groovy:       3.0.9
> Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
> JVM:          17.0.3 (Eclipse Adoptium 17.0.3+7)
> OS:           Mac OS X 13.2.1 aarch64{code}
>  
> Where the Groovy Version used by gradle is the same for the application.
> If this is a redundant post, sorry! I really like Groovy and am using it frequently, it would be just great to have good understanding of it‘s limitations, if that is the case.
> Best thanks for any help. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)