Skip to content

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

Open

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).

Activity

  1. added
    enhancement
    help wanted
    on Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions