-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
meta: state of deprecations #19561
Comments
BTW: Probably the wrong repo to say this, but this sounds like a strategic initiative material. |
Interesting. That's not my experience. Tests sill pass for me when I run |
Another thing about our deprecations that can be improved: We don't supply a deprecation code when something lands on master. This means that tests for the deprecation have to check the deprecation message rather than the deprecation code. This is brittle. The reason we don't supply a deprecation code is because we create codes incrementally. DEP005 is followed by DEP006 etc. I'd like us to stop doing that and instead find some way to generate unique codes at the time that the code for the deprecation is written. If the deprecation code never lands on master, that's fine. We'll still need deprecation codes to have an easily understood order so they can be found in the documentation without any trouble. So they will still need to be increasing, just not always increasing by 1. |
That's not true. Sometimes we forget to assign a code, but we are supposed to do it when the deprecation lands on master. |
Thanks for the correction. The problem remains: We don't supply a deprecation code at the time the PR is opened. Tests are written to check for the message rather than the code, which results in a brittle test. |
Welp, I'm wrong. Tests indeed do fail. Guess I've been doing a lit of |
We can ask to check for the code. Test is written with |
Ooh, didn't realize that! 🎉 |
Seems like this conversation ran its course. Feel free to re-open if there's more to say. |
I took the advice from @Trott and @targos and lived with this in my
.zshrc
for a while (I also suggest people who want to runtime-deprecate Buffers try that and feel the burn, so to speak)And I've noticed a few issues:
npm install
, there will be DEP0005 warnings from duplexify, it's fixed in Avoid using deprecated Buffer API mafintosh/duplexify#17 by @ChALkeR but we have not yet updated the deps to use the new versionWe should have a better story around our deprecations if we want our users to take them seriously. Possible enhancement:
doc/guides
about how to maintain the deprecations in core (I am surprised there isn't one...I think someone tried to write a guide before? Forgive me if my memory is incorrect)react/no-deprecated
eslint plugincc @nodejs/tsc
The text was updated successfully, but these errors were encountered: