Java: index Lombok-generated members, so calls to them resolve by type
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start by reading the Java extraction and type-aware resolver paths, then inspect the existing tests for generated definitions and name-index registration. The issue describes Lombok annotation and builder cases, but does not name files or tests. Done means Lombok-generated members resolve by type, are excluded from the by-name index, and the generated definition and registration behavior is covered by tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What problem does this solve?
Lombok writes getters, setters, builders and withers at compile time, so the source has no declaration for invoice.getNumber() or Invoice.builder().number("1").build(). The graph has no node for them, the type-aware resolver cannot find them, and the call binds by name to any project method that happens to share it.
// src/com/example/model/Invoice.java
@Data @Builder
public class Invoice { private String number; private boolean paid; }
// src/com/example/model/Report.java: an unrelated class
public class Report {
public String getNumber() { return "r"; }
public static Report builder() { return new Report(); }
}
// src/com/example/app/Caller.java
public String number(Invoice invoice) { return invoice.getNumber(); }
public Invoice make() { return Invoice.builder().number("1").paid(true).build(); }
On main (v0.12.0): number → Report.getNumber (unique_name); make → the fields Invoice.number and Invoice.paid (suffix_match, unique_name); builder() and build() get no edge. On a real Spring service with Lombok, about 8,300 generated members are missing, and Dto.builder() calls bind to whichever project class has the first builder by name.
Proposed solution
In extraction, for a class or field with a Lombok annotation, add the members Lombok would generate as Method (and builder Class) definitions, marked generated and tagged "lombok" in their properties:
- only annotations that the file's imports make Lombok's (
import lombok.Data;,import lombok.*;, or@lombok.Data); Spring's@Valuegenerates nothing; - a member the source declares by name is not generated, as Lombok itself skips it;
@Getter,@Setter,@Data,@Value(fields final unless@NonFinal),@With,AccessLevel.NONE; then@Builder/@SuperBuilder(also on records,@Builder.Default, builder options) and@Accessors(fluent, chain, prefix);- registered by QN only: generated members never enter the by-name index, so the name guess can never pick one; only the type-aware resolver reaches them. On the measured service, registering them by name as well let the name guess land 14,061 extra
suffix_matchedges on them.
Cost on that service, measured for this together with two smaller resolver fixes: index time about +0.5 s (+10 %), DB +52 MB (+21 %), mostly the generated nodes and their edges.
I have this implemented in two parts (accessors first, then builders and @Accessors), each with tests, and would like a maintainer view before opening the PRs: is a generated member in the definition list acceptable, and is QN-only registration the right way to keep it out of the name guess?
- Lenguaje dominante
- C
- Estrellas
- 45.8k
- Forks
- 3.8k
- Merge medio
- 3 d 6 h
- PR fusionados (30 d)
- 201
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de DeusData/codebase-memory-mcp
-
Generated Pi extension (cbmem.ts) breaks Gemini/Antigravity: Type.Union of Type.Literal serializes to anyOf/constPosiblemente ocupada @divakantpandey la tomó hace 1 día. Abiertobug editor/integration
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
DeusData/codebase-memory-mcp#2787 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
editor/integration parsing/quality
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
DeusData/codebase-memory-mcp#2286 ·
Los mantenedores suelen responder en 2 días
-
install writes an unsupported `args` key into the Claude Code SubagentStart hook, so it never runsAbiertobug editor/integration priority/high stability/performance ux/behavior
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
DeusData/codebase-memory-mcp#2239 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
bug priority/high ux/behavior
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
DeusData/codebase-memory-mcp#2232 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
documentation editor/integration parsing/quality priority/normal
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
DeusData/codebase-memory-mcp#2169 ·
Los mantenedores suelen responder en 2 días
Todos los issues de DeusData/codebase-memory-mcp
Issues similares
-
[CLI] Clarify distinction between 'capture camera' and 'capture screen' in help text and outputAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
espressif/esp-vision#18 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 61/100
HexaCluster/credcheck#94 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
JS_SetPropertyInternal2 loses the value when a lazy property on the prototype runs out of memoryAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quickjs-ng/quickjs#1852 ·
Los mantenedores suelen responder en 2 días