Skip to content

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

Closed

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.

Activity

  1. DeusData commented on Apr 7, 2026

    @DeusData
    Owner

    Hey, thanks for publishing the issue. I will tackle this immediately after the 15th of April :)

  2. added
    bugSomething isn't working
    parsing/qualityGraph extraction bugs, false positives, missing edges
    on Apr 15, 2026
  3. DeusData commented on May 31, 2026

    @DeusData
    Owner

    Verified fixed on v0.7.0. Large TS files no longer silently produce a childless File node — I added extract_large_ts_has_functions_issue213 which extracts a synthetic ~256 KB / 4,000-function TypeScript file and asserts Function nodes are produced (>0); it passes. The root cause (tree-sitter read past the source buffer on large inputs) was fixed by the parse-buffer padding in v0.7.0. Closing — if a specific large file still yields zero children on v0.7.0, please attach it and I'll add it as a case. 🙏

  4. added a commit that references this issue on May 31, 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

    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