Uh oh!
There was an error while loading. Please reload this page.
src,lib: rename FSReqWrap to FSReqCallback - #21971
Conversation
maclover7
commented
Jul 26, 2018
The change to the binding and to the resource types are potentially breaking so this may be semver-major. cc @nodejs/diagnostics Does it matter if the async resource type |
mmarchini
commented
Jul 26, 2018
I understand the reason behind this, but doesn't that mean we'll need to change the name of every wrapper once its API get a promise interface? If that's the case, we might as well change everything at once to avoid multiple breaking changes (the changes to async_hooks are semver-major IMO). |
maclover7
commented
Jul 26, 2018
@mmarchini Unfortunately, it depends. For example, the PR to add the promisified |
joyeecheung
commented
Jul 26, 2018
FWIW, putting |
Flarna
commented
Jul 26, 2018
The doc in async hooks states "The type is a string identifying the type of resource that caused init to be called. Generally, it will correspond to the name of the resource's constructor.". Based on this we have to leak implementation details. On the other hand there is no detailed specification which async resources exist (within node core) and what exactly they represent. I would also prefer to have a cleaner separation of implementation details and async hook resource names. As async hooks are still experimental such an API change should be currently not semver major to my understanding - but will be once they are no longer experimental. |
jasnell
commented
Jul 27, 2018
Not technically semver-major, no, but async_hooks are starting to be used extensively so we should still be careful and considerate about such changes. |
addaleax
commented
Jul 27, 2018
Uh … can we split this into a backportable part and a semver-major change for the |
Given that FSReqPromise does not inherit from FSReqWrap, FSReqWrap should be renamed FSReqCallback to better describe what it does. First of a few upcoming `fs` refactorings :)
maclover7
commented
Jul 28, 2018
Updated @addaleax (note to self/future backporters -- the second commit is the semver-major one :)) |
maclover7
commented
Jul 28, 2018
maclover7
commented
Aug 1, 2018
maclover7
commented
Aug 1, 2018
Landed in 27a5338...f479050, thank you for the reviews! |
Given that FSReqPromise does not inherit from FSReqWrap, FSReqWrap should be renamed FSReqCallback to better describe what it does. First of a few upcoming `fs` refactorings :) PR-URL: #21971 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #21971 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Correct async hooks resource names to match the implementation: `FSREQWRAP` => `FSREQCALLBACK` `TCPSERVER` => `TCPSERVERWRAP` PR-URL: nodejs#24001 Refs: nodejs#21971 Refs: nodejs#17157 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Given that FSReqPromise does not inherit from FSReqWrap, FSReqWrap
should be renamed FSReqCallback to better describe what it does.
First of a few upcoming
fsrefactorings :)Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes