Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codelens-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
python-version: '3.12'
- name: Install dependencies
run: pip install pyyaml tree-sitter pytest
run: pip install pyyaml "tree-sitter>=0.21.0,<0.26" pytest
- name: Run full benchmarks
run: python3 benchmarks/run_benchmarks.py
- name: Check regression
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/codelens-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tree-sitter pyyaml pytest pytest-cov pygls lsprotocol
# tree-sitter pinned <0.26: core 0.26.0 changed Node lifetime handling
# and causes a native use-after-free SIGSEGV in tree_sitter_python._binding
# even on shallow files (issue #235). python_parser.py's keep_alive
# mitigation is insufficient for 0.26; 0.25.x is known-safe.
pip install "tree-sitter>=0.21.0,<0.26" pyyaml pytest pytest-cov pygls lsprotocol
# Install optional grammar packages for full parser coverage
pip install tree-sitter-python tree-sitter-javascript tree-sitter-html tree-sitter-css || true
pip install tree-sitter-typescript tree-sitter-rust || true

- name: Run test suite
run: |
# ulimit -s unlimited prevents SIGSEGV from tree-sitter's internal C
# recursion on deeply-nested ASTs (issue #235, test_large_file_parsing.py)
ulimit -s unlimited
cd scripts && python -m pytest ../tests/ -v --tb=short \
--ignore=../tests/test_integration.py

Expand All @@ -68,7 +69,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tree-sitter pyyaml
pip install "tree-sitter>=0.21.0,<0.26" pyyaml
pip install tree-sitter-python tree-sitter-javascript tree-sitter-html tree-sitter-css || true
pip install tree-sitter-typescript tree-sitter-rust || true

Expand Down Expand Up @@ -98,7 +99,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tree-sitter pyyaml
pip install "tree-sitter>=0.21.0,<0.26" pyyaml
pip install tree-sitter-python tree-sitter-javascript tree-sitter-html tree-sitter-css || true
pip install tree-sitter-typescript tree-sitter-rust || true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codelens-sarif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tree-sitter pyyaml
pip install "tree-sitter>=0.21.0,<0.26" pyyaml
pip install tree-sitter-python tree-sitter-javascript tree-sitter-html tree-sitter-css || true
pip install tree-sitter-typescript tree-sitter-rust || true

Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ classifiers = [
]

dependencies = [
"tree-sitter>=0.21.0",
# Upper-bound <0.26: tree-sitter core 0.26.0 changed Node lifetime handling,
# causing a native use-after-free SIGSEGV in the grammar bindings even on
# shallow files (issue #235). Remove the cap once python_parser.py's
# keep_alive strategy is made 0.26-safe.
"tree-sitter>=0.21.0,<0.26",
]

[project.optional-dependencies]
Expand Down
Loading