Skip to content

Conversation

@marlon-costa-dc
Copy link

Summary

Update major dependencies to their latest versions:

  • tree-sitter: 0.25.3 → 0.26.3
  • tree-sitter-javascript: 0.23.1 → 0.25.0
  • tree-sitter-python: 0.23.6 → 0.25.0
  • tree-sitter-rust: 0.23.2 → 0.24.0
  • askama: 0.14 → 0.15

Also updates tree-sitter version in all subcrates (tree-sitter-preproc, tree-sitter-ccomment, tree-sitter-mozcpp, tree-sitter-mozjs).

Changes

  1. Cargo.toml updates - Main crate and enums crate dependencies
  2. Subcrate Cargo.toml updates - dev-dependencies for tree-sitter
  3. Regenerated language enums - Using updated tree-sitter grammars
  4. API adaptation - Node.child() now takes u32 instead of usize in tree-sitter 0.26
  5. Clippy fixes - Fixed collapsible_if and lifetime elision warnings

Testing

  • cargo check passes
  • cargo clippy -- -D warnings passes
  • ✅ All tests pass

This PR is part of splitting #1206 into separate focused PRs as requested.

Copilot AI review requested due to automatic review settings January 19, 2026 21:40
Copy link

Copilot AI left a 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 related language grammar dependencies to maintain compatibility with the new tree-sitter version.

Changes:

  • Updated tree-sitter core library and language grammars (JavaScript, Python, Rust) to their latest versions
  • Adapted code to handle tree-sitter 0.26 API changes where Node.child() now expects u32 instead of usize
  • Applied clippy fixes using let-chain syntax to simplify nested if-let patterns
  • Regenerated language enum files from updated grammars

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 23 comments.

Show a summary per file
File Description
Cargo.toml Updated tree-sitter and language grammar dependencies to latest versions
enums/Cargo.toml Updated tree-sitter, askama, and language grammar dependencies
tree-sitter-*/Cargo.toml Updated tree-sitter dev-dependencies in subcrates
src/node.rs Added u32 cast for Node.child() and explicit lifetime annotations
src/traits.rs Added explicit lifetime annotation to get_root() return type
src/parser.rs Added explicit lifetime annotation to get_root() return type
src/tools.rs Applied clippy fix for collapsible_if pattern
src/metrics/*.rs Applied clippy fixes converting nested if-let to let-chain syntax
src/getter.rs Applied clippy fixes converting nested if-let to let-chain syntax
src/find.rs Applied clippy fix converting nested if-let to let-chain syntax
src/checker.rs Applied clippy fix converting nested if-let to let-chain syntax
src/alterator.rs Applied clippy fix converting nested if-let to let-chain syntax
src/languages/*.rs Regenerated language enum files with updated grammar node types

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@marlon-costa-dc marlon-costa-dc force-pushed the deps/tree-sitter-0.26 branch 2 times, most recently from cfe33ee to 8d1e922 Compare January 19, 2026 22:14
@Luni-4
Copy link
Collaborator

Luni-4 commented Jan 19, 2026

@marlon-costa-dc

Thank you! Could you move all the clippy changes into a separate PR? That PR should be the first one to land, since it’s not related to the updates.

Update major dependencies:
- tree-sitter: 0.25.3 -> 0.26.3
- tree-sitter-javascript: 0.23.1 -> 0.25.0
- tree-sitter-python: 0.23.6 -> 0.25.0
- tree-sitter-rust: 0.23.2 -> 0.24.0
- askama: 0.14 -> 0.15

Also update tree-sitter version in all subcrates.
Regenerate language enums to match new grammar versions.
Fix tree-sitter API change: Node.child() now takes u32 instead of usize.
@marlon-costa-dc
Copy link
Author

Done! Clippy fixes have been moved to a separate PR: #1211

This PR now only contains the dependency version updates and the minimal code changes required for tree-sitter 0.26.3 API compatibility (Node.child() now takes u32 instead of usize).

@marlon-costa-dc
Copy link
Author

⚠️ CI Failure Note

This PR is failing CI due to 18 pre-existing clippy warnings in the upstream codebase (e.g., collapsible_if warnings).

These warnings are not introduced by this PR - they exist in the current master branch and are fixed by PR #1211.

Dependency: This PR requires #1211 to be merged first for CI to pass.

What this PR actually changes:

  • Updates tree-sitter to 0.26.3
  • Updates related dependencies (tree-sitter-java, tree-sitter-typescript, etc.)
  • Updates askama to 0.15
  • Regenerates language enum files with proper formatting

Once #1211 is merged, this PR's CI should pass.

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