tree-sitter breaking changes
Updated December 4, 2026
On this page
Latest version 0.27.2, released November 7, 2026. Source repository
Packages on crates.io run on Rust. Rust end of life dates.
tree-sitter 0.27.0 breaking changes
- Removed
Package.swift
Package.swift is no longer provided, so Swift Package Manager users of the generated grammars lose this support. github.com - Behavior changed
generate_parser_for_grammar
Grammars with invalid byte class patterns now fail to generate, which may break existing grammars. github.com - Behavior changed
Language.load
Language::load in the web binding now accepts a URL, which is an addition and not a breaking change, so this entry is excluded. github.com - Behavior changed
LookaheadIterator
The LookaheadIterator implementation was reworked in a breaking way, so code relying on its previous behavior may need to change. github.com - Behavior changed
Node.child_count
The Rust Node::child_count method now returns u32 instead of its previous type, so callers using the old integer type must convert the value. github.com - Behavior changed
tree-sitter test
When a library path is passed the CLI no longer loads all languages via config, which changes how existing invocations behave. github.com - Behavior changed
Tree.changed_ranges
The must_use attribute was removed from Tree::changed_ranges, so callers no longer get a compiler warning for ignoring its result. github.com - Behavior changed
ts_parser_parse
An incomplete parse now returns NULL rather than false, which changes the returned value callers may check. github.com - Configuration changed
LLVM 23 replaces the wasm32-wasi target with wasm32-wasip1, so the flags used by tree-sitter build --wasm must be updated. github.com - Signature changed
The public error enum of the generate crate was altered, and named aliases that collide with a canonical supertype are now rejected with an error instead of panicking. github.com - Signature changed
tree_sitter::Language::field_name_for_id
Was fn field_name_for_id(&self, field_id: u16) -> Option<&'static str>; now fn field_name_for_id(&self, field_id: u16) -> Option<&str>. crates.io - Signature changed
tree_sitter::Language::name
Was fn name(&self) -> Option<&'static str>; now fn name(&self) -> Option<&str>. crates.io - Signature changed
tree_sitter::Language::node_kind_for_id
Was fn node_kind_for_id(&self, id: u16) -> Option<&'static str>; now fn node_kind_for_id(&self, id: u16) -> Option<&str>. crates.io - Signature changed
tree_sitter::LookaheadIterator::current_symbol
Was fn current_symbol(&self) -> u16; now fn current_symbol(&self) -> Option<u16>. crates.io - Signature changed
tree_sitter::LookaheadIterator::current_symbol_name
Was fn current_symbol_name(&self) -> &'static str; now fn current_symbol_name(&self) -> Option<&str>. crates.io - Signature changed
tree_sitter::LookaheadIterator::iter_names
Was fn iter_names(&mut self) -> impl Iterator<Item = &'static str> + '_; now fn iter_names(&mut self) -> impl iter::FusedIterator<Item = &str> + '_. crates.io - Signature changed
tree_sitter::Node::child_count
Was fn child_count(&self) -> usize; now fn child_count(&self) -> u32. crates.io - Signature changed
tree_sitter::Node::field_name_for_child
Was fn field_name_for_child(&self, child_index: u32) -> Option<&'static str>; now fn field_name_for_child(&self, child_index: u32) -> Option<&'tree str>. crates.io - Signature changed
tree_sitter::Node::field_name_for_named_child
Was fn field_name_for_named_child(&self, named_child_index: u32) -> Option<&'static str>; now fn field_name_for_named_child(&self, named_child_index: u32) -> Option<&'tree str>. crates.io - Signature changed
tree_sitter::Node::grammar_name
Was fn grammar_name(&self) -> &'static str; now fn grammar_name(&self) -> &'tree str. crates.io - Signature changed
tree_sitter::Node::kind
Was fn kind(&self) -> &'static str; now fn kind(&self) -> &'tree str. crates.io - Signature changed
tree_sitter::Node::language
Was fn language(&self) -> LanguageRef; now fn language(&self) -> LanguageRef<'tree>. crates.io - Signature changed
tree_sitter::QueryCaptures
Was struct QueryCaptures<'query, 'tree: 'query, T: TextProvider<I>, I: AsRef<[u8]>>; now struct QueryCaptures<'query, 'tree, 'options, T: TextProvider<I>, I: AsRef<[u8]>>. crates.io - Signature changed
tree_sitter::QueryCursor::captures
Was fn captures<'query, 'cursor: 'query, 'tree, T: TextProvider<I>, I: AsRef<[u8]>>(&'cursor mut self, query: &'query Query, node: Node<'tree>, text_provider: T) -> QueryCaptures<'query, 'tree, T, I>; now fn captures<'query, 'cursor... crates.io - Signature changed
tree_sitter::QueryCursor::captures_with_options
Was fn captures_with_options<'query, 'cursor: 'query, 'tree, T: TextProvider<I>, I: AsRef<[u8]>>(&'cursor mut self, query: &'query Query, node: Node<'tree>, text_provider: T, options: QueryCursorOptions) -> QueryCaptures<'query, 'tree, T... crates.io - Signature changed
tree_sitter::QueryCursor::matches
Was fn matches<'query, 'cursor: 'query, 'tree, T: TextProvider<I>, I: AsRef<[u8]>>(&'cursor mut self, query: &'query Query, node: Node<'tree>, text_provider: T) -> QueryMatches<'query, 'tree, T, I>; now fn matches<'query, 'cursor: 'query... crates.io - Signature changed
tree_sitter::QueryCursor::matches_with_options
Was fn matches_with_options<'query, 'cursor: 'query, 'tree, T: TextProvider<I>, I: AsRef<[u8]>>(&'cursor mut self, query: &'query Query, node: Node<'tree>, text_provider: T, options: QueryCursorOptions) -> QueryMatches<'query, 'tree, T... crates.io - Signature changed
tree_sitter::QueryMatch::captures
In the Rust bindings, code that reads the field m.captures must call the method m.captures() instead. crates.io - Signature changed
tree_sitter::QueryMatches
Was struct QueryMatches<'query, 'tree: 'query, T: TextProvider<I>, I: AsRef<[u8]>>; now struct QueryMatches<'query, 'tree, 'options, T: TextProvider<I>, I: AsRef<[u8]>>. crates.io - Signature changed
tree_sitter::set_allocator
Was unsafe fn set_allocator(new_malloc: Option<unsafe extern "C" fn(size: usize) -> *mut c_void>, new_calloc: Option<unsafe extern "C" fn(nmemb: usize, size: usize) -> *mut c_void>, new_realloc: Option<unsafe extern "C" fn(ptr: *mut... crates.io - Signature changed
tree_sitter::TreeCursor
Was struct TreeCursor<'cursor>(ffi::TSTreeCursor, PhantomData<&'cursor ()>); now struct TreeCursor<'tree>(ffi::TSTreeCursor, PhantomData<&'tree ()>). crates.io - Signature changed
tree_sitter::TreeCursor::field_name
Was fn field_name(&self) -> Option<&'static str>; now fn field_name(&self) -> Option<&'tree str>. crates.io - Signature changed
tree_sitter::TreeCursor::node
Was fn node(&self) -> Node<'cursor>; now fn node(&self) -> Node<'tree>. crates.io - Signature changed
tree_sitter::TreeCursor::reset
Was fn reset(&mut self, node: Node<'cursor>); now fn reset(&mut self, node: Node<'tree>). crates.io - Signature changed
ts_set_allocator
ts_set_allocator now accepts one optional Allocator object rather than four separate optional function pointers, so existing calls must be updated. github.com
tree-sitter 0.26.9 breaking changes
- Behavior changed
The docs were updated to note zero point unbounded behavior in query functions; no code change is described. github.com
tree-sitter 0.26.2 breaking changes
- Removed
tree_sitter::Language::version
Use abi_version instead. crates.io - Removed
tree_sitter::Parser::cancellation_flag
tree_sitter::Parser::cancellation_flag was removed in tree-sitter 0.26.2 crates.io - Removed
tree_sitter::Parser::parse_utf16
Use parse_utf16_le instead. crates.io - Removed
tree_sitter::Parser::parse_utf16_with
Use parse_utf16_le_with_options instead. crates.io - Removed
tree_sitter::Parser::parse_with
Use parse_with_options instead. crates.io - Removed
tree_sitter::Parser::set_cancellation_flag
tree_sitter::Parser::set_cancellation_flag was removed in tree-sitter 0.26.2 crates.io - Removed
tree_sitter::Parser::set_timeout_micros
tree_sitter::Parser::set_timeout_micros was removed in tree-sitter 0.26.2 crates.io - Removed
tree_sitter::Parser::timeout_micros
tree_sitter::Parser::timeout_micros was removed in tree-sitter 0.26.2 crates.io - Removed
tree_sitter::QueryCursor::set_timeout_micros
tree_sitter::QueryCursor::set_timeout_micros was removed in tree-sitter 0.26.2 crates.io - Removed
tree_sitter::QueryCursor::timeout_micros
tree_sitter::QueryCursor::timeout_micros was removed in tree-sitter 0.26.2 crates.io
And 8 more in this version. Sign up to see every change
tree-sitter 0.26.1 breaking changes
- Removed
Deprecated C library functions were removed in this release, so code calling them must be updated. github.com - Removed
--emit=lib
The --emit=lib option was removed from the generate command. github.com - Removed
--no-bindings
The deprecated --no-bindings flag was removed from the generate command. github.com - Renamed
DecodeFunction
The C type was renamed, so code referencing DecodeFunction must use TSDecodeFunction. github.com - Renamed
stage
The stage flag was renamed to emit, so scripts using the old flag must be updated. github.com - Renamed
tree-sitter.js
The web bindings file was renamed, so imports of tree-sitter.js must point to web-tree-sitter.js. github.com - Behavior changed
Query predicates that do not end in ! or ? are now rejected by an assertion, so existing queries may fail. github.com - Behavior changed
The build.zig file was upgraded to Zig 0.15, so builds using older Zig versions may need changes. github.com - Behavior changed
--grammar-path
When --grammar-path is passed, parsers are now rebuilt by default, which changes how existing commands behave. github.com - Configuration changed
Grammar generation from a file is now behind a feature flag, so users must enable it to keep using it. github.com
And 4 more in this version. Sign up to see every change
tree-sitter 0.25.0 breaking changes
- Removed
The Python bindings no longer support Python 3.9. Use a newer Python version. github.com - Removed
The CLI no longer migrates older tree-sitter.json configuration files. github.com - Removed
The CLI no longer migrates older tree-sitter.json files. Update such files by hand. github.com - Removed
tree_sitter::Node::child_containing_descendant
Use child_with_descendant instead. crates.io - Removed
ts_node_child_containing_descendant
The function was removed. Use ts_node_child_with_descendant instead, which has nearly the same behavior but can also return the descendant. github.com - Renamed
QueryMatch.pattern
In the web bindings, the pattern property of QueryMatch is renamed to patternIndex to match other bindings. github.com - Behavior changed
The Swift bindings were updated with breaking changes; check your Swift integration after upgrading. github.com - Behavior changed
The web bindings library was rewritten in TypeScript, which may change its typings and behavior for existing code. github.com - Behavior changed
UTF-16 input endianness is now handled properly, which can change parse results for UTF-16 input. github.com - Behavior changed
Parser
Parser is no longer the default export; you must import it by name and still call Parser.init() before use. github.com
And 4 more in this version. Sign up to see every change
Related packages
- tree-sitter-highlight
- github.com/tree-sitter/tree-sitter on Swift Package Index
- tree-sitter on vcpkg
- tree-sitter-cli on vcpkg
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.