New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build(deps): bump tree-sitter and treesitter-c to 0.20.1 #16402
Conversation
Two test failures:
|
The tests fail because the pattern index changed ( for pattern, match in cquery:iter_matches(tree:root(), 0) do
-- can't transmit node over RPC. just check the name and range
local mrepr = {}
for cid,node in pairs(match) do
table.insert(mrepr, {cquery.captures[cid], node:type(), node:range()})
end
table.insert(res, {pattern, mrepr}) Probably the pattern index should be removed in the last line of both tests. Sorry, for adding it in the first place! |
Thanks for looking at this!
I don't know anything about these tests, so a very explicit change suggestion would be helpful. Do you mean just removing the line |
Sorry, there seems to be a real problem here
Thought at first sight that only the indices were switched. Can look into this tonight. |
Yep, looks like some nodes are just missing (the second failing test makes that clearer): But |
Pretty strange. I did a clean build and the tests are failing the same way as on CI. But tree-sitter itself seems to be working normally Apparently, we're loosing all anonymous in the tests (does |
This continues to work
|
|
But using |
So, these queries
([_] @plus (#vim-match? @plus "^\\\\+$")) That way we are able to match any anonymous nodes, otherwise |
Looks like changing all (I can still change to the new syntax if somebody tells me exactly what to write ;)) |
the other syntax update would be to change |
Change query to include anonymous nodes (`(_)` -> `[_]`) and use new syntax (`{vim,lua}.match?`->`#{vim,lua}.match?`)
Like so? |
@clason yes, that's it! |
@stsewd Will this bump have ramifications for nvim-treesitter? Will those queries need to be updated, too? |
All checks pass -- even Windows! Now we have to merge ;) |
AFAIK we don't have queries like those, but if we did, it should be easy to fix. (I run the nightly version of tree-sitter locally, and haven't seen any errors) |
This bumps
tree-sitter
from a fixed pre-release commit to v0.20.1, and similarly fortreesitter-c
(the bundled C parser).Two tests had to be updated to the latest query API.