Hmm, regarding the error messages being improved, I think I'm seeing the new error message format, but the confusing thing is that the important information is at the top, and often scrolled out of the terminal window. Most of the text at the end where one scans for errors is a JS_Parse_Error exception callstack which is basically useless information.
I also had cases where the "error cursor" is far off (but I guess that's a problem with uglify-js).
cpc6128.dir/roms/cpc-roms.c.o -o /Users/floh/projects/fips-deploy/chips-test/wasm-ninja-release/cpc6128.html examples/libcommon.a && :
JS optimizer error:
Unexpected token name, expected punc (line: 1596, col: 110, pos: 56577)
================================
function __sapp_js_focus_textfield(){ document.getElementById("_sokol_app_input_element").focus(); }
function __sapp_js_unfocus_textfield(){ document.getElementById("_sokol_app_input_element").blur(); }
function __saudio_js_buffer_frames(){ if (Module._saudio_node) { return Module._saudio_node.bufferSize; } else { return 0; } }
function __saudio_js_init(sample_rate,buffer_size){ Module._saudio_context = null; Module._saudio_node = null; if (typeof AudioContext !== 'undefined') { Module._saudio_context = new AudioContext({ sampleRate: sample_rate, latencyHint: 'interactive', }); console.log('sokol_audio.h: created AudioContext'); } else if (typeof webkitAudioContext !== 'undefined') { Module._saudio_context = new webkitAudioContext({ sampleRate: sample_rate, latencyHint: 'interactive', }); console.log('sokol_audio.h: created webkitAudioContext'); } else { Module._saudio_context = null; console.log('sokol_audio.h: no WebAudio support'); } if (Module._saudio_context) { console.log('sokol_audio.h: sample rate ', Module._saudio_context.sampleRate); Module._saudio_node = Module._saudio_context.createScriptProcessor(buffer_size, 0, 1); Module._saudio_node.onaudioprocess = function pump_audio(event) { var buf_size = event.outputBuffer.length; var ptr = Module.ccall('_saudio_emsc_pull', 'number', ['number'], [buf_size]); if (ptr) { var chan = event.outputBuffer.getChannelData(0); for (var i = 0; i < buf_size; i++) { var heap_index = (ptr>>2) + i; chan[i] = HEAPF32[heap_index]; } } }; Module._saudio_node.connect(Module._saudio_context.destination); return 1; } else { return 0; } }
function __saudio_js_sample_rate(){ if (Module._saudio_context) { return Module._saudio_context.sampleRate; } else { return 0; } }
function _args_emsc_parse_url(){ var params = new URLSearchParams(window.location.search).entries(); for (let p of params) { var kvp = p.value[0] + '=' + p.value[1]; varres = Module.ccall('args_emsc_add', 'void', ['string'], [kvp]); } }