IO-aware eval for server dispatch + compile-modules timeout bump
sx_server.ml: the "eval" command now uses cek_run_with_io instead of raw eval_expr. This handles import suspensions during eval-blob (needed for .sx files with define-library/import wrappers). compile-modules.js: timeout bumped 5min → 10min for sxbc compilation with define-library overhead. 2608/2608 tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1030,7 +1030,9 @@ let rec dispatch env cmd =
|
|||||||
(try
|
(try
|
||||||
let exprs = Sx_parser.parse_all src in
|
let exprs = Sx_parser.parse_all src in
|
||||||
let result = List.fold_left (fun _acc expr ->
|
let result = List.fold_left (fun _acc expr ->
|
||||||
Sx_ref.eval_expr expr (Env env)
|
(* Use IO-aware eval to handle import suspensions *)
|
||||||
|
let state = Sx_ref.make_cek_state expr (Env env) (List []) in
|
||||||
|
cek_run_with_io state
|
||||||
) Nil exprs in
|
) Nil exprs in
|
||||||
(* Use ok-raw with natural list serialization — no (list ...) wrapping.
|
(* Use ok-raw with natural list serialization — no (list ...) wrapping.
|
||||||
This preserves the SX structure for Python to parse back. *)
|
This preserves the SX structure for Python to parse back. *)
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ const t1 = Date.now();
|
|||||||
const result = spawnSync(binPath, [], {
|
const result = spawnSync(binPath, [], {
|
||||||
input: fs.readFileSync(tmpFile),
|
input: fs.readFileSync(tmpFile),
|
||||||
maxBuffer: 100 * 1024 * 1024, // 100MB
|
maxBuffer: 100 * 1024 * 1024, // 100MB
|
||||||
timeout: 300000, // 5 min
|
timeout: 600000, // 10 min
|
||||||
stdio: ['pipe', 'pipe', 'pipe'],
|
stdio: ['pipe', 'pipe', 'pipe'],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user