Java: index Lombok-generated members, so calls to them resolve by type
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?
- Lingua principale
- C
- Stelle
- 45.8k
- Fork
- 3.8k
- Merge medio
- 3g 14h
- PR unite (30g)
- 210
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DeusData/codebase-memory-mcp
-
bug editor/integration stability/performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
DeusData/codebase-memory-mcp#2818 ·
I maintainer di solito rispondono entro 2 giorni
-
Generated Pi extension (cbmem.ts) breaks Gemini/Antigravity: Type.Union of Type.Literal serializes to anyOf/constForse già presa @divakantpandey l’ha presa 2 giorni fa. Apertabug editor/integration
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DeusData/codebase-memory-mcp#2787 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
editor/integration parsing/quality
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
DeusData/codebase-memory-mcp#2286 ·
I maintainer di solito rispondono entro 2 giorni
-
install writes an unsupported `args` key into the Claude Code SubagentStart hook, so it never runsApertabug editor/integration priority/high stability/performance ux/behavior
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DeusData/codebase-memory-mcp#2239 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
bug priority/high ux/behavior
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DeusData/codebase-memory-mcp#2232 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di DeusData/codebase-memory-mcp
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
[cmocka] update to 2.0.2Apertaupdate-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
msys2/MINGW-packages#33004 ·
I maintainer di solito rispondono entro 1 giorno
-
area:buffer good first issue type:documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sudo-project/sudo#586 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
OpenPrinting/cups#1795 ·
I maintainer di solito rispondono entro 1 giorno