esm: emit experimental warnings in common place#42314
Conversation
|
Review requested:
|
39bf611 to
bfe82dc
Compare
IRL, both internal and external instances of ESMLoader happen. in the test, only 1 external happens and then the test fails.
cc6202a to
59eff1f
Compare
|
@JakobJingleheimer I just pushed some commits. I got the test to pass by removing the With that removed, and the |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
@GeoffreyBooth alas, no: the 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 |
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 |
|
Landed in 5a927ef |
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?
|
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>
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).