Uh oh!
There was an error while loading. Please reload this page.
Integrate JiT compilation into CLI runtime - #2211
Conversation
rafal-hawrylak
commented
Jun 19, 2026
Need to address: #2184 (comment) |
ab6f700 to
bf38a43Compare
Solved in: |
e6932c7 to
fbe3490Comparefbe3490 to
05bf715Comparebf7fa50 to
654a9b1Compare654a9b1 to
0437180CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
289c1c2 to
60be915CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- 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.
Use \${e?.message || String(e)} when formatting a JiT compilation
error so an error thrown without a .message field still surfaces
something readable rather than "undefined".
- 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.
- BUILD: order load statements alphabetically to satisfy the
buildifier out-of-order-load lint.
- testing/test.ts: revert DEFAULT_TIMEOUT_MILLIS from 300000 back to
30000. The bump was unintended and would silently extend every
test's per-case timeout to 5 minutes.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).
2453010 to
2f7328cCompare
apilaskowski
left a comment
There was a problem hiding this comment.
Lets also wait for review by @ikholopov-omni
Uh oh!
There was an error while loading. Please reload this page.
…2256) Fixes#2247. PR #2211 (JiT integration) silently changed --timeout from compile-only to a whole-run wall-clock deadline, causing existing runs to exit 1 with no output after the previously-effective compile duration. - Restore --timeout to compile-only (matches 3.0.63 semantics and describe text). - Add --execution-timeout (off by default) for the whole-run deadline. - On TIMED_OUT/CANCELLED, print a top-level reason line so exit 1 is no longer silent; propagate the cancel reason to per-action SKIPPED lines. - When --timeout is passed without --execution-timeout, print an advisory notice pointing at the new flag (JSON output unaffected).
#2184 with extracted refactorings.