Idea: a warm, shared type-aware service — reuse one resident program across repeated/parallel checks #22969
Faithfinder
started this conversation in
Ideas
Replies: 1 comment
-
|
Hi! Thanks for opening this discussion. I completely agree with this approach, I've had it in the back of my mind for a while, however, have not had the resources or time to start implementing it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
An idea for serving repeated and parallel type-aware checks more cheaply — possibly already on your radar, in which case feel free to point me at the existing plan.
The workload
A coding agent's loop is edit → type-check → read errors → fix → repeat, run often — type errors are the signal it corrects against. In practice that's now several agents, plus the editor and pre-commit hooks, working the same project on one machine at the same time. The traits that matter: high-frequency, parallel, and headless — no human waiting on a UI, just a tool repeatedly asking "what are the errors?"
Why the current model strains under it
Each invocation builds a cold type-aware program with its own checker pool:
--checkers(each checker re-instantiates the shared library surface — Panda/Zod/React Query/etc.; reproducible numbers: microsoft/typescript-go#4201). So one machine runs N× that cost simultaneously.The per-checker duplication is upstream and won't change (TS team: "sharing types between checkers is not a possibility within our current design"). This is orthogonal to that: callers pay the cost N times only because N processes each build their own program.
The idea
A warm, shared type-aware service — one resident program that repeated and parallel callers query, instead of each spawning its own. That collapses N×cost toward ~1× without touching tsgo internals, and turns each repeated check into an incremental update rather than a cold rebuild.
Why this seems to fit oxlint/tsgolint
It lines up with what oxlint/tsgolint already are and where you've already gone:
Sketch (one possibility, not a spec)
--type-checkcommand — hit to get lint + type diagnostics from that one warm program.Happy to share the memory numbers (#4201 is fully reproducible) and the concrete parallel-run pattern behind this.
Beta Was this translation helpful? Give feedback.
All reactions