Skip to content

Fix tree-sitter version compatibility with tree-sitter-languages#20

Merged
brobertsaz merged 1 commit intobrobertsaz:mainfrom
illAssad:fix/tree-sitter-version-compatibility
Dec 9, 2025
Merged

Fix tree-sitter version compatibility with tree-sitter-languages#20
brobertsaz merged 1 commit intobrobertsaz:mainfrom
illAssad:fix/tree-sitter-version-compatibility

Conversation

@illAssad
Copy link
Contributor

@illAssad illAssad commented Dec 9, 2025

Summary

  • Pin tree-sitter to 0.20.x for compatibility with tree-sitter-languages 1.10.x
  • The tree-sitter 0.21+ API changed Parser() and Language() constructors, breaking tree-sitter-languages
  • This was causing __init__() takes exactly 1 argument (2 given) errors on all file parsing

Problem

Selective indexing was completely broken because TreeSitter failed to parse any files:

Failed to parse /path/to/file.tsx: __init__() takes exactly 1 argument (2 given)

This resulted in 0 symbols being extracted, making the "top 20% important files" selection return 0 files.

Solution

Pin tree-sitter to >=0.20.0,<0.21.0 until tree-sitter-languages is updated to support the new API.

Test plan

  • Verified tree-sitter 0.20.4 works with tree-sitter-languages 1.10.2
  • Tested selective indexing completes successfully (87 files indexed)
  • Verified TreeSitter parses files without errors

Pin tree-sitter to 0.20.x because tree-sitter-languages 1.10.x is
incompatible with tree-sitter 0.21+. The 0.21+ API changed Parser()
and Language() constructors, causing '__init__() takes exactly 1
argument (2 given)' errors on all file parsing operations.

This fix restores selective indexing functionality which relies on
TreeSitter for code parsing and symbol extraction.
@brobertsaz brobertsaz merged commit 90297ca into brobertsaz:main Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments