| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
IRL, both internal and external instances of ESMLoader happen. in the test, only 1 external happens and then the test fails.
|
@JakobJingleheimer I just pushed some commits. I got the test to pass by removing the isInternal flag from the ESMLoader constructor. At least in all of the tests, ESMLoader only ever gets initialized once, by Node’s internals, and never again. I’m not sure when it would get initialized a second time—worker threads?—other than in Node’s own tests that explicitly initialize it. Is there a reason you added this flag? With that removed, and the console.log lines removed, all the tests pass for me. So I guess unless there was some reason we needed isInternal, hopefully the commits I pushed should make this PR mergeable. |
Sorry, something went wrong.
Sorry, something went wrong.
|
@GeoffreyBooth alas, no: the isInternal flag is necessary for the real world. There are 2 instances of ESMLoader: The 1st Node.js uses internally to load custom loaders. The 2nd is what the custom loaders get shoved into and runs when user-land code runs. Without the isInternal, IRL, the specifier resolution warning prints twice (the others don't because they're using emitExperimentalWarning(), which de-dupes). |
Sorry, something went wrong.
Commit Queue failed- Loading data for nodejs/node/pull/42314 ✔ Done loading data for nodejs/node/pull/42314 ----------------------------------- PR info ------------------------------------ Title esm: emit experimental warnings in common place (#42314) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch JakobJingleheimer:esm/consolidate-experimental-warnings-emission-in-common-place -> nodejs:master Labels module, process, experimental, esm, author ready, loaders, commit-queue-squash Commits 8 - esm: emit experimental warnings in common place - fixup: switch test from substring to regex - fixup: delint - WIP: switch specifier resolution warning to custom message - fixup: remove log - fixup: remove isInternal flag for ESMLoader - fixup: lint - fixup: prevent the specifier resolution warning from being printed twice Committers 1 - Geoffrey Booth PR-URL: https://github.com/nodejs/node/pull/42314 Reviewed-By: Antoine du Hamel Reviewed-By: Geoffrey Booth ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/42314 Reviewed-By: Antoine du Hamel Reviewed-By: Geoffrey Booth -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - fixup: prevent the specifier resolution warning from being printed twice ℹ This PR was created on Sat, 12 Mar 2022 16:41:20 GMT ✔ Approvals: 2 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/42314#pullrequestreview-908174329 ✔ - Geoffrey Booth (@GeoffreyBooth): https://github.com/nodejs/node/pull/42314#pullrequestreview-923226427 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2022-03-28T18:10:29Z: https://ci.nodejs.org/job/node-test-pull-request/43219/ - Querying data for job/node-test-pull-request/43219/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/2054946216 |
Sorry, something went wrong.
PR-URL: #42314 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: nodejs#42314 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: #42314 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
|
👋 @JakobJingleheimer! I’m not familiar with Node.js internals, but I guess that this change could potentially break a workaround in here: #30810 Could you please share your thoughts in that issue if it’s relevant? It’d be great to know how to suppress warnings in Node 18 like in Node 16. |
Sorry, something went wrong.
PR-URL: nodejs#42314 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: #42314 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: #42314 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: #42314 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: #42314 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: #42314 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: nodejs/node#42314 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
| Back | FazBrowse Home | New Git URL |
Previously, experimental warnings were scattered (sometimes by me) around the ESM code with inconsistent messaging. This PR consolidates them to ESMLoader instantiation (so subsequent code does not need to consider whether a warning has yet been emitted).
This PR also adds an experimental warning for Network Imports (which was previously not emitted).