-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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: allow to disable only custom inspect "named" method #16266
Conversation
The code changes LGTM, and I'm fine with the idea, I'm just not entirely sure if this is the right approach. I could be easily swayed, however. I'm curious how other @nodejs/collaborators feel about it. |
Hm, the code change itself looks good to me but adding a specific option for such a edge case feels a bit much to me. |
As I see it it's the way to give control to the user of This approach while adding an API, seems like it's simpler codewise. Also since the runtime deprecation will not make it to 9.0.0, this hack would probably be with us for at least one more year. |
I definitely see the reasoning behind this but I'm still a bit unsure. Hey @nodejs/tsc... any thoughts? |
Btw, practically speaking you can already choose which behaviour you want by setting |
I also think a command line flag just for this is a bit much. |
@refack was there ever a request to have the possibility to do exactly this? Because I am not aware of that. So it would be adding a option that is likely not required and in that case I would like to go ahead and close this PR. |
I think I'm -1 on this particular change for precisely the reason @addaleax mentions. |
@refack If you do want to continue pursuing this, this PR would need a rebase |
Closing due to no response and because four people are not in favor of this. |
Refs: #15549
Refs: #15631
This add a switch that allows disabling just the "named" custom inspect method.
Except for the immediate benefit, this also allows future deprecation by defaulting to
false
and warning only on changing the default. Or allowing to turn this off so that deprecation warning will not be emitted.CI: https://ci.nodejs.org/job/node-test-pull-request/10791/
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
util