-
Notifications
You must be signed in to change notification settings - Fork 44
Online Module Summit 2018-04-03 #9
Comments
Would people find a "participating in open source" or "how the node project works" useful? |
Given that I have both a presentation and a blog post about the current state of things, I can volunteer to do a presentation about that (i.e. current state, and differences between ESM and CJS). |
Another topic to add to this:
|
In no particular order, these are all the (very specific) questions I have about the current state of affairs:
And more in the technical space of the current state of affairs:
|
i can answer |
I'm aware, but the notes from the tc39 meeting also say
And
Which implies "that sounds nice, but we can't actually guarantee it (at least in simple terms), and it isn't actually true if you consider that imports are cached". Additionally, that only matters within a specific module graph anyway - consider that if any import can be a dynamic import object using a loader hook, then theoretically any import could cause a new subgraph to be created (via the execution of a new vm context during resolution) which inherently has ordering unbound form the parent graph (though, do these share a cache like And to top that off, for internal modules in nodejs/node#18131 it was being discussed that that PR (internally) messes with the execution order by making sure that all the internal libs get executed before public packages so they can get named imports. So while the answer is |
18131 is possible because we know internal modules won't error on evaluation, and that's why the other pr was turned down, it creates inherent instability in the module record if it fails like that. |
To add to @weswigham excellent list of questions, and to refer specifically to this part of his last point:
|
Because paths/URLs differ across environments, the only possible way I can think of to make that work is if browsers are willing to add loader hooks that would allow you to configure them to load modules "as if" it were node - or, if node users were willing to use URLs exclusively, and use loaders in node as needed. The latter, imo, is unacceptable. TC39 has no bearing on the conversation unless browsers are first convinced. |
This is a very pessimistic view, but browser implementers have no concrete incentive to implement anything module-related to align with what node needs for an ergonomic es module implementation at present. There's no existing ecosystem for them to benefit from, and it will still cost implementers time and tech debt - essentially you're selling them on the future promise of the node es module ecosystem. They also can just choose to take a "wait and see" approach in that regard - they can see if node es modules don't flounder on delivery, then if they become wildly successful they can extend their minimal module support to support loading them. (They do have their own strange compatability issues to worry about) I'm not saying we shouldn't try, and I don't think we'd get a straight "no", but the incentives don't seem like they've been there in the past when es modules were being designed. Looking over notes from the past few years, almost every time someone has gone to the tc39 to ask for changes or permissiveness in the existing spec to standardize something node wanted as permissible, the answer has not been positive (save But I think, based on the last year of tc39 notes, what it looks like the committee needs to see is node doing what it must to make es modules optimally usable for its ecosystem, at which point it can come back and create or update the standard around what's been done. In fact, I can quote @wycats stating almost exactly that, from one of the links above from last year:
This has been a bit of a tangent. sorry. I've been watching this space for years, and the near zero apparent external progress here has just been flabbergasting given how much es modules have been adopted by transpiler-using-programmers since even before the es6 spec officially dropped - this feeling is probably what's helping drive this rush to implement something before node 10 drops. |
As an aside... There is no need to rush anything before Node 10 drops. We can remove the flag prior to LTS if it stabilizes. It would also be possible to drop the flag in a semver minor release during active LTS. So the runway is more like 9 - 27 months |
some answer for @weswigham hopefully interesting for others too.
I couldn't agree more.
There is no need for a build step to run cross platform a self contained module. Actually, there is no need for build steps for any ESM module (more later). Build steps are rather a best practice for the Web, JavaScript is not a Web or Node only language.
Not browser esm, any code that doesn't use NodeJS core modules could be shared.
Not browser only, any code that does not use NodeJS core modules can land in npm and be used env-agnostic.
Dynamic
Two slightly off assumptions here:
CommonJS ExampleTwo modules, acjs and bcjs, both installed, hence inside node_modules folder. acjs/index.js const bcjs = require('../bcjs');
console.log(bcjs); bcjs/index.js module.exports = Math.random(); The execution of ESM ExampleTwo modules, aesm and besm, both installed, hence inside node_modules folder. aesm/index.js import random from '../besm/index.js';
// print via JSC or SpiderMonkey
print(random); besm/index.js export default Math.random(); The execution of Does it work on the Web ?TL;DR Yes, if you use the same CDN to publish your modules you can actually import in the same relative way. Example, instead of Also notice-able that specific project with Custom Elements runs in NodeJS too thanks to basicHTML, yet I need to convert ESM to CJS because there's no ESM in NodeJS (like you said As summaryIt would be great if we could stop thinking binary (Node / Browser) when the official JS module system can, and will, affect many other situations but also we should start considering that, as shown in these examples, cross portability is already reality. Please let's get this right, thanks for reading. |
For bare imports
Browser vendors, no. TC39, yes. If it goes through TC39, the functionality eventually land in browsers. The downside being, TC39 is slow so addressing this sooner than later will be best. Also keep in mind the potential for Are we using import.meta?If so, keep in mind that the spec is still only Stage 3. If we're going to use a non-finalized spec we should reach out to TC39 to identify any potential footguns ahead of time. |
@evanplaice I think you misunderstand how TC39 works; browsers are members of it, and have actively blocked some of the changes that have been requested for purposes of the node integration. It's not that TC39 is "slow", it's that it has many stakeholders - appropriately many - and so it's often harder to ship bad decisions (but not impossible, obviously). |
@ljharb Copy. Scratch that last comment. |
I can likely do a code cartoon on the ESM spec for this. I also may be able to present on the tricky issues for making WASM modules work as ES modules. |
Scheduling the SummitI am thinking we should do this at the end of March or early April. It hopefully has enough lead time for an online presence to be possible for members, but is not too far out to be irrelevant to current discussion. To that purpose I have made a doodle for times dates seem reasonable. Since I have been assigned this issue, I am also wanting to see if there is any time limitations for members. This will be a long meeting and we have a geographically diverse set of members. I expect planning to be closer to UTC than PT. I think we can leave the doodle open for a few weeks and people can fill it out or voice ideas about this here. BE SURE TO CONSIDER THE SCHEDULING OF TOPICS BELOW WHEN CHOOSING DATES Topics Presented at the SummitThis is a rough plan for how we are going to handle our large group but limited time for the summit. I am open to altering the nature of presenting and deciding upon topics as members see fit. We have a rough idea of topics for this it seems. Our large group of active members and limited time for the summit has makes me want to aggregate topics separately from deciding on the presentation of those topics. This has led me to create a form to aggregate topics so interested parties can prepare presentations or discussions on specific topics of interest without a single member being the only voice heard on a specific topic during the summit. Two weeks prior to the summit, the form will stop and topics to be presented will be decided. Based upon responses to topics and the nature of topics submitted I will decide upon the agenda and publish it. Members can agree to the agenda at that point. Members presenting these topics and times of discussion may vary even after publication of the agenda. The time allowed for discussion of a specific topic should not change once the agenda is agreed upon unless the presenters are unable to attend. |
People might have missed this scheduling doodle since it is a comment, we are still missing replies from: @benjamn |
@bmeck don't see my name listed, is my answer from the previous doodle being counted or am I put on an observer status now? |
@tbranyen mistake on my part. I was going through the list from https://github.com/orgs/nodejs/teams/modules/members?utf8=%E2%9C%93&query=+membership%3Achild-team and manually adding things. Teams are a sad experience on github right now with few features :p. My apologies. |
@jdalton @MylesBorins I have moved you both around as well as myself, I wanted @jdalton 's talk to be available to most and tried to keep it from being at the end of the summit. |
@MylesBorins Can we update the top post with the time, maybe using the standard snippet? TimeUTC Tue 03-Apr-2018 14:00 (02:00 PM):
Or in your local time:
Edit: Manually extracted from a diagnostics issue and edited. No warranty for the correctness of my editing job. |
@jkrems updated |
Unfortunately I have other meetings from 11:30 Pacific to 12:30 Pacific. Could I possibly switch with Bradley or Justin? |
@linclark swapping with my slot |
Sorry if this is not the appropriate place to post, but is there a way for non-members to watch a live stream (or something to that effect). |
Is there a link to join or watch the meeting? |
I just updated the OP. We will be streaming to youtube, and I'll place a link when we are live. We had not discussed making the panel open to non-member so I think it makes sense to assume that the zoom link is currently only for Team Members |
@bmeck I'm not sure I have an hour worth of content for tomorrow. Feel free to shorten my time to 30 minutes if it helps with juggling folks. |
Members, let us know if you have trouble connecting to the Zoom link up top. |
Stream starting at 7:15AM PT |
People following from home can stream at http://www.youtube.com/watch?v=O-7rXALxL9Y |
I'm having connectivity issues, I'm on the YouTube stream in the moment and am going to drive home to try to attend with Zoom. |
Looks like someone else just started a meeting on the same zoom account. Give me 10 minutes |
Due to technical difficulties we are moving to hangouts on air participants please check out https://hangouts.google.com/hangouts/_/tmdgbvvtyraerlk4twtlqqejfqe A new stream link will be available v soon |
Ok finding another options :sigh: |
Original Webinar is working again I've pinged foundation to see if we can avoid getting booted |
Can other people get in? It just says "If you are the host, please sign in to start the webinar" |
@mhdawson I got in |
@justinfagnani I can switch times with you |
Great work today everyone! All the videos are available individually on youtube now, shared in a larger play list https://www.youtube.com/watch?v=IbPxOaGveXA&list=PLfMzBWSH11xb9LoHLO0q3Yo7HXjMOm11N |
Can you please post links to the various presentations that were shown today? Not the video, but the Google Docs/Slides/etc. documents that people presented. Thanks! |
I'll cross post over on youtube when people post stuff here. @GeoffreyBooth if this gets lost in the noise I'll start asking folks for the links. Please feel free to ping again if this falls off my radar |
Slides: https://goo.gl/WLufhg |
Time
Decided via doodle
UTC Tue 03-Apr-2018 14:00 (02:00 PM):
Or in your local time:
Proposed schedule
https://docs.google.com/document/d/1oAvF_qukb1dIUWji9GjHNCL5-0uJ3_M-yPG-lzJVBbs/edit#
Joining the Call
Members of the team can join the zoom:
https://zoom.us/j/486767135
Streaming
Part 1: http://www.youtube.com/watch?v=O-7rXALxL9Y
Part 2: https://www.youtube.com/watch?v=Eaofz2Cj9Lw
So there is a LOT of context to the module implementation. I think it would be useful for us to schedule a day of content to document the current state of things and to get individuals who have not been as involved up to speed. I'm imaging we likely could co-ordinate a day of content around this. Please use reactions to signify interest and comment topics you would like to see or volunteer to provide. We can also invite guests from outside the group (such as TC39, webpack, or participants from Frameworks)
I'll keep this original issue updated with content as it develops.
Topics
The text was updated successfully, but these errors were encountered: