-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
process: deprecate process assert #18666
Conversation
If this is going to be removed, I don't think it makes sense to also swap out the underlying assertion function. |
@cjihrig the reason why I did this is because there are still two assert calls in there and it is semver-major anyway. But I can keep the function as it was before if you prefer that. |
I'd prefer leaving the implementation as is, but I'm fine with deprecating. Should probably run CITGM just in case. |
But why? Continuing to support it indefinitely is basically free. |
It's also used quite a bit out in the wild. I don't feel strongly about it but I don't see a compelling reason to deprecate it, except maybe for OOWTDI (Only One Way To Do It.) |
ba1c28c
to
a17869a
Compare
I rebased due to conflicts and addressed the comment to keep the old function in place. I personally definitely prefer OOWTDI, especially because this is much more limited than the assert module. |
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.
LGTM
I remember @bnoordhuis saying some time that that’s what documentation deprecations are there for, and I still agree with that. ;) |
Light-CI https://ci.nodejs.org/job/node-test-commit-light/244/ (enough to test this change) @addaleax I personally think it would be better to get the code ported to newer one and if it is once implemented, people will probably not realize that it is there. |
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 in favour of this. I don't really like having a random function on the process
object that seems to do a fraction of what the actual assert.ok
does. Esp since it's not even documented...
Taking the more general discussion here to #18682. Fwiw, my personal preference would be |
Just to be clear, |
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.
LGTM. Usage is really low.
Grep for
And half of those is from Node.js copies, tests, or examples, others are abadoned and unused. I don't see a reason for not runtime-deprecating it. |
@ChALkeR unrelated to this pr, how do you grep packages like that |
@devsnek I also upload grep-able datasets to http://oserv.org/npm/Gzemnid/, but that server is out of free space currently… |
609f887
to
0359b63
Compare
Rebased due to conflicts. @addaleax is it OK for you if this lands as is or do you want to give a explicit -1? |
Sure :-) |
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 ok with moving forward if the analysis is that usage is very low.
@addaleax if I understand your update correct, you are now fine if this lands? |
@BridgeAR Well, I’m not a fan, but I’m not going to block this either… |
This was never documented and the `assert` module should be used instead.
0359b63
to
af70bb6
Compare
New CI before landing https://ci.nodejs.org/job/node-test-pull-request/13204/ (I rebased due to deprecations.md conflicts). |
This was never documented and the `assert` module should be used instead. PR-URL: nodejs#18666 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 703e37c |
This was never documented and the `assert` module should be used instead. PR-URL: nodejs#18666 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This was never documented and the
assert
module should be used instead. So let us just deprecate this.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
process