[FEATURE REQUEST] add flag to make missing primitives a compilation failure
zbaylin opened this issue · 2 comments
Is your feature request related to a problem? Please describe.
When you generate a bc.js
file in something like CI, it is possible that someone accidentally depended on native code for which there are no JS stubs but no one sees the warning for it. Right now this is always a runtime failure (--disable genprim
just doesn't generate the exception-raising stubs).
Describe the solution you'd like
A flag similar to --disable genprim
which turns missing primitives into a compiler error. This would mean CI builds would fail if native libraries were unintentionally depended upon.
I think this should be pretty simple, as another condition could be added to this if
statement. I can submit a PR for this, but I'd like some input as to whether or not a compiler flag is the correct way to handle this and what it should be called if so.
Have you tried using--warnError
I'm pretty sure --warnError
is what you want. Reopen if not.