Perfect your code
With built-in code review tools, GitHub makes it easy to raise the quality bar before you ship. Join the 36 million developers who've merged over 200 million pull requests.
Sign up for free See pricing for teams and enterprisesRevert 17907: util: change inspect depth default #20017
Conversation
addaleax
requested review from
BridgeAR and
nodejs/tsc
Apr 13, 2018
nodejs-github-bot
added
repl
util
labels
Apr 13, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
|
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). |
This comment has been minimized.
This comment has been minimized.
|
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. |
Trott
approved these changes
Apr 13, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
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? |
This comment has been minimized.
This comment has been minimized.
|
@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). |
This comment has been minimized.
This comment has been minimized.
@mcollina Can you give a ballpark number for the time frame you had in mind? (And, ideally, a reason would be nice as well…) |
TimothyGu
approved these changes
Apr 14, 2018
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
@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 |
This comment has been minimized.
This comment has been minimized.
|
@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. |
This comment has been minimized.
This comment has been minimized.
|
@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 |
This comment has been minimized.
This comment has been minimized.
|
Ok that works
On Apr 14, 2018 14:48, "Anna Henningsen" <notifications@github.com> 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>
.
|
cjihrig
approved these changes
Apr 14, 2018
joyeecheung
approved these changes
Apr 15, 2018
This comment has been minimized.
This comment has been minimized.
|
Just marking this explicit PR as blocked for now. |
BridgeAR
added
the
blocked
label
Apr 16, 2018
jasnell
added
blocked
and removed
blocked
labels
Apr 16, 2018
This comment has been minimized.
This comment has been minimized.
|
@addaleax .... I just updated |
jasnell
referenced this pull request
Apr 16, 2018
Closed
[10.x] Revert 17907: util: change inspect depth default #20089
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Landed in f145a53...5096e24. I changed the test title as agreed upon with @addaleax |
addaleax commentedApr 13, 2018
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
depthdefault 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: #19405
Refs: #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