TypeScript: calls through interface members (incl. prototype-installed mixins) produce no CALLS edge to the implementation
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- devtools
Direção de pesquisa
Start by tracing the TypeScript LSP hybrid call resolution path for the lsp_ts_method strategy and how it handles interface member targets that are not graph nodes. Then inspect the graph relationships and module-level calls described in the issue to see how implementations and prototype-installed mixins can be found. Done means interface calls produce edges to implementation candidates, or at minimum retain a CALL_REFERENCE when unresolved; the issue names no test file, so locate the relevant resolver tests.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Bug/feature: TypeScript calls through interface members are not attributed to implementations
Version: codebase-memory-mcp v0.12.1 (linux-amd64-portable), TypeScript project, LSP hybrid resolution
(strategy: lsp_ts_method on edges). Related: #2893 (C#: calls through interfaces / virtual members not
attributed to implementers), #2789 (TypeScript call resolution fixes).
What happens
A method call on a parameter typed with an interface produces no CALLS edge at all. The LSP resolves the
call to the interface member signature, which is not a node, so the edge is dropped silently. trace_path
outbound of the caller therefore misses the real implementation.
Minimal example
// contract.ts
export interface RegistryOperations {
replaceCredential(providerId: string, raw: unknown): Promise<Snapshot>
}
// operations.ts
export const credentialOperations = {
replaceCredential(this: Registry, providerId: string, raw: unknown): Promise<Snapshot> { /* ... */ },
}
// registry.ts
import { credentialOperations } from './operations'
export class Registry { /* state */ }
export interface Registry extends RegistryOperations {}
installOperations(Registry.prototype, credentialOperations) // Object.assign-style mixin
// handler.ts
export async function replaceModelCredential(registry: Registry | undefined, providerId: string, req: Request) {
const input = await req.json()
return registry!.replaceCredential(providerId, input) // <- no CALLS edge
}
Observed:
trace_path(function_name="…replaceModelCredential", direction="outbound")listsreq.jsonstyle callees but
notreplaceCredential.MATCH (f)-[r]->(g) WHERE f.name='replaceModelCredential' RETURN type(r), g.name→ onlyUSAGE Registry
(the type), no call edge; noCALL_REFERENCEeither.- The implementation exists as a
Functionnode (operations.replaceCredential), the class has an
IMPLEMENTSedge toRegistryOperations, and the module-level callinstallOperations(Registry.prototype, …)
is captured as a Module → CALLS edge with its arguments.
Expected
When the LSP target is an interface member, resolve to the implementations: classes with IMPLEMENTS (or
declaration-merged classes of the same name) that define the method; if none, members installed on the
prototype by module-level Object.assign(X.prototype, obj) / mixin helpers (object-literal members of obj).
Several implementations → several edges with a lower confidence (or a candidates count), as the resolver
already does for other ambiguous strategies. At minimum, an unresolved call should leave a CALL_REFERENCE with
the member name so that consumers can resolve it themselves.
- Linguagem predominante
- C
- Estrelas
- 45.8k
- Forks
- 3.8k
- Merge médio
- 2d 18h
- PRs com merge (30d)
- 108
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de DeusData/codebase-memory-mcp
-
bug ux/behavior
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
DeusData/codebase-memory-mcp#3191 ·
Mantenedores costumam responder em até 1 dia
-
documentation enhancement parsing/quality ux/behavior
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 82/100
DeusData/codebase-memory-mcp#3131 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
hook-augment: the five-row cap keeps the first five search_graph rows, so variables and modules displace function definitions (v0.12.1)Talvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertabug editor/integration parsing/quality ux/behavior
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
DeusData/codebase-memory-mcp#3062 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Generated client files (AGENTS.md block, SKILL.md) teach a call syntax no harness can executeAbertabug documentation editor/integration parsing/quality
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
DeusData/codebase-memory-mcp#3050 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
editor/integration parsing/quality
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
DeusData/codebase-memory-mcp#2286 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de DeusData/codebase-memory-mcp
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
NVIDIA/open-gpu-kernel-modules#1635 ·
Mantenedores costumam responder em até 1 dia
-
iOS: the "Edit controls" button never hides, even with a controller connected, and covers the gameAbertagame: 010065A014024000 ios
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
seedds/nxnative#3714 · 1 comentário ·
Mantenedores costumam responder em até 2 dias