Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uplib: combine similar error codes #17648
Conversation
nodejs-github-bot
added
the
lib / src
label
Dec 13, 2017
This comment has been minimized.
This comment has been minimized.
|
I'm not for or against this, but it definitely defeats the purpose of the error code movement. Theoretically, the idea is that the error message strings can change freely but the codes themselves will never change. |
This comment has been minimized.
This comment has been minimized.
@cjihrig Agreed. But I think the reduction of error codes is also important. |
maclover7
added
the
semver-major
label
Dec 13, 2017
TimothyGu
approved these changes
Dec 13, 2017
|
Not too happy about this either, but more "not happy about the fact that we have to do this" than "not happy about the fact that we are doing this". |
jasnell
approved these changes
Dec 13, 2017
This comment has been minimized.
This comment has been minimized.
|
@cjihrig as far as I see it there is still going to be some work about that but it is going to reduce a lot over time. |
BridgeAR
approved these changes
Dec 13, 2017
BridgeAR
added
the
author ready
label
Dec 13, 2017
This comment has been minimized.
This comment has been minimized.
|
I mark this as ready even though it should probably wait the full 48 hours and how do we handle error codes at the moment? Do we still require two TSC votes on it? I remember that we spoke about loosening that in Vancouver but I am not sure what happened afterwards about it. |
This comment has been minimized.
This comment has been minimized.
|
changing error codes is definitely server-Major and would require two TSC votes |
This comment has been minimized.
This comment has been minimized.
|
I haven't reviewed the code but I'm +1 on the change |
Trott
approved these changes
Dec 14, 2017
starkwang
referenced this pull request
Dec 14, 2017
Closed
fs: migrate more errors to internal/errors #17667
maclover7
approved these changes
Dec 14, 2017
|
+1, good to take care of these types of changes while new error codes are still being introduced, hopefully won't be too much ecosystem breakage. |
This comment has been minimized.
This comment has been minimized.
|
Should this breaking change be documented somewhere, maybe the |
apapirovski
requested changes
Dec 14, 2017
|
Can we use Also, while at it, could you update to use Thanks! |
This comment has been minimized.
This comment has been minimized.
@apapirovski Actually there are 5 places using We use
Yes, I will fix it : ) |
This comment has been minimized.
This comment has been minimized.
There are 5 total instances of
The error message can be modified on |
This comment has been minimized.
This comment has been minimized.
|
I would rather use the |
This comment has been minimized.
This comment has been minimized.
|
I think I’d prefer Edit: Okay, in that case we might also want to call it “out of bounds”, not “out of range”… I still feel like that’s something that might be easy to mix up for non-native speakers of English |
addaleax
approved these changes
Dec 14, 2017
starkwang
force-pushed the
starkwang:combine-out-of-range-err
branch
from
4e412cf
to
0e23879
Dec 14, 2017
This comment has been minimized.
This comment has been minimized.
|
For The benefit of changing
IMO the introduction of |
This comment has been minimized.
This comment has been minimized.
|
Pushed commit to address comment. Changes are:
|
This comment has been minimized.
This comment has been minimized.
|
Also, this could potentially land in two separate commits:
I don't know if it's worth it but something to consider? |
apapirovski
approved these changes
Dec 14, 2017
| @@ -1568,7 +1568,7 @@ entry types were found. | |||
| <a id="ERR_VALUE_OUT_OF_RANGE"></a> | |||
| ### ERR_VALUE_OUT_OF_RANGE | |||
|
|
|||
| A given value is out of the accepted range. | |||
| **Discarded**. It has been replaced by `ERR_OUT_OF_RANGE`. | |||
This comment has been minimized.
This comment has been minimized.
apapirovski
Dec 14, 2017
Member
I wouldn't say discarded. Maybe just keep its description and say something like "Superseded by ERR_OUT_OF_RANGE." Maybe this should also somehow mention the Node.js version? I don't know... we don't have a policy around this right now, do we?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I'm not sure about that. The purpose of the movement was to allow the messages to be semver-patch. Actually then changing the code-meaning of the error is still semver-major just as normal. |
This comment has been minimized.
This comment has been minimized.
I don't think that's happening in this PR, is it? The meaning is still exactly the same, just with more insight. |
starkwang
force-pushed the
starkwang:combine-out-of-range-err
branch
from
0e23879
to
aef3c65
Dec 15, 2017
starkwang
force-pushed the
starkwang:combine-out-of-range-err
branch
from
aef3c65
to
94fdcc2
Dec 19, 2017
This comment has been minimized.
This comment has been minimized.
|
Rebased to resolve conflicts and fixed some broken tests. |
This comment has been minimized.
This comment has been minimized.
|
This needs another rebase. |
starkwang
force-pushed the
starkwang:combine-out-of-range-err
branch
from
94fdcc2
to
c0cd8da
Dec 21, 2017
This comment has been minimized.
This comment has been minimized.
|
Rebased to resolve conflicts. |
This comment has been minimized.
This comment has been minimized.
starkwang
force-pushed the
starkwang:combine-out-of-range-err
branch
from
c0cd8da
to
05fe291
Dec 23, 2017
This comment has been minimized.
This comment has been minimized.
|
Rebased again to resolve conflicts. |
This comment has been minimized.
This comment has been minimized.
starkwang
added a commit
that referenced
this pull request
Dec 24, 2017
This comment has been minimized.
This comment has been minimized.
|
Landed in d022cb1 |
starkwang commentedDec 13, 2017
•
edited
There two similar error codes in lib:
ERR_VALUE_OUT_OF_RANGEandERR_OUT_OF_RANGE. This change is to:ERR_VALUE_OUT_OF_RANGEFix: #17603
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)