-
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
Revert 17907: util: change inspect depth default #20017
Conversation
While this option definitely needs to stay on the table, I'm not yet ready to agree that this is the right thing to do... for a couple of reasons:
I'm perfectly fine with not including the original commit in 10.0.0 but before we revert we should look at alternatives. |
Yes, and I like the suggestion of a maximum string length that @BridgeAR brought up – That’s not an easy thing to do, though. Also, from a purely pragmatical point of view, the current situation would be that if we don’t land both #17907 and a revert on
Yea, I don’t think relying on something that has been the default for literally 8+ years qualifies as an “issue in user-code” in any way. |
Also: Even if we do the maximum string length approach or something like that, I still think this is the right thing to do (for the reasons given in the commit message). |
As I said, I'm all for not including this in 10.0.0. I'd like to just do a bit more investigation of other options before we revert. |
👍 on not including the change of default in 10, but let's wait a bit more before landing this. |
Instead of a revert, could we just back this out of v10 and have it be scheduled to land in v11? Or do we want each major to represent the state of master at the related point in time? |
@apapirovski Yes, backing it out is the current plan. Also, as said above, there are other factors that played into the decision to open a revert (unblocking other PRs that wouldn’t go into 10.x + the change in semantics not being a good one). |
@mcollina Can you give a ballpark number for the time frame you had in mind? (And, ideally, a reason would be nice as well…) |
After 10 goes out and we can discuss about it with less urgency? There is a lot of traffic on a lot of issues atm. I think something should be done about it. This might be the path to go, and then we do something else instead. |
@mcollina I’m sorry, I don’t mean to imply that landing this PR would mean an end of the discussion. I do agree that But, unfortunately, there is urgency in the sense that we do need this revert to land before Node 10, either on |
@addaleax ... Can you open a separate revert PR against v10.x-staging? I'll get it landed on Tuesday when I do the next round of updates on that branch. |
@jasnell That also gives merge conflicts because v10.x-staging isn’t quite caught up to master yet, so if I were to open a revert “backport” PR now we’d just have to take care of those later again … let me know when you’ve updated the branch and I can open a PR then, if that’s ok with you |
Ok that works
On Apr 14, 2018 14:48, "Anna Henningsen" <[email protected]> wrote:
@jasnell <https://github.com/jasnell> That also gives merge conflicts
because v10.x-staging isn’t quite caught up to master yet, so if I were to
open a revert “backport” PR now we’d just have to take care of those later
again … let me know when you’ve updated the branch and I can open a PR
then, if that’s ok with you
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20017 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAa2eVL0drGkZSZNXtwZqGPUnn13tqz8ks5tom6XgaJpZM4TUG5b>
.
|
Just marking this explicit PR as blocked for now. |
@addaleax .... I just updated |
Landed in f145a53...5096e24. I changed the test title as agreed upon with @addaleax |
Make sure that a long singly-linked list can be passed to `util.inspect()` without causing a stack overflow. PR-URL: #20017 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Revert "util: change util.inspect depth default"
This reverts commit b994b8e.
This caused regressions in ecosystem code. While the change originally
was semver-major and could be postponed until after Node.js 10,
I think reverting it is a good choice at this point.
Also, I personally do not think defaulting to a shallow inspect
is a bad thing at all – quite the opposite: It makes
util.inspect()
give an overview of an object, rather than providing a full
display of its contents. Changing the
depth
default to infinityfundamentally changed the role that
util.inspect()
plays,and makes output much more verbose and thus at times unusable
for
console.log()
-style debugging.Fixes: npm: last nightly / v8-canary make
npm update
unusable #19405Refs: util: change inspect depth default #17907
Revert "util: change %o depth default"
This reverts commit 8f15309.
(#19994 also has a
Fixes:
tag for #19405, but it’s independent from this PR and is not uncontroversial)make -j4 test
(UNIX), orvcbuild test
(Windows) passes