Repository navigation
perf!: regenerate the python parser for runtime 13 - #43
Merged
Merged
Conversation
Regenerate the parser with the WillBooster/tree-sitter v13.0.0 CLI and require runtime 13.0.0 (ABI 0x57420009) in npm, Cargo, and documentation. Co-authored-by: WillBooster (Claude Code) <agent@willbooster.com>
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.
Why
WillBooster/tree-sitter v13.0.0 splits terminal and goto rows, packs each parse action into one word, stores default gotos for states that training never visits, and pops single-path reductions without the general stack walk. Runtime 13 rejects parsers generated for older ABIs, so this grammar must be regenerated with the v13.0.0 CLI to keep loading. Syntax trees are unchanged.
tree-sitter-python.wasm(--optimization z)src/parser.cshrinks from 1,301,842 B to 1,131,501 B.Requirements
^13.0.0as the npm peer dependency, because the parser carries ABI0x57420009, which only runtime 13.x loads.willbooster-tree-sitter-python10, because this breaking change releases the next major version.Customer Summary
The npm package and the crate now require
@willbooster/web-tree-sitter/willbooster-tree-sitter13.0.0 or later within 13.x; older runtimes refuse to load the parser. The shipped Wasm is 22.5% smaller. Parse results are the same.Technical Summary
src/parser.candsrc/tree_sitter/parser.hare regenerated byscript/generate(profile-guided) with the v13.0.0 CLI; regenerating twice produces identical output.package.json,bun.lock,Cargo.toml, andCargo.locklock runtime 13.0.0;script/runtime-versionprints13.0.0.README.mdandbindings/rust/lib.rsstate the new runtime requirement and docs.rs link.Testing
bun run verify: passed (code-gauge reports only pre-existing violations outside this change).bun wb test: 22 files, 39 tests passed (node and browser projects, including Wasm, workerd, corpus, examples, incremental, and performance tests).cargo test --locked: passed.