[
https://issues.apache.org/jira/browse/CALCITE-4787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17421096#comment-17421096
]
Jacques Nadeau commented on CALCITE-4787:
-----------------------------------------
[~vlsi], I appreciate the desire but frankly my gradle/intellij skills are not
really there. I think it requires something like the junk below but really need
your help to make it work. Basically, one can run the compiler with the
-proc:only option and it will only do annotation processing, not compilation.
This seems similar to the javacc generation tasks so I've pulled from there.
But I'm not clear what all needs to be configured. Help please?
{code:java}
val annotationProcessor by tasks.registering(JavaCompile::class) {
options.compilerArgs.add("-proc:only")
}
ide {
// generate annotation processed files on project import.
fun generatedSource(compile: TaskProvider<JavaCompile>, sourceSet: String) {
if (compile.get().options.annotationProcessorGeneratedSourcesDirectory
!= null) {
generatedJavaSources(
compile.get(),
compile.get().options.annotationProcessorGeneratedSourcesDirectory,
sourceSets.named(sourceSet)
)
}
}
generatedSource(annotationProcessor, "main")
generatedSource(annotationProcessor, "test")
} {code}
> Evaluate use of Immutables instead of ImmutableBeans
> ----------------------------------------------------
>
> Key: CALCITE-4787
> URL: https://issues.apache.org/jira/browse/CALCITE-4787
> Project: Calcite
> Issue Type: Improvement
> Reporter: Jacques Nadeau
> Assignee: Jacques Nadeau
> Priority: Major
> Labels: pull-request-available
> Time Spent: 5h 40m
> Remaining Estimate: 0h
>
> In the creation of CALCITE-3328, [Immutables|https://immutables.github.io/]
> was discussed as an alternative to a custom implementation. This ticket is to
> evaluate the impact to the codebase of changing. Ideally, introduction of
> immutables would both add flexibility and reduce the amount of code
> associated with these classes.
> Immutables works via annotation processor which means that it is should be
> relatively seamless to build systems and IDEs.
> The switch would also make it easier to work with these objects types in the
> context of aot compilation tools like GraalVM.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)