GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — esm: avoid try/catch when validating urls by anonrig · Pull Request #47541 · nodejs/node Conversation
Member
Due to
cc @nodejs/url
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
aduh95
reviewed
|
@aduh95 I like where this is going, but I couldn't visualize it. Can you elaborate on how we can import it primordial-style? We can always do |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, I mean something that's available only internally and cannot be mutated at runtime. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
5375959 to
3a57762
Compare
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This is way better/cleaner :-) but does it prevent backporting this commit, since older release lines may not have URL.canParse? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
It might make it harder, due to conflicts, but I don't think it will block backporting any future changes to ESM. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
oh sure, i just meant, should this PR have any "do not backport" labels, or link to the canParse PR as a prereq? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I'm not quite sure. @nodejs/releasers what do you recommend? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sweet, thanks! I was just suggesting this change last night in Slack 😁
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I'm confused by this. The C++ API still says this: Lines 116 to 117 in 4afb25c
Or did you actually mean this PR does not improve performance until the TODO is resolved? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I was giving some context to this particular change. It is definitely faster than the current implementation. Additionally, @KhafraDev just opened a pull request for adding v8 fast API to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@aduh95 perfect, thanks for clarifying and linking :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
3a57762 to
05742e9
Compare
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Would someone re-review this pull request? It's required due to force-push. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } = require('internal/errors').codes; | ||
| const { exitCodes: { kUnfinishedTopLevelAwait } } = internalBinding('errors'); | ||
| const { URL } = require('internal/url'); | ||
| const { canParse: urlCanParse } = internalBinding('url'); |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit: this sounds a little Yoda-esque
| const { canParse: urlCanParse } = internalBinding('url'); | |
| const { canParse: canParseURL } = internalBinding('url'); |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Not sure this is better, isURLString might be more suited. URLCanParse has the upside of being consistent with how primordials are named, which is nice imho
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I want to change this to URLCanParse too but I'm too demotivated by having to run Node.js CI multiple times because of the flaky tests.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in 17570c0 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PR-URL: #47541 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: nodejs#47541 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: #47541 Backport-PR-URL: #50669 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: nodejs/node#47541 Backport-PR-URL: nodejs/node#50669 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: nodejs/node#47541 Backport-PR-URL: nodejs/node#50669 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.