Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

WIP [Do not merge] - Irp type dynamic modules #29

Closed

Conversation

guybedford
Copy link
Contributor

This branch implements the Dynamic Modules v8 implementation and then builds it into the Node.js usage as DynamicModuleWrap alongside ModuleWrap, which can be used to construct dynamic modules for CJS.

The implementation uses the approach { ...exports, default: exports } as the dynamic module shell for CJS and core modules.

So that this branch is effectively identical to #28, but with import { name } from 'cjs' support :)

guybedford and others added 12 commits January 23, 2019 09:06
Refs: nodejs/modules#180

PR-URL: nodejs#6
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: John-David Dalton <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Refs: nodejs/modules#180

PR-URL: nodejs#6
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: John-David Dalton <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Refs: nodejs/modules#180

PR-URL: nodejs#6
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: John-David Dalton <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Refs: nodejs/modules#180

PR-URL: nodejs#6
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: John-David Dalton <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: nodejs#6
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: John-David Dalton <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: nodejs#6
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: nodejs#6
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Copy link
Member

@jdalton jdalton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This proposal requires changes to ECMA262 and buy-in from TC39. At the January TC39 meeting there was no clear endorsement with delegates expressing a range of reservations/concerns.

@ljharb
Copy link
Member

ljharb commented Feb 11, 2019

Note, though, that the pushback wasn't about this approach not being feasible, it was that perhaps the parts of the spec should be removed such that it would allow node to do this on its own, without TC39 buy-in.

@jdalton
Copy link
Member

jdalton commented Feb 11, 2019

@ljharb

There was pushback on multiple fronts.
@guybedford's comment here is a nice summary:

The topic of Dynamic Modules has now been brought to TC39 over 7 times, 5 times for the current dynamic modules specification. In the last meeting there were three separate technical arguments made by four different members as well as the author of the ECMAScript modules specification, against dynamic modules from TC39, all of which are irresolvable without significant refactoring of the entire ECMAScript modules specification.

@ljharb
Copy link
Member

ljharb commented Feb 11, 2019

Perhaps i missed some of them; it’d be great to get a summary. From what i saw, especially given the previous consensus/commitment to accommodate node, the objections were overcomeable.

@jdalton
Copy link
Member

jdalton commented Feb 11, 2019

The pushback I remember combined with notes:

  • Source Text Modification
    • Some didn't want any modifications (to source text module or abstract module records)
    • Others didn't like Node-only branching
    • Others were concerned with weakening the static guarantees
  • Throwing on export * from
    • Preferred default-only export to named exports with throwing
    • Some worried it would cause devs to avoid export * from altogether

@nodejs-ci nodejs-ci force-pushed the modules-lkgr branch 2 times, most recently from bd5c877 to 0237465 Compare March 7, 2019 09:06
@nodejs-ci nodejs-ci force-pushed the modules-lkgr branch 3 times, most recently from 9301a06 to e721cd2 Compare March 14, 2019 08:10
@MylesBorins MylesBorins force-pushed the modules-lkgr branch 2 times, most recently from 484d1fb to 7efc53d Compare March 18, 2019 22:07
@nodejs-ci nodejs-ci force-pushed the modules-lkgr branch 3 times, most recently from c7fa700 to d69f765 Compare March 21, 2019 08:06
@MylesBorins MylesBorins force-pushed the modules-lkgr branch 5 times, most recently from 335d584 to 9a343ce Compare March 21, 2019 19:09
@nodejs-ci nodejs-ci force-pushed the modules-lkgr branch 3 times, most recently from 3a00b51 to bc101f6 Compare March 24, 2019 08:06
@MylesBorins MylesBorins force-pushed the modules-lkgr branch 3 times, most recently from fd5b55a to 3a40599 Compare March 27, 2019 02:42
@guybedford guybedford closed this Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants