Skip to content
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

util: move custom inspection function to EOL #20525

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented May 4, 2018

Move the use of custom inspection function to End-of-Life.

Ref: #15549

Checklist

Move the use of custom inspection function to End-of-Life.

Ref: nodejs#15549
@Trott Trott added util Issues and PRs related to the built-in util module. semver-major PRs that contain breaking changes and should be released in the next major version. notable-change PRs with changes that should be highlighted in changelogs. deprecations Issues and PRs related to deprecations. labels May 4, 2018
@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label May 4, 2018
@Trott Trott added this to the 11.0.0 milestone May 4, 2018
@Trott
Copy link
Member Author

Trott commented May 4, 2018

@Trott
Copy link
Member Author

Trott commented May 4, 2018

Since this is semver-major, it's going to need some @nodejs/tsc reviews. (Fortunately, it is a one-line change.)

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@TimothyGu TimothyGu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message should be changed to

"util: move custom .inspect function to EOL"

We still support custom inspection through the inspect symbol.

@TimothyGu
Copy link
Member

Also, does this require any code changes?

@addaleax
Copy link
Member

addaleax commented May 4, 2018

Also, does this require any code changes?

Yes, I think we want to remove the corresponding code from lib/util.js.

@Trott
Copy link
Member Author

Trott commented May 5, 2018

Also, does this require any code changes?

Yes, I think we want to remove the corresponding code from lib/util.js.

My initial reading of the documentation left me with the impression that the process was to move the API to End-of-Life and then (optionally!) remove the API itself in a subsequent release. Reviewing a second time, it appears that perhaps we can remove the API at the same time as moving it to End-of-Life, but it does not appear to be required. It can be removed at a later date (unless I'm missing something?).

@Trott
Copy link
Member Author

Trott commented May 5, 2018

My initial reading of the documentation left me with the impression that the process was to move the API to End-of-Life and then (optionally!) remove the API itself in a subsequent release.

/ping @jasnell because I believe he was the original author of the deprecation policy. Was the intention for things to be removed at the same time as moving to End-of-Life? Or to potentially be removed subsequently? Or both situations were expected to arise?

@addaleax
Copy link
Member

addaleax commented May 5, 2018

@Trott I guess just wouldn’t know what “End-of-Life” would mean, if not a full removal of the API? At least it seems odd to keep a runtime deprecation but not call it that way in the docs…?

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to come with the code change.

@Trott
Copy link
Member Author

Trott commented May 5, 2018

@Trott I guess just wouldn’t know what “End-of-Life” would mean, if not a full removal of the API?

I can see the thinking there for sure, but according to our documentation:

End-of-Life deprecation is used to identify code that either has been removed or will soon be removed from Node.js.

@addaleax
Copy link
Member

addaleax commented May 5, 2018

@Trott yeah … not sure what to think of that in the docs :/

Like, in particular I don’t quite understand what benefit users get from having something listed as EoL over having it listed as runtime-deprecated? Is it to say that we’re committed to removing it in the next major version? In that case we might want to just say that explicitly…?

@Trott
Copy link
Member Author

Trott commented May 5, 2018

This has to come with the code change.

I can certainly see how one might assume that, and perhaps we should changing our process to requiring that removal happen at time of labeling EOL, but right now, our documentation says:

An End-of-Life deprecation is used to identify code that either has been removed or will soon be removed from Node.js.

So removal is not necessary. (It should happen soon, though.)

@Trott
Copy link
Member Author

Trott commented May 5, 2018

@Trott yeah … not sure what to think of that in the docs :/

Maybe we should consider changing it to be more in line with the understandable intuition you and @BridgeAR have about it. It will need to be changed in both deprecations.md and COLLABORATOR_GUIDE.md. We'll also need to go through existing EOL deprecations and make sure they are all in fact removed.

@joyeecheung
Copy link
Member

Can you add a TODO where the DEP0079 warning is emitted? Just in case it is forgotten..

@jasnell
Copy link
Member

jasnell commented May 6, 2018

The idea is that End-of-life takes the thing out from under the semver-rules so that it can either be removed or more freely refactored, whichever the case may be. Typically, it means removal and, yes, it can be removed the same time as it hits End-of-life

@BridgeAR
Copy link
Member

I opened #20722 for completely removing custom inspection.

This should be fine to land but I would prefer to land it right before ##20722 and not any earlier. So I just added the blocked label.

I still think we should rewrite our guidelines to recommend to always do the actual breaking change at the same time as the documentation change. Otherwise there is no real point in changing the documentation as far as I can tell.

@BridgeAR BridgeAR added the blocked PRs that are blocked by other issues or PRs. label May 14, 2018
@Trott
Copy link
Member Author

Trott commented May 14, 2018

@BridgeAR Since this PR is a one-line trivial change, feel free to add that to your PR (if you haven't already) and close this one. (Or if you're a stickler for preserving author credit, you can cherry-pick my commit into your PR. But I don't think that's necessary in this case.)

@addaleax
Copy link
Member

Or if you're a stickler for preserving author credit

Btw, something I learned today: https://help.github.com/articles/creating-a-commit-with-multiple-authors/ :)

@BridgeAR
Copy link
Member

Superseded by #20722

@BridgeAR BridgeAR closed this May 19, 2018
@Trott Trott deleted the eol-time branch January 13, 2022 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked PRs that are blocked by other issues or PRs. deprecations Issues and PRs related to deprecations. doc Issues and PRs related to the documentations. notable-change PRs with changes that should be highlighted in changelogs. semver-major PRs that contain breaking changes and should be released in the next major version. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants