Skip to content
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

Merged
merged 2 commits into from
Oct 8, 2019
Merged

Add a default for JS_ENGINES #9542

merged 2 commits into from
Oct 8, 2019

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Sep 30, 2019

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.

@sbc100 sbc100 requested a review from kripken September 30, 2019 11:07
@@ -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()
Copy link
Member

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

Copy link
Member

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?

Copy link
Collaborator Author

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.

sbc100 added 2 commits October 8, 2019 09:44
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.
@sbc100 sbc100 force-pushed the allow_missing_js_engines branch from 9cdeee7 to 71372a5 Compare October 8, 2019 16:45
@sbc100 sbc100 merged commit 95b3afd into incoming Oct 8, 2019
@sbc100 sbc100 deleted the allow_missing_js_engines branch October 8, 2019 17:45
belraquib pushed a commit to belraquib/emscripten that referenced this pull request Dec 23, 2020
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.
sbc100 added a commit to emscripten-core/emsdk that referenced this pull request Mar 13, 2024
`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.
sbc100 added a commit to emscripten-core/emsdk that referenced this pull request Mar 13, 2024
`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.
sbc100 added a commit to emscripten-core/emsdk that referenced this pull request Mar 13, 2024
`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.
sbc100 added a commit to emscripten-core/emsdk that referenced this pull request Mar 13, 2024
`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.
sbc100 added a commit to emscripten-core/emsdk that referenced this pull request Mar 13, 2024
`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.
sbc100 added a commit to emscripten-core/emsdk that referenced this pull request Mar 13, 2024
`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.
sbc100 added a commit to emscripten-core/emsdk that referenced this pull request Mar 14, 2024
`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.
sbc100 added a commit to emscripten-core/emsdk that referenced this pull request Mar 14, 2024
`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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants