Skip to content

Large TypeScript files silently produce zero Function/Module nodes #213

@digijoebz

Description

@digijoebz

Description

Large TypeScript files are indexed (a File node is created) but tree-sitter parsing silently fails — no Module, Function, Method, Variable, or Interface nodes are produced. No error is reported to the user.

Reproduction

Indexing a TypeScript/Deno project with these files:

File Size Lines Result
universal-dca-logic.ts 236 KB 4,437 File node only — zero children
trade-executor/index.ts 406 KB 8,406 File node only — zero children
dca-health-check/index.ts 182 KB 4,234 File node only — zero children
AdminDCAOptimizer.tsx 688 KB 8,517 File node only — zero children
ClientSuccess.tsx 321 KB 6,243 File node only — zero children

Files of similar or larger size in the same project DO index successfully:

File Size Nodes Indexed
scalping-optimizer.worker.ts 173 KB 101
AdminBotUpgrade.tsx 168 KB 39
AdminScalpingOptimizer.tsx 178 KB 21

Impact

The 3 most critical business logic files (containing the core trading algorithm, trade execution pipeline, and health monitoring) are completely invisible to search_graph, trace_call_path, and get_code_snippet. Call graph analysis stops at these file boundaries.

Environment

  • Version: 0.5.7
  • OS: Linux 6.8.0-107-generic
  • Language: TypeScript/Deno

Suspected Cause

The binary contains the string userconfig.file_too_large and Expression tree is too large (maximum depth %d), suggesting an internal limit based on AST complexity rather than raw file size. The failure appears to be in the parse phase — the file walker creates the File node but tree-sitter parsing never completes.

Related issues: #130 (quadratic ts_node_child loop on large ASTs), #62 (stack overflow on large files)

Expected Behavior

Either: successfully index these files (preferred), or report a clear warning/error that the file was skipped due to size/complexity limits so users know their index is incomplete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparsing/qualityGraph extraction bugs, false positives, missing edges

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions