Remove JS_ENGINES and COMPILER_ENGINE from config file - #1354
Conversation
kripken
left a comment
There was a problem hiding this comment.
lgtm otherwise, versions look right.
| 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.
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.
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
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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.
I refactored and added find_emscripten_root() which returns the currently active emscripten root.
afc0b36 to
e68a0c2
Compare
e68a0c2 to
60d1d75
Compare
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
…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.
COMPILER_ENGINEwas completely removed from emscripten in emscripten-core/emscripten#9469.JS_ENGINESis only used/needed for testing and is no longer needed as of emscripten-core/emscripten#9542.