-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add a default for JS_ENGINES #9542
Conversation
tools/gen_struct_info.py
Outdated
@@ -417,7 +417,7 @@ def inspect_code(headers, cpp_opts, structs, defines): | |||
# Run the compiled program. | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I admit its redundant, I fixed this is two ways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Since we are guaranteed that
NODE_JS
is 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_ENGINES
is needed for any users that want to run test code.