-
-
Notifications
You must be signed in to change notification settings - Fork 1
Dynamic modules - throw on star exports #3
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
This provides two features needed for supporting late-defined export names on custom module records. Firstly, a second argument to GetExportedNames of the namespace module being constructed by this call, allowing it to be tracked, and secondly permitting ResolveExport and GetExportedNames operations to provide abrupt completions corresponding to instantiation errors.
3187f0d to
13e14c9
Compare
|
(the last commit is the new change) |
| </td> | ||
| <td> | ||
| List of String | ||
| List of String | *null* |
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.
Doesn't the need for all this | null/extensibility stuff go away?
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.
Ah, never mind, no, this is how CJS modules are directly (it is just never that a ESM is like that), right?
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.
Yes, the pending state still stands - this is for the case on the 7th slide of https://docs.google.com/presentation/d/1--k5tJmhXJeLlUOmBdHGK3my9VCbZVL0MF8OrTeqS0I/edit?usp=sharing.
13e14c9 to
b48ae5b
Compare
|
I've added another commit to try and clarify the note cases here even further. Would value feedback on the wording here before updating the ECMA262 PR. |
|
I've added an additional commit to this at 1b409d3, which is basically just reducing a minor spec complexity. To explain:
One way to make this a bit simpler would just be to always have the dynamic modules spec create the namespaces, and then to always create namespaces for all modules upfront instead of lazily. This is just in spec text though, so implementations could still make namespaces lazily in their own work if they want to. The spec text then simplifies as provided in 1b409d3 (no new argument needed for GetExportedNames, and null return happens consistently) The dynamic modules proposal adjustment for this is at https://github.com/nodejs/dynamic-modules/pull/11/files, where namespaces are always finalized at https://github.com/nodejs/dynamic-modules/pull/11/files#diff-3540caefa502006d8a33cb1385720803R176. Sorry to drag this one out, have been on and off it over the weekend - would value feedback on the above before a final merge! |
f96c7fa to
b843b31
Compare
|
I'm not a fan of making |
|
As discussed in the modules meeting, I'm going ahead with merging this into the TC39 PR for dynamic modules, while we can continue to discuss alternative approaches. |
No description provided.