Hi, it seems that using lombok's @SuperBuilder annotation with the latest (3.2.0) spring-boot is not compatible when running within a GraalVM native image.
The exception I get:
Error:
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException:
Builder class `com.example.lombok.dto.PullRequestConfig$PullRequestConfigBuilderImpl`
does not have build method (name: 'build')
Here's an example repo: https://github.com/Haarolean/lombok-graal
How to reproduce: 1. mvn -DskipTests --no-transfer-progress clean package -Pnative 2. Run ./target/lombok
Comment From: mhalbritter
I don't think there's anything Spring Boot can do to help here. We don't inspect every class and generate reflection hints for it.
If you need to use @SuperBuilder in a GraalVM image, you should use the RuntimeHints API to register reflection hints.
Comment From: Haarolean
@mhalbritter hi, thanks for a reply. What about the org.springframework.boot.configurationprocessor.LombokPropertyDescriptor class? It seems the behavior you're describing is actually being done there, but not the builder annotations.
Comment From: mhalbritter
This is only for generating the JSON metadata files from configuration property classes (@ConfigurationProperties). That won't help you with the problem you're having.
Comment From: chrismgrayftsinc
I think the actual problem is probably the @Jacksonized annotation, which generates code like @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "", buildMethodName = "build").
(Not that it changes the outcome of this ticket, but it suggests a different workaround)