-
Notifications
You must be signed in to change notification settings - Fork 715
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
Remove JS_ENGINES and COMPILER_ENGINE from config file #1354
Conversation
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.
lgtm otherwise, versions look right.
emsdk.py
Outdated
cfg += 'COMPILER_ENGINE = NODE_JS\n' | ||
# See https://github.com/emscripten-core/emscripten/pull/9542 | ||
if version < [1, 38, 48]: | ||
cfg += 'JS_ENGINES = [NODE_JS]\n' |
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.
This is in a loop - is it not possible that we get these more than once? Or do we guarantee that EMSCRIPTEN_ROOT
appears exactly once in a single activated config?
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 suppose we could have more than one version of emscripten installed? But in that case the desired behaviour is that the config file should be a super-set of all the settings required I think.
The exact same pattern is used here:
Lines 2490 to 2494 in 7815dca
for tool in tools_to_activate: | |
config = tool.activated_config() | |
if 'EMSCRIPTEN_ROOT' in config: | |
# For older emscripten versions that don't use an embedded cache by | |
# default we need to export EM_CACHE. |
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.
The superset makes sense, but I think the current code can end up with duplication? That is,
JS_ENGINES = [NODE_JS]
JS_ENGINES = [NODE_JS]
JS_ENGINES = [NODE_JS]
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 don't think it matters because you can't really have more than one version of emscripten installed can you?
Also, those repeated keys would be harmless if you somehow did mange to activate more than one emscripten install at once
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 don't think it matters because you can't really have more than one version of emscripten installed can you?
Yeah, I think only one can be active at once, but just wanted to check that my understanding was the same as yours. However, reading the code I can't easily confirm that, as in the manifest file EMSCRIPTEN_ROOT
appears in things with id "releases" and also id "emscripten". I think a release contains emscripten among other things, so that suggests we use that field in more than one active thing?
Also, those repeated keys would be harmless if you somehow did mange to activate more than one emscripten install at once
I agree, it should not break anything, but would just look weird.
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.
What solution would your propose here?
Remember this only effects very old version of emscripten. So in order to see this "wierd" duplication one would need to:
- Somehow install more than one version of emscripten (I'm pretty sure this is not support and/or would never work)
- Both version of emscripten would need to be these very old versions.
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.
Perhaps we could in the loop set a boolean "need legacy vars", and then outside of it if that is set then we add those two? That doesn't seem much more complex, and it seems safer to me.
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 there is no safety issue so I'm not sure adding complexity here is worth it. Have those duplicate keys would be a very minor cosmetic issue (more folks are not going to look at this config file ever).
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 refactored and added find_emscripten_root()
which returns the currently active emscripten root.
afc0b36
to
e68a0c2
Compare
e68a0c2
to
60d1d75
Compare
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.
lgtm % comments
d3c08df
to
97ffb86
Compare
`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.
97ffb86
to
6ffa04d
Compare
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.