-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Remove createRequire
in favor of ES6 import
#23169
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
Conversation
4dcf866
to
ff377d5
Compare
I think the
emscripten/src/library_atomic.js Lines 155 to 157 in 3d4df5b
grep-ing through the codebase, I also found: emscripten/src/library_uuid.js Line 36 in 3d4df5b
emscripten/src/library_wasi.js Line 582 in 3d4df5b
emscripten/src/runtime_shared.js Line 63 in 3d4df5b
Line 13 in 3d4df5b
Lines 31 to 32 in 3d4df5b
etc. |
Oh wow! I guess we don't have tests that cover any of those? Or at least we don't have tests that cover those in combination with Lets try to update all those sites rather than being back this pollyfil. BTW, do you know which of the over usages is the one you are running into? |
This change effectively reverts emscripten-core#23169 because it turns out there are quite a few other places in the codebase that depend on being able to call `require`.
This change effectively reverts emscripten-core#23169 because it turns out there are quite a few other places in the codebase that depend on being able to call `require`.
This change effectively reverts emscripten-core#23169 because it turns out there are quite a few other places in the codebase that depend on being able to call `require`.
Indeed, I think some test coverage is missing for this. A simple test would be to check whether
Only the |
This change effectively reverts #23169 because it turns out there are quite a few other places in the codebase that depend on being able to call `require`.
Presumably any such users would either:
|
For most uses of `require()` in emscripten this does not matter since we load mostly system libraries. However for the `ws` module it is needed. This bug was being masked by the fact that we were setting `NODE_PATH` in our socket test running. This is no longer needed now that we run (non-parallel) tests in the emscripten tree (in out/test). This is followup to #23265 which itself was an attempt to revert #23169. Fixes: #23503
No description provided.