-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wasi-js: warnings are printed to stdout #62
Comments
Looks like that there is a workaround: assign
just before starting wasm. |
Another remark: I got this warning when redirecting stdin to a file. The warning seems to be fairly inappropriate in this case - files never block. It might be better to move the warning a few lines downwards, where you call |
Can you send me a PR changing to warn? I'm happy to quickly review it, merge it, and update the npm package. And I agree with you and see how that output could be annoying. It was something I put in to avoid problems with my interactive REPL work (for https://cowasm.org and https://cowasm.sh) that builds on this. However, it's fine to change Thanks for using wasi-js! |
Here's the relevant code: https://github.com/sagemathinc/cowasm/blob/main/core/wasi-js/src/wasi.ts#L950 |
I'll take a look later today. |
Hello,
I just switched from wasmer to
wasi-js
in the WasiCaml project (https://github.com/remixlabs/wasicaml). There are a lot of scripts running WASI-fied wasm code, and some of them also write to stdout. I found in the stdout of one script the stringwhich causes the further build to fail. Obviously, this warning is from
wasi-js
and printed withconsole.log
which goes to stdout. For scripting, this is very unfortunate - whereas messages in stderr are typically no problem. Can you switch toconsole.warn
orconsole.error
instead?Btw, thanks for picking the code up and maintaining it.
The text was updated successfully, but these errors were encountered: