chore(text area): prepare for tree-sitter breaking changes#5965
chore(text area): prepare for tree-sitter breaking changes#5965TomJGooding wants to merge 5 commits into
Conversation
Temporarily install tree-sitter from GitHub to test against breaking changes before v0.25.0 is released on PyPI.
Fix breaking change in tree-sitter v0.25.0 where `Query.captures` has been moved to `QueryCursor.captures`. Related PR: tree-sitter/py-tree-sitter#333
|
This apparently causes some (strange?) changes in the syntax highlighting, which is why the snapshot tests are failing: snapshot report; https://github.com/Textualize/textual/actions/runs/16304923238/artifacts/3540275570 |
|
This might have revealed a possible bug in the current Python syntax highlighting. It looks like any variables are currently being highlighted as |
`lua-match` is specific to tree-sitter in Neovim. Currently these query predicates are ignored so highlight much more they should!
|
This actually revealed another bug, where the query predicates were being ignored so highlighting much more they should! After the fix in b85d4f3, the failing snapshots look much better: https://github.com/Textualize/textual/actions/runs/16349424666/artifacts/3556076660 |
| run: | | ||
| poetry run pytest tests -v --cov=./src/textual --cov-report=xml:./coverage.xml --cov-report term-missing -m 'not syntax' | ||
| if: ${{ matrix.python-version == '3.8' }} | ||
| if: ${{ matrix.python-version == '3.8' || matrix.python-version == '3.9' }} |
There was a problem hiding this comment.
Perhaps time to drop support for Python 3.8 - it's been end-of-life for a long time now.
Important
DO NOT MERGE!
Temporarily install tree-sitter from GitHub to test against breaking changes before v0.25.0 is released on PyPI.
Please review the following checklist.