Skip to content

chore: bump tree-sitter runtime to 0.25 (python/go grammars to match) - #40

Open
qoole wants to merge 4 commits into
NanoNets:mainfrom
qoole:feat/tree-sitter-0.25
Open

chore: bump tree-sitter runtime to 0.25 (python/go grammars to match)#40
qoole wants to merge 4 commits into
NanoNets:mainfrom
qoole:feat/tree-sitter-0.25

Conversation

@qoole

@qoole qoole commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Why

Newer tree-sitter grammars are published against the 0.25 node runtime — every published PowerShell grammar (which we'd like to propose as a new language in a follow-up PR) and the current python/go grammar lines peer-depend on tree-sitter@^0.25. The bump also picks up two years of runtime fixes; among them, the string-parse() size limit that extract.ts's chunked callback works around no longer exists in 0.25 (comment updated; behavior kept).

What

  • tree-sitter ^0.21.1 → ^0.25.0; tree-sitter-python, tree-sitter-go → ^0.25.0. tree-sitter-typescript stays at ^0.23.2 (its latest release).
  • overrides entry for tree-sitter-typescript: its latest release still declares peerOptional tree-sitter@^0.21, which hard-fails a root-project npm install under npm's peer resolution. The override resolves the repo's own install (and npm ci in CI) cleanly. Empirically verified: the 0.23.2 grammar binding loads and parses correctly under runtime 0.25.1.
  • dependabot: ignore tree-sitter-typescript (bumping it independently re-breaks peer resolution), with an explanatory comment.

Evidence

  • Full suite green with zero code changes.
  • Extraction output is byte-identical before/after on two real-world repos (psf/requests: 844 nodes / 1790 edges; spf13/afero: 919 / 2263) — every card, wiring.json, and cache payload; only the extractor fingerprint id changes (intended — it keys cache invalidation).
  • Consumer installs verified from a packed tarball with no flags: local dependency install and global npm i -g both resolve. npm nests a vestigial tree-sitter@0.21 under tree-sitter-typescript (overrides don't propagate to consumers); the CLI was verified to build and query TS/Python/Go correctly in exactly that layout. The nesting disappears once tree-sitter-typescript ships a 0.25-peer release.

@anirudhkumar-nanonets

Copy link
Copy Markdown
Collaborator

Thanks, this is valuable and we’d like to move it forward. Recent changes to main introduced conflicts. Could you rebase onto the latest main, resolve them, and rerun the test suite? We’ll review it promptly afterward.

Newer grammar releases in the tree-sitter ecosystem require the 0.25
runtime, so bump tree-sitter ^0.21.1→^0.25.0 and the Python/Go grammars
to ^0.25.0 to unlock languages whose grammars need it. tree-sitter-typescript
stays pinned at ^0.23.2 (still the latest release) — it declares
peerOptional tree-sitter@^0.21.0, so an npm `overrides` entry pins its
nested tree-sitter to the root one so the repo-root install resolves
cleanly; verified the grammar's native binding still loads and parses
correctly under tree-sitter 0.25.1.

Also updates the stale-parse-limit comment in extract.ts: the chunked
callback parse predates 0.25 (which lifted the 32KB string-parse limit)
and is kept because it's behavior-identical and exercised by existing
tests. No behavior change; full suite green (493/493).
@qoole
qoole force-pushed the feat/tree-sitter-0.25 branch from fa7f604 to 20e9357 Compare August 5, 2026 16:50
@qoole

qoole commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto latest main (c2cc532) and re-ran the suite — 538/538 green. The only conflict was CHANGELOG placement; the bump itself applied cleanly over the new walker and posix-path work.

Use stable syntax-node IDs to avoid duplicate reference edges and align the supported Node version with native Windows prebuilds.

@anirudhkumar-nanonets anirudhkumar-nanonets left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed after the rebase and follow-up compatibility fix. Ubuntu, Windows, and CodeQL checks are green.

@qoole

qoole commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged main (0.9.0) into the branch — the only conflict was CHANGELOG placement, and the bump entry (including the stable-node-ID and Node 22.12 notes from 8899d26) now sits under a fresh Unreleased heading above the 0.9.0 section. Suite is 583/583 green on the merged tree, and the lockfile version header is synced. Should be conflict-free to merge — thanks for the compatibility fix.

Assaf750 added a commit to Assaf750/Graft that referenced this pull request Aug 12, 2026
…and Rust behaviour

Records the verified starting point before any Rust work: PR NanoNets#40/NanoNets#58/NanoNets#59 heads
double-checked via the GitHub API and git ls-remote, strict-containment proof of
the stack, and the finding that the stack carries no upstream CI signal at all.

Suite on the pinned head is 638/645 with 3 failures. All three are an upstream
locale defect (bare toLocaleString() resolving to ar-SA digits), reproduced
verbatim on main and untouched by any Rust commit, so they are attributed
upstream rather than counted as a Rust regression. Fix is deliberately deferred
to its own commit.

Also records measured behaviour on a Cargo workspace fixture: what already
resolves, and the six gaps that Batches B-J exist to close — chiefly that
cross-crate symbol imports never resolve because module-path resolution maps
paths to files only.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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