| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
|
@nodejs/tsc I've removed the error.input from URL error - ERR_INVALID_URL to make sure we share a similar output with Chrome and Safari. I've also added semver-major label because of the removal of error.input attribute. Safari returns: TypeError: Type error None of them have the error.input attribute. |
Sorry, something went wrong.
|
I would keep the input, and even add the base, it can very hard to understand what is the error without seeing the input and base |
Sorry, something went wrong.
|
Benchmark CI: |
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
|
Could there be a way to get the same performance improvements without removing helpful debugging information? If not, maybe we could use a flag to opt-in to the slower option that outputs the input and base? |
Sorry, something went wrong.
Probably, although I'm not sure. This requires a similar approach to what ThrowAccessDenied is doing in https://github.com/nodejs/node/blob/main/src/permission/permission.cc#L102. |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
|
FWIW, I tend to agree with @aduh95 that removing error information for the sake of performance (on an error path!) does not benefit users. I thought that URL.canParse() was specifically added to avoid having to rely on the performance of the URL error path. |
Sorry, something went wrong.
|
How much is actually the performance hit when keeping the input as an attribute? |
Sorry, something went wrong.
There was a problem hiding this comment.
I do not think it's a good idea to remove important debug information in favor of performance. We can definitely improve the performance but debug information is more important. I had an open PR to improve the situation a lot and I have to get back to that again.
Sorry, something went wrong.
|
@BridgeAR @aduh95 @tniessen I've updated the implementation. Previously this pull request was 142% faster than main. Right now it is 120% faster. I also added base field to the error object. Appreciate it, if you can review it once again. |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
|
Hey @BridgeAR, can you re-review this pull request, and remove your block? |
Sorry, something went wrong.
|
I suspect he would still object since the URL isn't part of the message string, what's the cost of adding that back? |
Sorry, something went wrong.
I don't follow. URL was never part of the message string? Input is a property of the error object. On top of that I've also added base property to the error as well. |
Sorry, something went wrong.
|
@anonrig ah, I'm probably mixing it up with another PR then, lgtm |
Sorry, something went wrong.
|
Adding to @nodejs/tsc agenda to resolve the block. |
Sorry, something went wrong.
|
There's no need for the TSC to intervene if you addressed the blocking comment |
Sorry, something went wrong.
PR-URL: #49692 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: #49692 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: nodejs#49692 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
| Back | FazBrowse Home | New Git URL |
Some easy wins for Invalid URL path.
cc @nodejs/url @nodejs/performance