The Bug Where Node 20 Could Only Parse Rust

●1 ●11 ●41
calendar_today ago • schedule1 min read

A TokenCap bug story.

On Node 20, only Rust parsed. JS, TS, Python, Go and Java silently fell back to text heuristics for function boundaries.

Cause: a warm-up loaded every Tree-sitter grammar in parallel. On Node 20, web-tree-sitter 0.24 linked the symbols of concurrently loaded grammars into each other. One survived. Node 24 tolerated it, so it hid.

Fix: load grammars one at a time through a promise queue. Packs are now identical on Node 18 and 20.

New test: warm all grammars at once, assert every language parses.

Lesson: a fallback that never logs is a bug that never reports. TokenCap's build record now lists which layers built or failed, so a broken layer shows up without a debug flag.

More at tokencap.vansharora.app

Want more deep dives?

Join 6,016+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

More Posts

Cisco's Amy Chang: A Model's "Passport" Doesn't Tell You Where It Actually Came From

Tom Smithverified - Aug 27

Stop invoking the whole graph to test one node: unit tests and checkpoints for my LangGraph agent

VEACESLAV - Nov 10

Why Are There Only 13 DNS Root Servers For The Whole World? Is that a problem

richarddjarbeng - May 7

Only 10 Vol.26.09| 10 AI Projects Worth Watching This Week

aiomniu - Sep 14

Why Email-Only Contact Forms Are Failing in 2026 (And What Developers Should Do Instead)

JayCode - Mar 2
chevron_left
1.8k Points • 53 Badges
Jaipur, India • t.co/BRmkFprjYq
19Posts
9Comments
15Connections
tech freak

Related Jobs

View all jobs →

Commenters (This Week)

4 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!