emscripten
emscripten copied to clipboard
Closure has warnings with wasm2js
I can't find any way to suppress the warnings about WebAssembly being overridden:
building:ERROR: Closure compiler completed with warnings and -sCLOSURE_WARNINGS=error enabled, aborting!
building:ERROR: externs.zip//webassembly.js:29:18: WARNING - [JSC_TYPE_MISMATCH] initializing variable
found : {
CompileError: (typeof WebAssembly.CompileError),
Global: (typeof WebAssembly.Global),
Instance: (typeof WebAssembly.Instance),
LinkError: (typeof WebAssembly.LinkError),
Memory: (typeof WebAssembly.Memory),
Module: (typeof WebAssembly.Module),
RuntimeError: (typeof WebAssembly.RuntimeError),
Table: (typeof WebAssembly.Table),
Tag: (typeof WebAssembly.Tag),
compile: function((ArrayBuffer|ArrayBufferView)): Promise<WebAssembly.Module>,
...
}
required: {
Instance: (typeof WebAssembly.Instance),
Memory: (typeof WebAssembly.Memory),
Module: function((ArrayBuffer|ArrayBufferView)): ?,
RuntimeError: (typeof Error),
instantiate: function((ArrayBuffer|ArrayBufferView), (Object|null)=): Promise<{
instance: WebAssembly.Instance,
module: WebAssembly.Module
}>
}
29| var WebAssembly = {};
^^
0 error(s), 1 warning(s), 57.6% typed
Ideally we would default to warnings as errors but we don't want to do that until we fix our internal warnings: #16205
I am also seeing this warning with `-s WASM=0 -s LEGACY_VM_SUPPORT=1 --closure=1'.
Upstream issue is here: https://github.com/google/closure-compiler/issues/4108