Bug
Indexing a repository that contains large SQL files (e.g. schema dumps >10K lines, stored procedures) causes the native parser to crash with either:
- A tree-sitter SQL assertion failure
- A stack overflow in the C parser
This crashes the entire indexing pipeline rather than gracefully degrading for that file.
Expected behavior
- Large SQL files that exceed the parser's capacity should be skipped with a warning, not crash the pipeline.
- Alternatively, increase the stack size for the SQL tree-sitter grammar or add a file-size/line-count guard before parsing.
Suggested fix
Add a pre-parse guard in the extraction pipeline:
if (line_count > MAX_SQL_PARSE_LINES) {
log_warn("skipping large SQL file: %s (%d lines)", path, line_count);
return SKIP;
}
Related
Bug
Indexing a repository that contains large SQL files (e.g. schema dumps >10K lines, stored procedures) causes the native parser to crash with either:
This crashes the entire indexing pipeline rather than gracefully degrading for that file.
Expected behavior
Suggested fix
Add a pre-parse guard in the extraction pipeline:
Related