I'm aware this is a consequence of ASTT-phase limitations, but it would be nice if it worked, and the specific case might be relevant to any future updates in how ASTTs are processed.
I have an immutable class I would like to use as a DynamoDB immutable record. The @DynamoDbImmutable class annotation requires a Class builder parameter, so I added @Builder(builderClassName = 'Builder') to my record:
@Builder(builderClassName = 'Builder')
@DynamoDbImmutable(builder = MyRecord.Builder)
class MyRecord {}
This compiles correctly with groovyc, creating both MyRecord.class and MyRecord$Builder.class. However, compiling in Eclipse (even with a full batch, non-incremental build) results in a compilation error (Unresolved compilation problem and no $Builder.class present). This seems to be because the compiler (STC?) is attempting to resolve the parameter before the ASTT gets a chance to create it.
I'm aware this is a consequence of ASTT-phase limitations, but it would be nice if it worked, and the specific case might be relevant to any future updates in how ASTTs are processed.
I have an immutable class I would like to use as a DynamoDB immutable record. The
@DynamoDbImmutableclass annotation requires aClass builderparameter, so I added@Builder(builderClassName = 'Builder')to my record:This compiles correctly with
groovyc, creating bothMyRecord.classandMyRecord$Builder.class. However, compiling in Eclipse (even with a full batch, non-incremental build) results in a compilation error (Unresolved compilation problemand no$Builder.classpresent). This seems to be because the compiler (STC?) is attempting to resolve the parameter before the ASTT gets a chance to create it.