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 — fs: simplify the error context collection in C++, migrate fs.close errors by joyeecheung · Pull Request #17338 · nodejs/node Conversation
|
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.
The current error does not include any information about the fd being closed (I think it's also the same for other fs APIs that takes fd as arguments). To improve this properly we would need to update the After callback so that async APIs can be consistent with the synchronous APIs. We could add fd as an argument to UVException but IMO that's just going to bloat the signature of that function even further, putting those data in an object in JS is much more flexible.
Since After is also used by functions not migrated yet, I would like to update this bit when all the fs errors are migrated to the JS layer.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
00e4029 to
7f3f9d9
Compare
|
Slight bit of overlap with this: #17334 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@joyeecheung ... in #17334 I'm going to be focusing entirely on moving the input arg validation out into javascript. To make it easier on us both, how about focusing this PR only on the other errors then we can meet in the middle :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jasnell ACK, thanks, I only migrated those type checks in this PR as well because since I was migrating |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
7f3f9d9 to
0309a8a
Compare
|
Removed the type checks in favor of #17334 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
CI is green minus a jenkins failure. Marking this semver-major because it depends on #17160 , although I think both could be backported to v8.x if we skip the type check part.. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This is no longer semver major, but defensively adding the don't land labels until #17160 is backported in non-semver-major fashion |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.
The message will actually not show up because it should be non-enumerable. If ctx is a regular error.
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.
Ignore me, I should have checked what ctx stands for. When I commented first it seemed like a error.
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 think you wanted to write ctx[prop] instead of ctx.
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.
JS part LGTM besides the comment. The rest is also LG as far as I can tell.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
0309a8a to
4fcf4ee
Compare
|
Rebased now that the type checking tests have landed. Also validate the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
CI: https://ci.nodejs.org/job/node-test-commit/15076/ Minimized the changes to node_file.cc and split the uv binding changes to a separate commit. CI is green now minus one unrelated failure. @jasnell @BridgeAR PTAL. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
still lgtm |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in 24c71fb...9f122e3, thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. PR-URL: #17338 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
- Simplify the SyncCall template function, only collect error number and syscall in the C++ layer and collect the rest of context in JS for flexibility. - Remove the stringFromPath JS helper now that the unprefixed path is directly put into the context before the binding is invoked with the prefixed path. - Validate more properties in fs.access tests. PR-URL: #17338 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
* Collect the error context in both JS and C++, then throw the error in JS * Test that the errors thrown from fs.close and fs.closeSync includes the correct error code, error number and syscall properties PR-URL: #17338 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. PR-URL: nodejs#17338 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. Backport-PR-URL: #18916 PR-URL: #17338 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. Backport-PR-URL: #18916 PR-URL: #17338 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. PR-URL: nodejs#17338 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. Backport-PR-URL: #19191 PR-URL: #17338 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. Backport-PR-URL: #19191 PR-URL: #17338 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. Backport-PR-URL: #19191 PR-URL: #17338 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[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.