Integrate JiT compilation into CLI runtime#2211
Open
rafal-hawrylak wants to merge 6 commits into
Open
Conversation
Collaborator
Author
|
Need to address: #2184 (comment) |
rafal-hawrylak
force-pushed
the
pr4c-jit-runtime
branch
from
June 22, 2026 09:26
ab6f700 to
bf38a43
Compare
Collaborator
Author
Solved in: |
rafal-hawrylak
force-pushed
the
pr4c-jit-runtime
branch
3 times, most recently
from
July 2, 2026 09:30
e6932c7 to
fbe3490
Compare
rafal-hawrylak
force-pushed
the
pr4c-jit-runtime
branch
from
July 6, 2026 12:43
fbe3490 to
05bf715
Compare
rafal-hawrylak
force-pushed
the
pr4c-jit-runtime
branch
3 times, most recently
from
July 15, 2026 11:55
bf7fa50 to
654a9b1
Compare
rafal-hawrylak
force-pushed
the
pr4c-jit-runtime
branch
from
July 15, 2026 12:06
654a9b1 to
0437180
Compare
ikholopov-omni
requested changes
Jul 15, 2026
rafal-hawrylak
force-pushed
the
pr4c-jit-runtime
branch
from
July 15, 2026 14:07
0437180 to
e5a6d9c
Compare
- base_worker: drop redundant undefined guard around clearTimeout
(clearTimeout(undefined) is a documented no-op). Restore
runWorker's timeoutMillis to a required number and drop the
conditional setTimeout — matches main's contract; the earlier
loosening to number|undefined let JiT workers run without any
timeout when --jit-timeout was omitted.
- jit/compiler.ts: default timeoutMillis to
DEFAULT_COMPILATION_TIMEOUT_MILLIS at the .compile() entry point
(mirrors CompileChildProcess.compile), so JiT workers always
have a timeout even without --jit-timeout.
- build.ts: replace unsafe (action as any).jitCode cast with a
narrowing "jitCode" in action check.
- run.ts: flatten the outer try/catch that only wrapped the JiT-compile
try; the JiT-compile block already has its own try/catch. Extract the
action.tableType -> dataform.TableType mapping into tableTypeEnum.
- constants.ts: revert DEFAULT_COMPILATION_TIMEOUT_MILLIS to 60000
(main's value); the per-JiT timeout is configurable via
--jit-timeout.
- compiler.ts: keep the Array.from(response) conversion (child.send
uses JSON IPC by default, which serializes Uint8Array as
{"0":n,...} and Buffer.from() rejects that) but add a comment
documenting the constraint.
rafal-hawrylak
force-pushed
the
pr4c-jit-runtime
branch
from
July 16, 2026 05:34
289c1c2 to
60be915
Compare
Each JiT compile registered a cancel handler on the Runner's EventEmitter but never removed it once the compile finished. A run with N JiT actions therefore accumulated N stale listeners and eventually tripped the default MaxListenersExceededWarning threshold. Register the handler through a local variable and remove it in a finally block so successful and failed compiles both clean up. Also drops a stray trailing-whitespace line from the dryRun compiledSql branch (comment #2).
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.
#2184 with extracted refactorings.