Skip to content

Improve call-graph resolution accuracy (methods, ambiguity, anonymous callers) #25

Description

@DataDave-Dev

Call resolution is name-based (no type info), which causes several inaccuracies. Track them together:

  • Method calls treated as free functions (jslike.ts): widget.render() captures only render and links it to any render def → wrong/missing edges.
  • Ambiguous calls dropped silently (shared.ts:141-155): when a name is defined in several files and none is imported, the edge is omitted with no diagnostic.
  • Anonymous-callback attribution (shared.ts:42-55): a call inside arr.map(() => foo()) is attributed to the nearest named ancestor, not the callback.

At minimum, document these limitations; ideally improve heuristics (e.g. prefer same-file/imported defs, emit a low-confidence edge instead of dropping).


La resolución de llamadas es por nombre (sin tipos), lo que genera varias imprecisiones. Se agrupan:

  • Métodos tratados como funciones libres (jslike.ts): widget.render() captura solo render y lo enlaza a cualquier render → aristas incorrectas o perdidas.
  • Llamadas ambiguas descartadas en silencio (shared.ts:141-155): si un nombre está en varios archivos y ninguno se importa, la arista se omite sin aviso.
  • Atribución en callbacks anónimos (shared.ts:42-55): una llamada en arr.map(() => foo()) se atribuye al ancestro nombrado más cercano, no al callback.

Mínimo: documentar estas limitaciones; ideal: mejorar heurísticas (preferir defs del mismo archivo/importadas, emitir arista de baja confianza en vez de descartar).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions