-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
crypto: fix error handling in KeyObject.export #26455
crypto: fix error handling in KeyObject.export #26455
Conversation
|
I prefer to think of this as a bug-fix of a (so far) rarely used API, but yeah, I guess it is technically a breaking change... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m okay with semver-patch.
I thought the policy was "all error message changes are semver-major", so that we didn't have to guess the impact, we just called the changes semver-major (except by decision of TSC, they can always overrule anything if deemed in best interest of node). Did that change? Do I misremember? |
@sam-github I think that is still true, so unless the TSC is in favor of semver-patch (@addaleax, maybe others), this should technically be semver-major. (I forgot to add the label in the first place, sorry.) |
Even for what i’d call missed input assertion or an “uncaught”? Interesting |
c6eefdb
to
a9b9639
Compare
a9b9639
to
2accf31
Compare
@nodejs/tsc PTAL about semverness. |
I can't find current policy. I find https://github.com/nodejs/node/blob/master/COLLABORATOR_GUIDE.md#breaking-changes-and-deprecations
That this is in the list implies that such changes are at least sometimes semver-major, but not that they are always. Maybe? IANAL. Personally, I think its unlikely to cause trouble to introduce this as a patch. But, my understanding was that historically Node.js guessing an error message change wouldn't cause trouble didn't work out so well, so .code was introduced, and error message changes were considered semver-major until a .code is introduced, at which point they become informational. My understanding has been wrong before, though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're trying to get a majority of TSC to 👍 landing this on master without the semver-major label: I'm OK with patch for this. 👍
Thanks for reviewing, everyone! Landed in 3afa5d7. @nodejs/tsc Based on the previous discussion, I am not adding the semver-major label. Feel free to add it if you think it is appropriate. |
This change only affects KeyObject.export(). PR-URL: #26455 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This does not land cleanly on v11. It also seems that even fixing the conflict is not enough as a test fails in that case. It would be nice if this would be manually backported if it should be backported at all. |
This change only affects KeyObject.export(). Backport-PR-URL: nodejs#26688 PR-URL: nodejs#26455 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This change only affects KeyObject.export(). Backport-PR-URL: #26688 PR-URL: #26455 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This change only affects KeyObject.export(). PR-URL: nodejs/node#26455 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This change only affects
KeyObject.export()
:Old error message:
New error message:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes