Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/componentize.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export async function componentize(
}

let postProcess;
let postProcessName;
if (opts.enableAot) {
// Determine the weval bin path, possibly using a pre-downloaded version
let wevalBin;
Expand All @@ -302,6 +303,7 @@ export async function componentize(
env.RUST_MIN_STACK = defaultMinStackSize();
}

postProcessName = `weval (${wevalBin})`;
postProcess = spawnSync(
wevalBin,
[
Expand All @@ -323,6 +325,7 @@ export async function componentize(
);
} else {
const wizerBin = opts.wizerBin ?? wizer;
postProcessName = `wizer (${wizerBin})`;
postProcess = spawnSync(
wizerBin,
[
Expand All @@ -345,9 +348,15 @@ export async function componentize(
}

// If the wizer (or weval) process failed, parse the output and display to the user
if (postProcess.status !== 0) {
let wizerErr = parseWizerStderr(postProcess.stderr);
let err = `Failed to initialize component:\n${wizerErr}`;
if (postProcess.status !== 0 || postProcess.signal) {
let procErr = parseWizerStderr(postProcess.stderr);
if (postProcess.signal) {
procErr += `\nProcess was killed by signal: ${postProcess.signal}`;
Comment thread
vados-cosmonic marked this conversation as resolved.
}
if (postProcess.error) {
procErr += `\nProcess error: ${postProcess.error.message}`;
}
let err = `Failed to initialize component (${postProcessName}):\n${procErr}`;
if (debugBindings) {
err += `\n\nBinary and sources available for debugging at ${workDir}\n`;
} else {
Expand Down
Loading