Add a default for JS_ENGINES#9542
Conversation
| show('Calling generated program...') | ||
| try: | ||
| info = shared.run_js(js_file[1]).splitlines() | ||
| info = shared.run_js(js_file[1], shared.NODE_JS).splitlines() |
There was a problem hiding this comment.
is this needed? the other change in this PR will ensure JS_ENGINES exists with at least node. so it seems like this line would use node anyhow, and we can avoid hard-coding it here?
There was a problem hiding this comment.
But I want to avoid depending on JS_ENGINES. Its less error prone if we run these internal tools always under node, and never under some other engine. We should probably have a helper for this and compiler.js and any other internal js tools.. where we want to always use node regardless of JS_ENGINES.
There was a problem hiding this comment.
But I admit its redundant, I fixed this is two ways.
There was a problem hiding this comment.
I don't feel strongly about this, but I do think it's unnecessary information to say "node" here. This file doesn't care about node, it just needs some JS engine to run in.
Or am I missing something with node's importance here?
There was a problem hiding this comment.
OK I'll leave this out of this change, but I do want to be clear that outside of testing we only support node. For compiler.js etc.. and here.
Since we are guaranteed that `NODE_JS` is part of the config (since all users need this) we can set a sensible default for `JS_ENGINES`. This default was supposed to be part of #9469, but a bug meant the code was dead and it was removed in #9499. `JS_ENGINES` is needed for any users that want to run test code. Fix `gen_struct_info.py` to explicitly use NODE_JS since this is the only engine we expect users to have installed and the only one we officially support outside of test code.
9cdeee7 to
71372a5
Compare
Since we are guaranteed that `NODE_JS` is part of the config (since all users need this) we can set a sensible default for `JS_ENGINES`. This default was supposed to be part of emscripten-core#9469, but a bug meant the code was dead and it was removed in emscripten-core#9499. `JS_ENGINES` is needed for any users that want to run test code.
`COMPILER_ENGINE` was completely removed from emscripten in emscripten-core/emscripten#9469. `JS_ENGINES` is only used/needed for testing and is no longer needed as of emscripten-core/emscripten#9542.
`COMPILER_ENGINE` was completely removed from emscripten in emscripten-core/emscripten#9469. `JS_ENGINES` is only used/needed for testing and is no longer needed as of emscripten-core/emscripten#9542.
`COMPILER_ENGINE` was completely removed from emscripten in emscripten-core/emscripten#9469. `JS_ENGINES` is only used/needed for testing and is no longer needed as of emscripten-core/emscripten#9542.
`COMPILER_ENGINE` was completely removed from emscripten in emscripten-core/emscripten#9469. `JS_ENGINES` is only used/needed for testing and is no longer needed as of emscripten-core/emscripten#9542.
`COMPILER_ENGINE` was completely removed from emscripten in emscripten-core/emscripten#9469. `JS_ENGINES` is only used/needed for testing and is no longer needed as of emscripten-core/emscripten#9542.
`COMPILER_ENGINE` was completely removed from emscripten in emscripten-core/emscripten#9469. `JS_ENGINES` is only used/needed for testing and is no longer needed as of emscripten-core/emscripten#9542.
`COMPILER_ENGINE` was completely removed from emscripten in emscripten-core/emscripten#9469. `JS_ENGINES` is only used/needed for testing and is no longer needed as of emscripten-core/emscripten#9542.
`COMPILER_ENGINE` was completely removed from emscripten in emscripten-core/emscripten#9469. `JS_ENGINES` is only used/needed for testing and is no longer needed as of emscripten-core/emscripten#9542.
`COMPILER_ENGINE` was completely removed from emscripten in emscripten-core/emscripten#9469. `JS_ENGINES` is only used/needed for testing and is no longer needed as of emscripten-core/emscripten#9542.
…re#1354) `COMPILER_ENGINE` was completely removed from emscripten in emscripten-core/emscripten#9469. `JS_ENGINES` is only used/needed for testing and is no longer needed as of emscripten-core/emscripten#9542.
Since we are guaranteed that
NODE_JSis part of the config (sinceall users need this) we can set a sensible default for
JS_ENGINES.This default was supposed to be part of #9469, but a bug meant the code
was dead and it was removed in #9499.
JS_ENGINESis needed for any users that want to run test code.