Environment
- CodeGraph version: 0.9.9
- Language: Java
- Project type: Multi-module Gradle project (game server backend)
Description
CodeGraph does not index methods generated by Lombok annotations at compile time.
When using @Getter, @Setter, @Data, @Builder, or similar annotations,
the generated methods (e.g., getXxx(), setXxx(), builder(), equals(),
hashCode(), toString()) do not appear in the symbol index.
This causes call chain analysis to break silently: callers of Lombok-generated
methods cannot be traced back to their target, and the methods appear as
unresolved references when queried via callers or callees.
Steps to Reproduce
- Have a Java class with Lombok annotations:
import lombok.Getter;
import lombok.Data;
@Getter
public class TestBean {
private String dateKey;
private List<Integer> luckyStar;
}
2. Query CodeGraph for the generated getter methods:
codegraph query "getDateKey"
codegraph callers "TestBean.getDateKey"
3. Observe that getDateKey() and getLuckyStar() are not found in
FishSoulLucky.java, even though they are generated by @Getter.
Expected Behavior
CodeGraph should either:
- Option A: Recognize Lombok annotations and synthesize the corresponding
method symbols during indexing (similar to how IDEs like IntelliJ handle this
via the Lombok plugin), or
- Option B: Analyze compiled .class bytecode in addition to source files,
so that annotation-processor-generated methods are visible in the index.
Actual Behavior
Methods generated by Lombok are absent from the symbol index. Queries for
getXxx() / setXxx() / builder() etc. return no results for classes
annotated with @Data, @Getter, @Setter, or @Builder.
Impact
In projects that use Lombok extensively, a large portion of accessor and
builder method calls are invisible to CodeGraph. This significantly degrades
the quality of AI-assisted code analysis, as the agent cannot follow call
chains through Lombok-generated methods and may incorrectly conclude that
a method does not exist.
Workaround
Currently working around this by adding a note to the AI system prompt
instructing the agent to infer Lombok-generated methods from field declarations
and annotations rather than relying on CodeGraph symbol lookup.
Environment
Description
CodeGraph does not index methods generated by Lombok annotations at compile time.
When using
@Getter,@Setter,@Data,@Builder, or similar annotations,the generated methods (e.g.,
getXxx(),setXxx(),builder(),equals(),hashCode(),toString()) do not appear in the symbol index.This causes call chain analysis to break silently: callers of Lombok-generated
methods cannot be traced back to their target, and the methods appear as
unresolved references when queried via
callersorcallees.Steps to Reproduce