c-tier loader: TEMPORARY debug log of every Module.print arg
The deployed loader emits chunks with currentOnChunk(line + '\n'),
which my node tests confirm produces clean per-line chunks
('tick 0\n', 'tick 1\n', ...). But fox still reports horizontal
output in his playground tab — same tier, same loop, same loader
hash on the wire (verified via curl). Browser caches and module
loaders are aggressive enough that hard-refresh isn't always
enough.
Adding a temporary console.log inside Module.print so when fox
opens DevTools and re-runs the throttled loop he can see (a) is
the print callback firing at all? and (b) what does Emscripten
hand us — is it actually 'tick 0' or something stranger like
'tick 0\n' or 'tick' + ' 0' as two calls?
Will revert this once the bug is resolved.
EOF
)
This commit is contained in:
parent
32d38754f8
commit
3cfed5e3c5
4 changed files with 24 additions and 0 deletions
|
|
@ -30,13 +30,19 @@ async function _bootstrap() {
|
|||
let outBuf = [];
|
||||
let errBuf = [];
|
||||
let currentOnChunk = null;
|
||||
// Temporary debug — log every Module.print invocation so we can
|
||||
// see exactly what Emscripten passes us (with/without trailing
|
||||
// newline). Remove once the streaming-newline bug is resolved.
|
||||
const DEBUG_STREAM = true;
|
||||
const module = await createLumbdaC({
|
||||
locateFile: (p) => wasmDir + p,
|
||||
print: (line) => {
|
||||
if (DEBUG_STREAM) console.log("[c-tier print]", JSON.stringify(line));
|
||||
outBuf.push(line);
|
||||
if (currentOnChunk) currentOnChunk(line + "\n");
|
||||
},
|
||||
printErr: (line) => {
|
||||
if (DEBUG_STREAM) console.log("[c-tier printErr]", JSON.stringify(line));
|
||||
errBuf.push(line);
|
||||
if (currentOnChunk) currentOnChunk(line + "\n");
|
||||
},
|
||||
|
|
|
|||
|
|
@ -30,13 +30,19 @@ async function _bootstrap() {
|
|||
let outBuf = [];
|
||||
let errBuf = [];
|
||||
let currentOnChunk = null;
|
||||
// Temporary debug — log every Module.print invocation so we can
|
||||
// see exactly what Emscripten passes us (with/without trailing
|
||||
// newline). Remove once the streaming-newline bug is resolved.
|
||||
const DEBUG_STREAM = true;
|
||||
const module = await createLumbdaC({
|
||||
locateFile: (p) => wasmDir + p,
|
||||
print: (line) => {
|
||||
if (DEBUG_STREAM) console.log("[c-tier print]", JSON.stringify(line));
|
||||
outBuf.push(line);
|
||||
if (currentOnChunk) currentOnChunk(line + "\n");
|
||||
},
|
||||
printErr: (line) => {
|
||||
if (DEBUG_STREAM) console.log("[c-tier printErr]", JSON.stringify(line));
|
||||
errBuf.push(line);
|
||||
if (currentOnChunk) currentOnChunk(line + "\n");
|
||||
},
|
||||
|
|
|
|||
|
|
@ -30,13 +30,19 @@ async function _bootstrap() {
|
|||
let outBuf = [];
|
||||
let errBuf = [];
|
||||
let currentOnChunk = null;
|
||||
// Temporary debug — log every Module.print invocation so we can
|
||||
// see exactly what Emscripten passes us (with/without trailing
|
||||
// newline). Remove once the streaming-newline bug is resolved.
|
||||
const DEBUG_STREAM = true;
|
||||
const module = await createLumbdaC({
|
||||
locateFile: (p) => wasmDir + p,
|
||||
print: (line) => {
|
||||
if (DEBUG_STREAM) console.log("[c-tier print]", JSON.stringify(line));
|
||||
outBuf.push(line);
|
||||
if (currentOnChunk) currentOnChunk(line + "\n");
|
||||
},
|
||||
printErr: (line) => {
|
||||
if (DEBUG_STREAM) console.log("[c-tier printErr]", JSON.stringify(line));
|
||||
errBuf.push(line);
|
||||
if (currentOnChunk) currentOnChunk(line + "\n");
|
||||
},
|
||||
|
|
|
|||
|
|
@ -30,13 +30,19 @@ async function _bootstrap() {
|
|||
let outBuf = [];
|
||||
let errBuf = [];
|
||||
let currentOnChunk = null;
|
||||
// Temporary debug — log every Module.print invocation so we can
|
||||
// see exactly what Emscripten passes us (with/without trailing
|
||||
// newline). Remove once the streaming-newline bug is resolved.
|
||||
const DEBUG_STREAM = true;
|
||||
const module = await createLumbdaC({
|
||||
locateFile: (p) => wasmDir + p,
|
||||
print: (line) => {
|
||||
if (DEBUG_STREAM) console.log("[c-tier print]", JSON.stringify(line));
|
||||
outBuf.push(line);
|
||||
if (currentOnChunk) currentOnChunk(line + "\n");
|
||||
},
|
||||
printErr: (line) => {
|
||||
if (DEBUG_STREAM) console.log("[c-tier printErr]", JSON.stringify(line));
|
||||
errBuf.push(line);
|
||||
if (currentOnChunk) currentOnChunk(line + "\n");
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue