Repository navigation
build(deps): Update tree-sitter to 0.26.5 and all grammar dependencies - #1225
Merged
marco-c merged 5 commits intoNov 20, 2026
Merged
Conversation
This was referenced Feb 25, 2026
marlon-costa-dc
force-pushed
the
feature/tree-sitter-0.26.5
branch
2 times, most recently
from
February 25, 2026 13:22
6b8972b to
010c4d2
Compare
Collaborator
|
@marlon-costa-dc the table in your PR description is missing the "From" version of some of the dependencies. |
Collaborator
|
We’ve also lost the regeneration of the |
marco-c
force-pushed
the
feature/tree-sitter-0.26.5
branch
2 times, most recently
from
November 19, 2026 11:14
ecc17bd to
bd713e4
Compare
This was referenced Nov 19, 2026
Regenerate tree-sitter-mozcpp, tree-sitter-mozjs, tree-sitter-preproc and tree-sitter-ccomment with tree-sitter-cli 0.26, syncing the mozcpp and mozjs scanners from tree-sitter-cpp 0.23.4 and tree-sitter-javascript 0.25.0, and bump the grammar crate versions accordingly.
tree-sitter-kotlin-codanna has not been updated since November 2025 and is 135 commits behind the upstream fwcd/tree-sitter-kotlin grammar. tree-sitter-kotlin-sg is ast-grep's mirror of upstream, uses the modern LANGUAGE API (dropping the special-case macro arm), and is far more widely used.
Computing the metrics of mozilla-central for tree-sitter-mozcpp takes more than 2.5 hours per run, and the check runs it twice, so the task kept hitting its 3 hours deadline. Raise both the deadline and maxRunTime of the check tasks to 5 hours.
marco-c
force-pushed
the
feature/tree-sitter-0.26.5
branch
from
November 19, 2026 20:36
8d256cd to
bff11bb
Compare
Computing the metrics of security/manager/ssl/nsSTSPreloadList.inc and third_party/wasm2c/src/prebuilt/lexer-keywords.cc takes hours, because they are parsed into very deep trees and some metrics walk up the ancestors of a node with O(depth) parent lookups. This made the tree-sitter-mozcpp check task always hit its deadline. Exclude them until the underlying problem is fixed (mozilla#1258).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates tree-sitter from 0.25.3 to 0.26.5 and all related grammar/build dependencies.
Dependency updates
Code changes
Node::child()API fix: tree-sitter 0.26 changed parameter fromusizetou32— updatedchild(pos)→child(pos as u32)tree-sitter-kotlin-sg, which exposes the standardLANGUAGEconstant, so no special-case macro arm is neededtree-sitter-mozcpp,tree-sitter-mozjs,tree-sitter-preprocandtree-sitter-ccommentregenerated with tree-sitter-cli 0.26 (scanners synced from tree-sitter-cpp 0.23.4 / tree-sitter-javascript 0.25.0)src/languages/files for new grammar node typesRelated
tree-sitterandtree-sitter-rust#1165 (tree-sitter bump by @alexle0nte)Why tree-sitter-kotlin-sg?
tree-sitter-kotlin-nghas had no commits since its 1.1.0 release in January 2025. The original grammar, fwcd/tree-sitter-kotlin, is actively developed, but its last crates.io release (0.3.8, 2024) only supports tree-sitter < 0.23, and a new release is still pending (fwcd/tree-sitter-kotlin#242).tree-sitter-kotlin-sgis ast-grep's mirror of the fwcd grammar (last synced May 2026, ~2.8M downloads), built ontree-sitter-languageand compatible with tree-sitter 0.26.tree-sitter-kotlin-codanna, used in an earlier revision of this PR, is another fwcd fork, but it hasn't been updated since November 2025 and is 135 commits behind upstream. Once fwcd publishes 0.4.0, we can switch to the upstreamtree-sitter-kotlincrate.Test Plan
cargo checkpassescargo test --workspace)