-
Notifications
You must be signed in to change notification settings - Fork 44
Dynamic Modules Status #188
Comments
i'd be happy to help with the v8 impl. |
I've done some work on |
Thanks @jkrems, whats the best way to reach you to discuss the details further? |
Most likely email or GChat (jan.krems@groupon.com) or Twitter DM (@jankrems). The former definitely is the more reliable way of reaching me quickly. |
@jkrems ok I believe I've sent you an invite there, but let me know if you don't see it. |
I'm not seeing an invite (including in my spam). Just in case you can also try my personal email (jan.krems@gmail.com). |
Let me know if there's any communication method you'd prefer in case this doesn't work out. :) |
To further update on the spec and implementation here:
The API can be seen in the test case here using HostExecuteDynamicModuleCallback and module->SetExport. The following implementation steps are pending:
@jkrems @devsnek thanks both of you for feedback so far, do try it out again if you can! |
Nice work! I played around with the test case to try some more module graphs (e.g. multiple imports of the same dynamic import) and it worked without a hitch. :) (There's a single |
@guybedford nice work! i have some feedback on the v8 internals that i can put up once you have a CL. |
Further update on dynamic modules - the implementation at guybedford/v8@master...guybedford:dynamic-modules is now fully spec-complete, and just needs some refactoring work on the data structure and module class side. @devsnek you mentioned you had some ideas for how to handle the |
PR for review at guybedford/v8#2. Comments welcome. |
The implementation of dynamic modules was finally completed to spec (and the spec worked out as written). Review at https://chromium-review.googlesource.com/c/v8/v8/+/1303725. |
I'd like us to discuss this one more time in tomorrow's meeting and ensure we have explicit consensus from our group that we want this moving forward. |
Sure, I'd be happy to provide an update here on how last week's TC39 went. |
As per the meeting, I've posted a Node.js issue with a status update at nodejs/node#24894. |
Update 5/11/2018: The Dynamic Modules implementation is now complete in v8, pending further review (at https://chromium-review.googlesource.com/c/v8/v8/+/1303725). This means we can have named exports in transparent interop of ESM from CJS
As you know, I've been pushing a Dynamic Modules specification for ensuring named exports on CommonJS while retaining a correct execution order in transparent initerop. This spec has been carefully worked out at https://github.com/guybedford/proposal-dynamic-modules.
While transparent interop remains a possibility, I believe this specification and work is important to follow so we can provide the best experience to users.
Initially this was created as a Stage 1 TC39 proposal, but it turns out the model is better served by having a Node-specific module record specification implemented in V8, just like Web Assembly will be its own module specification outside of TC39.
This way only a few ECMA262 specification changes are needed to support dynamic modules - tc39/ecma262#1306.
This PR was discussed at the latest TC39 meeting, and it was determined that it should only land following implementation work / feedback.
Thus, the next steps on Dynamic Modules here are:
While this work all rests on a hypothetical, I hope we can all appreciate it is an important consideration on that hypothetical, and should be pushed regardless.
The text was updated successfully, but these errors were encountered: