emscripten-core / emscripten-core/emscripten

Closure has warnings with wasm2js

Open
#17,080 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

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,
...
}
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.