ReviewOS

home-lang/home

Transpiler: report duplicate-binding error floods without stack overflow

#580
Closed chris opened this 10 days ago ·
10 days ago

Follow-up to #66 and #574 from the unchanged pinned Bun transpiler corpus at source pin 4982b91e3702094330f3be3883354c52b8c01323.

After native parser stack bounds are initialized, the duplicate-binding flood case terminates safely but returns Error: Maximum call stack size exceeded instead of the expected AggregateError. This indicates the parser/error conversion path still does excessive recursive work while collecting a large diagnostic set.

Port the upstream linear-time diagnostic handling. Acceptance: the unchanged parse error flood > reports duplicate-binding floods in linear time case returns an AggregateError, produces no stderr, stays within its existing timeout, and does not weaken the stack-overflow guards tracked by #574.

10 days ago

Resolved by e4f0212a21b8d607a8f7feeaada87d5adad38f8c. Home now uses Bun’s four-cursor per-log line/column tracker, including the duplicate-symbol note path, and no longer rejects total delimiter count as nesting. The unchanged 356 KB diagnostic flood passes in about 302 ms instead of being killed at 60 seconds; the focused 400-statement regression also returns AggregateError with duplicate-declaration diagnostics.

Sign in to comment on this issue.