-
Notifications
You must be signed in to change notification settings - Fork 59
build(deps): Update tree-sitter to 0.26.3 and related dependencies #1214
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
base: master
Are you sure you want to change the base?
build(deps): Update tree-sitter to 0.26.3 and related dependencies #1214
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates tree-sitter from 0.25.3 to 0.26.3 and updates all related grammar dependencies. The changes include switching the Kotlin grammar from the unmaintained tree-sitter-kotlin-ng to tree-sitter-kotlin-codanna v0.3.9, updating JavaScript, Python, and Rust grammars, and making necessary API compatibility changes for tree-sitter 0.26.
Changes:
- Updates tree-sitter core to 0.26.3 and adapts code for API breaking changes (Node::child now requires u32)
- Switches Kotlin grammar to tree-sitter-kotlin-codanna with updated macro support
- Updates grammar dependencies: JavaScript (0.25.0), Python (0.25.0), Rust (0.24.0), and regenerates language enum files
Reviewed changes
Copilot reviewed 33 out of 34 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Updates tree-sitter to 0.26.3 and grammar dependencies |
| enums/Cargo.toml | Updates tree-sitter and grammar dependencies for enums crate |
| src/node.rs | Adds u32 cast for Node::child() API change |
| src/macros.rs | Adds Kotlin grammar special case macro |
| src/tools.rs | Removes redundant parentheses (style improvement) |
| src/langs.rs | Updates Kotlin grammar reference |
| enums/src/macros.rs | Updates Kotlin grammar reference |
| enums/src/languages.rs | Updates Kotlin grammar reference |
| tree-sitter-*/Cargo.toml | Bumps versions and updates tree-sitter dev-dependency |
| tree-sitter-*/package.json | Updates tree-sitter-cli to 0.25.4 |
| tree-sitter-*/bindings/rust/README.md | Documentation (needs updating) |
| tree-sitter-*/src/parser.c | Regenerated parser files |
| tree-sitter-*/src/tree_sitter/parser.h | Removes duplicate typedef declaration |
| src/languages/*.rs | Regenerated language enum files from updated grammars |
| .claude/* | Development cache files (should not be committed) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.claude/tsc-cache/42477325-6b38-44cc-a989-103be7b72118/affected-repos.txt
Outdated
Show resolved
Hide resolved
.claude/tsc-cache/42477325-6b38-44cc-a989-103be7b72118/edited-files.log
Outdated
Show resolved
Hide resolved
- Update tree-sitter from 0.25.4 to 0.26.3 - Switch tree-sitter-kotlin-ng to tree-sitter-kotlin-codanna 0.3.9 - Update tree-sitter-javascript to 0.25.0 - Update tree-sitter-python to 0.25.0 - Update tree-sitter-rust to 0.24.0 - Regenerate language enums for all grammars - Fix Node::child() parameter type for tree-sitter 0.26 API
0cbbbe2 to
d295339
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
This PR updates tree-sitter from 0.25.x to 0.26.3 and updates all related grammar dependencies. It builds upon the work started in PR #1165 by @alexle0nte.
Dependency updates:
tree-sitter-kotlin-ngtotree-sitter-kotlin-codanna0.3.9Origin
Based on PR #1165 by @alexle0nte which updated tree-sitter to 0.25.4. This PR:
tree-sitter-kotlin-codanna(more actively maintained)What it does
src/languages/for updated grammarsNode::child()now requiresu32parameter (wasusize)tree_sitter_kotlin_codanna::language()instead of::LANGUAGEconstantImplementation decisions
Why tree-sitter-kotlin-codanna?
The previous
tree-sitter-kotlin-ngcrate is no longer maintained.tree-sitter-kotlin-codanna(v0.3.9) provides:language()function instead ofLANGUAGEconstantAPI compatibility fix
Tree-sitter 0.26 changed
Node::child(index)to requireu32:Macro changes
Added special case in
get_language!macro for Kotlin:Related PRs
tree-sitterandtree-sitter-rust#1165 (tree-sitter 0.25.4 update)Test plan
🤖 Generated with Claude Code