Handle foreign-owned compile artifacts

This commit is contained in:
udo
2026-07-19 05:20:08 +00:00
parent 4f010d37a0
commit ccbe945d62
7 changed files with 201 additions and 15 deletions
+7 -1
View File
@@ -3801,9 +3801,15 @@ private:
{
u64 remaining_ms = self->invocation_remaining_ms();
bool timed_out = false;
bool ok = remaining_ms > 0 && unit_compile_bounded(context, request["path"].to_string(), remaining_ms, &timed_out);
String compile_error;
bool ok = remaining_ms > 0 && unit_compile_bounded(context, request["path"].to_string(), remaining_ms, &timed_out, &compile_error);
if(timed_out || remaining_ms == 0)
return(Trap(self->invocation_timeout_error()));
if(!ok && compile_error != "")
{
response["error"] = compile_error;
printf("(!) unit_compile failed for %s: %s\n", request["path"].to_string().c_str(), compile_error.c_str());
}
response["ok"].set_bool(ok);
}
else if(op == "call")