Skip to content

Releases

nightly: perf(lib): reuse rotated repetition nodes

Choose a tag to compare

@github-actions github-actions released this 17 Nov 05:20
When `ts_subtree_compress` rebalances a repetition, it rotates nodes but
leaves their parse states alone. A rotated node keeps the state it was
pushed in, although it now starts where its new first child does, so it
fails the reuse check and every reparse rebuilds it. Give it its first
child's parse state instead.

That makes rotated nodes reusable, which exposes a rotation that used to
be harmless: a node holding a grammar repetition's content (e.g.
`seq($._statement, $._terminator)`) passes the existing checks, and
rotating it moves part of the content into another node. Only rotate a
grandchild that starts with the repetition. Error repeats only group
skipped trees, so they're exempt.

Reparsing after a one-character edit in an editing session gets 2.5-9x
faster: -88% Rust, -83% TypeScript, -75% C, -66% JavaScript, -59% Python.

v0.27.2

Choose a tag to compare

@github-actions github-actions released this 07 Nov 11:03

What's Changed

  • fix(cli): detect corpus parse errors from the tree by @tree-sitter-ci-bot[bot] in #6030
  • fix(lib): only match the whole name ERROR in ts_language_symbol_for_name by @tree-sitter-ci-bot[bot] in #6031
  • fix(wasm): copy all supertype map entries by @tree-sitter-ci-bot[bot] in #6036
  • fix: Windows symbol visibility backport by @WillLillis in #6051
  • fix(lib): handle terminal ERROR nodes in ts_node_has_error by @tree-sitter-ci-bot[bot] in #6058
  • fix(web): various issues by @tree-sitter-ci-bot[bot] in #6059
  • fix(lib): reject symbol names with embedded NULL suffixes by @tree-sitter-ci-bot[bot] in #6073
  • fix(lib): handle large child indices in reverse cursor traversal by @WillLillis in #6075
  • fix(rust): address new unnecessary-box-pin lint by @tree-sitter-ci-bot[bot] in #6089
  • fix(generate): preserve reserved-word behavior when merging states by @WillLillis in #6094
  • fix(make): don't remove tree-sitter dir on uninstall by @tree-sitter-ci-bot[bot] in #6098
  • backport zig by @clason in #6106
  • build(deps): bump wasmtime-c-api to v48.0.8 by @clason in #6107
  • release v0.27.2 by @clason in #6108

Full Changelog: v0.27.1...v0.27.2

v0.27.1

Choose a tag to compare

@github-actions github-actions released this 08 Oct 17:43

What's Changed

  • fix: decode UTF-16 surrogate pairs with input endianness by @tree-sitter-ci-bot[bot] in #5913
  • fix(cli)!: fix query test capture range matching across lines by @tree-sitter-ci-bot[bot] in #5918
  • fix(rust): address new nightly lints by @tree-sitter-ci-bot[bot] in #5921
  • fix(generate): resolve token names in debug output by @WillLillis in #5941
  • fix(generate): keep GCC jump tables enabled for large lexers by @tree-sitter-ci-bot[bot] in #5985
  • fix(generate): exclude external word tokens from keyword extraction by @WillLillis in #5989
  • fix(lib): check shifted stack versions during error recovery by @tree-sitter-ci-bot[bot] in #5998
  • fix(generate): detect indirect recursion in flattened productions by @WillLillis in #6003
  • fix: preserve column dependency when balancing repeat nodes by @tree-sitter-ci-bot[bot] in #6006
  • perf(lib): acquire capture lists from a free stack instead of scanning by @tree-sitter-ci-bot[bot] in #6012
  • fix(build): don't compile the Wasm stdlib into Emscripten builds by @tree-sitter-ci-bot[bot] in #6015
  • fix: various query issues by @tree-sitter-ci-bot[bot] in #6017
  • fix(rust): ban std::fs::canonicalize by @tree-sitter-ci-bot[bot] in #6018
  • fix(bindings): load Node bindings under Bun again by @tree-sitter-ci-bot[bot] in #6021
  • release v0.27.1 by @clason in #6024

Full Changelog: v0.27.0...v0.27.1

v0.27.0

Choose a tag to compare

@github-actions github-actions released this 30 Aug 17:16
v0.27.0
6070dbf

What's Changed

Read more

v0.26.13

Choose a tag to compare

@github-actions github-actions released this 23 Aug 09:06

What's Changed

  • fix(query): correctly identify MISSING nodes in queries by @tree-sitter-ci-bot[bot] in #5835
  • fix(query): correctly set a state's skipped_quantifier flag when a by @tree-sitter-ci-bot[bot] in #5842
  • fix(generate): fold case-insensitive patterns at the AST leaves by @WillLillis in #5854
  • fix(parser): avoid wide error nodes on unparseable input by @tree-sitter-ci-bot[bot] in #5855
  • fix(ci): run all workspace tests by @WillLillis in #5867
  • build(deps): bump wasmtime-c-api to v36.0.14 by @clason in #5870
  • fix(rust): remove must_use attribute from Tree::changed_ranges by @tree-sitter-ci-bot[bot] in #5877
  • release v0.26.13 by @clason in #5873

Full Changelog: v0.26.12...v0.26.13

v0.26.12

Choose a tag to compare

@github-actions github-actions released this 08 Aug 13:26

What's Changed

  • fix(generate): fold case-insensitive patterns ourselves by @WillLillis in #5761
  • fix(query): keep the trailing anchor when a zero-matched quantifier is anchored on both sides by @tree-sitter-ci-bot[bot] in #5764
  • fix(templates): add C source files to Python sdist by @WillLillis in #5765
  • fix(init): don't lowercase repository url by @tree-sitter-ci-bot[bot] in #5768
  • fix(highlight): use std::sync::OnceCell for various loader fields by @WillLillis in #5785
  • fix(parser): restart recovery for invalid tokens in the error state by @tree-sitter-ci-bot[bot] in #5792
  • Fix associativity resolution with mixed shift precedences by @tree-sitter-ci-bot[bot] in #5796
  • fix(parser): fix parsing bug repeat operator by @tree-sitter-ci-bot[bot] in #5829
  • release v0.26.12 by @clason in #5831

Full Changelog: v0.26.11...v0.26.12

v0.26.11

Choose a tag to compare

@github-actions github-actions released this 12 Jul 10:27

What's Changed

  • fix(deps): zig manifest for wasmtime is missing windows hashes by @tree-sitter-ci-bot[bot] in #5720
  • fix(xtask): eliminate silent errors in zig fetch by @WillLillis in #5724
  • fix(query): short-circuit longest-match dedup for disjoint states by @tree-sitter-ci-bot[bot] in #5726
  • fix(query): various anchor fixes by @tree-sitter-ci-bot[bot] in #5727
  • Fix C++ compilation errors in array macros. by @tree-sitter-ci-bot[bot] in #5735
  • fix(rust): address new clippy lints by @WillLillis in #5743
  • fix(generate): strip non-ASCII case folds by @tree-sitter-ci-bot[bot] in #5744
  • fix(ci): re-set executable permission on release artifacts before zipping by @clason in #5746
  • release v0.26.11 by @clason in #5748

Full Changelog: v0.26.10...v0.26.11

v0.26.10

Choose a tag to compare

@github-actions github-actions released this 28 Jun 16:11
v0.26.10

What's Changed

  • fix(lib): update doc comment for ts_parser_parse by @WillLillis in #5642
  • fix(lib): use correct TREE_SITTER_HIDE_SYMBOLS macro name in alloc.h by @tree-sitter-ci-bot[bot] in #5643
  • fix(cli): improve soundness of cst range calculation by @WillLillis in #5650
  • fix(lib): Consider subtree lookahead bytes when determining whether the parser can reuse a node. by @tree-sitter-ci-bot[bot] in #5656
  • fix(cli): display warning to user if parser test corpus dir isn't found by @tree-sitter-ci-bot[bot] in #5669
  • fix: add DESCRIPTION to grammar Makefile template by @WillLillis in #5672
  • fix(cli): infinite loop in highlight test by @WillLillis in #5674
  • fix(lib): address strict aliasing violations in TreeCursor type by @WillLillis in #5693
  • build(deps): bump wasmtime-c-api to v36.0.12 by @clason in #5709
  • fix(dsl): forbid invalid field names by @WillLillis in #5710
  • Fix issues with queries matching a parent node with anchored children (siblings) by @tree-sitter-ci-bot[bot] in #5712
  • test(query): regression test for anchored siblings inside a parent by @tree-sitter-ci-bot[bot] in #5716
  • release v0.26.10 by @WillLillis in #5717

Full Changelog: v0.26.9...v0.26.10

v0.26.9

Choose a tag to compare

@github-actions github-actions released this 19 May 18:08

What's Changed

  • ci(actions): bump actions/cache to v5 by @tree-sitter-ci-bot[bot] in #5482
  • build(deps): bump wasmtime-c-api to v36.0.7 by @WillLillis in #5514
  • fix(loader): allow filenames with dots by @tree-sitter-ci-bot[bot] in #5538
  • fix(rust): fix new clippy lints by @WillLillis in #5539
  • test: bump c test fixture to v0.24.2 by @tree-sitter-ci-bot[bot] in #5542
  • fix(generate): pass default optimization level in generate_parser_for_grammar by @tree-sitter-ci-bot[bot] in #5543
  • feat(dist): enable install via cargo binstall (#5533) by @clason in #5544
  • Prevent a buffer over-read when parsing 4-byte UTF-16 characters. by @tree-sitter-ci-bot[bot] in #5549
  • fix(query): overflow in capture pool ids + some perf by @tree-sitter-ci-bot[bot] in #5555
  • docs: note zero point unbounded behavior in query functions by @WillLillis in #5563
  • build(deps): bump wasmtime-c-api to v36.0.8 by @clason in #5574
  • fix(cli): account for process versions > 5 in the parse command's pretty debug output. by @tree-sitter-ci-bot[bot] in #5577
  • fix(generate): improve error message for nonterminals used in immediate token rule by @tree-sitter-ci-bot[bot] in #5583
  • fix(generate): rewrite parse_grammar with forward DFS by @WillLillis in #5584
  • fix(wasm): load supertype tables for ABI 15 grammars by @tree-sitter-ci-bot[bot] in #5606
  • build(deps): bump wasmtime-c-api to v36.0.9 by @clason in #5611
  • Validate Wasm language memory reads by @tree-sitter-ci-bot[bot] in #5613
  • release v0.26.9 by @clason in #5612

Full Changelog: v0.26.8...v0.26.9

v0.26.8

Choose a tag to compare

@github-actions github-actions released this 31 Mar 17:53

What's Changed

  • fix(generate): allow disabling qjs-rt feature from CLI by @WillLillis in #5448
  • fix(lib): document invariants that must be upheld for TSInputEdit by @WillLillis in #5452
  • fix(cli): correct typo in parse command's help text by @WillLillis in #5465
  • perf(cli): misc. improvements by @tree-sitter-ci-bot[bot] in #5476
  • Fix wasm loading of languages w/ multiple reserved word sets by @tree-sitter-ci-bot[bot] in #5477
  • generate: avoid panicking when a supertype only has hidden external token children by @tree-sitter-ci-bot[bot] in #5478
  • release v0.26.8 by @clason in #5479

Full Changelog: v0.26.7...v0.26.8