Skip to content

ocaml/zig: no tags.scm — symbols come from the node-kind walker fallback, call edges are absent #197

Description

@Frankie-Xu

Status

OCaml (.ml/.mli) and Zig (.zig) are already registered in the breadth-tier GENERIC_LANGS table, but they have no vendored src/graph/queries/<lang>.scm. generic.ts says so explicitly:

These ship a tags.scm (calls + symbols); ocaml/zig have none and use the node-kind walker fallback (symbols only) — still one row, zero query.

The walker mints symbols from node-kind suffixes. It does not emit @reference.call, so graft callers on these languages has no edges to walk — same-file calls never resolve.

This is the same hole Dart had before #153 / #134: language is on the registry, grammar warms, but without a tags query the graph is symbols-only.

Plan

Two independent PRs, each adding one language the way #153 added Dart (query + generic-extract fixture; drop-not-guess — only AST shapes confirmed against the WASM grammar):

  1. OCamlocaml.scm: @definition.function (let / let rec with a parameter, or fun body), @definition.module, @definition.type, @reference.call on application_expression. No infix/|>/@@ (noisy; not a call node).
  2. Zigzig.scm: function_declaration, const+struct_declaration, named test_declaration, call_expression.

Each PR: one .scm + tests + the generic.ts comment line for that language. No registry-row changes (both langs are already registered).

I'll follow up with the PRs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions