-
Notifications
You must be signed in to change notification settings - Fork 17
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
Node.js Loaders Team Meeting 2022-02-15 #64
Comments
Perhaps we can add the |
Which one and sure
…On Sat, Feb 12, 2022, 9:58 AM Guy Bedford ***@***.***> wrote:
Perhaps we can add the import.meta.resolve discussion to this meeting?
Let me know if that might be suitable.
—
Reply to this email directly, view it on GitHub
<#64 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABZJIZGHQGBTQCO7TD6IXTU2Z7RFANCNFSM5OEG75EQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are on a team that was mentioned.Message
ID: ***@***.***>
|
Per current discussion in whatwg/html#5572 it seems like having a clear position for Node.js on this topic is important. (please don't comment in that thread now unless you absolutely have to - the point being to try to get some internal consensus on the matter) |
I'm not sure we should add WHATWG issues to our meeting if they are not interested in Node's feedback from what I read in the comments. |
@bmeck it may help to have a unified Nodejs position as to whether we are
able to make the resolver synchronous or not. Either way if we have a
stated Nodejs position on the matter that at least simplifies dialog,
conflict or not.
…On Sat, Feb 12, 2022 at 10:41 Bradley Farias ***@***.***> wrote:
I'm not sure we should add WHATWG issues to our meeting if they are not
interested in Node's feedback from what I read in the comments.
—
Reply to this email directly, view it on GitHub
<#64 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAESFSQUFEGJYXNONQUPO3DU22SUJANCNFSM5OEG75EQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
I’ve added whatwg/html#5572 to the agenda. I put it first in case @guybedford doesn’t want to stay for the ambient loaders discussion. (@guybedford I assume you can make the meeting?) |
I think the question we need to answer is this: what do we lose, if anything, if we make the So it would seem that we could make |
Softwares that want to run a bunch of resolutions in parallel (TypeScript, Webpack, etc) would want resolvers to be async, that's at least part of why they reimplement the resolution themselves at the moment. Although such softwares also tend to have many other reasons to implement their own resolution pipelines as they add features like |
That's not the case as of HTTP(S) Imports: |
Okay, but it doesn’t have to, right? I thought |
Ah, I know why: it was part of nodejs/node#40980. I think as it currently is, when the import is a network protocol, Maybe when |
Is this related to the possibility of making resolve sync from the main thread while keeping the implementation possibly async in the loader thread? I'm not intimately familiar with the topic, but I think there's a desire to expose all loader hooks as sync in the main thread to support loading of CJS files. |
Yes
I don't understand—it already can load CJS file. |
I thought someone on the loaders team was talking about allowing loaders to implement both |
I don't recall that specifically, but if using the atomic wizardry mentioned recently, that sounds possible (not sure if it's a good idea or something that might be considered specifically supporting if it doesn't JustWork after loaders are moved off-thread). |
@JakobJingleheimer this was one of the use cases for moving things off thread and Modules WG have talked about it for years, some edge cases do exist with doing so though but they would be a follow on not a blocker. |
This sounds like the effort a few years back of trying to make |
For the record, this is the kind of implementation for the "syncify" part of the implementation (here, for babel-register): |
That seems like a different thing: blocking the main thread while simultaneously spinning the main thread's event loop to evaluate an ESM module. Rather, this would be blocking the main thread waiting on the loader thread to return a path and source text to be executed. Execution would still happen synchronously on the main thread, and an error would be thrown if |
Hello Node Loaders Team and community, FYI, I've recently used the current Loaders API to build a new method of testing web code under Node.js, for the bleeding-edge SvelteKit web framework. The create-esm-loader and node-esm-loader wrappers helpers help bring stability and sanity. Details: Loader sources: So far, I have been able to achieve everything I need. Some of it is not ideal, but I think your planned work covers most of it already. In case it's helpful. Thanks. |
Do you mind submitting a PR to https://github.com/nodejs/loaders/blob/main/doc/resources.md to add these links? |
@GeoffreyBooth sure thing, done here: #68. thanks. |
I see a lot of discussion in this thread is about whether Specifically to answer:
I'd like to share a few places where I have found File system operations (checking existence, permissions)It's possible to use the sync versions of these operations ( Loading js-based configA common pattern is for tools to use a It would be possible to use top-level await to load config like this in advance, but that assumes that we always know where to look for them. In reality, we often want to look for config files once we know the path of the file we are loading from. Other dynamic importingFor example a loader which decides to load Network requestsAgain not a use-case for me, but I could imagine a loader which fetches resources over the network. In this case, an import like |
Time
UTC Tue 15-Feb-2022 19:00 (07:00 PM):
Or in your local time:
Links
Agenda
Extracted from loaders-agenda labelled issues and pull requests from the nodejs org prior to the meeting.
nodejs/loaders
import.meta.resolve
Add import.meta.resolve() whatwg/html#5572Invited
Observers/Guests
Notes
The agenda comes from issues labelled with
loaders-agenda
across all of the repositories in the nodejs org. Please label any additional issues that should be on the agenda before the meeting starts.Joining the meeting
link for participants: https://zoom.us/j/97506450082
For those who just want to watch: https://www.youtube.com/c/nodejs+foundation/live
The text was updated successfully, but these errors were encountered: