Skip to content

Conversation

@Trott
Copy link
Member

@TrottTrott commented Apr 6, 2016

Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

debugger

Description of change

In earlier versions of Node.js, pressing enter in the debugger resulted in the previous command running again. At some point, this was (accidentally, it appears) removed. This reinstates that behavior.

Not sure about the semver-ness of this. Could be a bug fix. Could be a new feature. Could be a breaking change. Inclined to just shrug/table-flip and make it semver-major. The Peoples won't see it until October, then, but The Peoples have been without it for more than a year now, so I think The Peoples will be OK.

Fixes: #2895

@jasnell
Copy link
Member

LGTM tho I believe a few of the edits to repl were landed in another commit?

@Trott
Copy link
MemberAuthor

Trott commented Apr 8, 2016

@jasnell Yes. That other PR has landed now. This one has been rebased against it. It just needs a doc update and consensus that this is a feature we want to restore.

@TrottTrottforce-pushed the a-la-mode branch 2 times, most recently from 9dbb4dc to 3330e5fCompareApril 8, 2016 22:11
@Trott
Copy link
MemberAuthor

Trott commented Apr 8, 2016

@Trott
Copy link
MemberAuthor

Trott commented Apr 8, 2016

@nodejs/collaborators This PR restores functionality that existed in the debugger in 0.10 but was (accidentally, I think) removed. Specifically, with this PR, if you are in the debugger and you press enter without entering a command, it will run the previous command. Useful if you don't want to type n 15 times in a row. See bug report at #2895.

Two questions:

  • Is this functionality we want to restore?
  • Is this semver-minor? major? patch?

@claudiorodriguez
Copy link
Contributor

  • semver: I think after a year, even if the change was accidental, the behaviour had enough time to become expected to anyone using it. IMHO I'd follow the spirit of semver, and make it a semver-major change. Also, this change will mostly break humans, and people tend to read up on changes in much more detail when they go up a semver-major number, so there's more chances they'll get notified. At the very least it's semver-minor.
  • Is this something we want back: this is 100% preference I think. My own is for a newline to do nothing (this is what most prompts do), not sure what the majority thinks.

@Trott
Copy link
MemberAuthor

Trott commented Apr 8, 2016

@claudiorodriguez Maybe we can restore the behavior but not as the default? Put it behind a command line flag or some other way to turn it on. Also eliminates guesswork on the semver-ness, as that would be a clear semver-minor.

@claudiorodriguez
Copy link
Contributor

@Trott That sounds like a good compromise to me.

@Trott
Copy link
MemberAuthor

Trott commented Apr 9, 2016

this is 100% preference I think. My own is for a newline to do nothing (this is what most prompts do),

If it matters, the gdb command line will repeat the last command if there is a blank line of input. https://sourceware.org/gdb/onlinedocs/gdb/Command-Syntax.html

lib/repl.js Outdated
Copy link
Member

Choose a reason for hiding this comment

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

'If'? I'm a bit uneasy about this check, it's not very robust. Doing setBreakPoint = 1 in the normal REPL will make this code think it's being called from the debugger.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@bnoordhuis You're right, of course. I think have a better solution that I've just pushed. PTAL.

@Trott
Copy link
MemberAuthor

Trott commented Apr 9, 2016

@Trott
Copy link
MemberAuthor

@Trott
Copy link
MemberAuthor

Known flaky with a proposed fix pending is the CI failure.

@Trott
Copy link
MemberAuthor

Not sure how to best get consensus on this other than keep asking collaborators to weigh in:

  • Do we want to restore the debugger behavior that was accidentally broken/removed wherein a blank command in the debugger REPL repeats the last command, like it does in gdb?
  • If so, do we want to just do it or do we want to put the restored behavior behind a flag or otherwise make it opt-in?
  • If we restore it without making it opt-in, is there general agreement that that is semver-major?
  • If your opinion is "restore it and don't hide it behind a flag or anything like that", then does this PR LGTY?

@bnoordhuis
Copy link
Member

LGTM. I'd just restore it as-is, it's just a bug fix.

@MylesBorins
Copy link
Contributor

I'm +1 on this change LGTM

@silverwindsilverwind changed the title debugger: run last command on presssing enterdebugger: run last command on pressing enterApr 13, 2016
@ChALkeR
Copy link
Member

Two questions:
Is this functionality we want to restore?
Is this semver-minor? major? patch?

+1 for restoring it. Looks semver-minor to me if it was missing in 4.x and 5.x.

@Trott
Copy link
MemberAuthor

I'm going to label this semver-minor. Speak up if you think that's an affront against semver-ness or something.

@TrottTrott added the semver-minor PRs that contain new features and should be released in the next minor version. label Apr 13, 2016
@Trott
Copy link
MemberAuthor

@claudiorodriguez Would you object to this landing as it is? (I want this to land, but I want every collaborator who has voiced an opinion to be reasonably comfortable with the choices we've made.)

@claudiorodriguez
Copy link
Contributor

@Trott no objections from me, I think we should go for what most people are comfortable with. LGTM. Also +1 on semver-minor

@cjihrig
Copy link
Contributor

LGTM

Trott added a commit to Trott/io.js that referenced this pull request Apr 14, 2016
PR-URL: nodejs#6090 Reviewed-By: James M Snell <[email protected]> Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Fixes: nodejs#2895
@Trott
Copy link
MemberAuthor

Landed in 1df84f4

@TrottTrott closed this Apr 14, 2016
MylesBorins pushed a commit that referenced this pull request Apr 20, 2016
PR-URL: #6090 Reviewed-By: James M Snell <[email protected]> Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Fixes: #2895
MylesBorins pushed a commit that referenced this pull request Apr 21, 2016
Buffer: * Buffer.prototype.compare can now compare sub-ranges of two Buffers (James M Snell) #5880 deps: * update to http-parser 2.7.0 (Fedor Indutny) #6279 * update ESLint to 2.7.0 (silverwind) #6132 net: * adds support for passing DNS lookup hints to createConnection() (Colin Ihrig) #6000 node: * Make the builtin libraries available for the --eval and --print CLI options (Anna Henningsen) #6207 npm: * upgrade npm to 3.8.6 (Kat Marchán) #6153 repl: * Pressing enter in the repl will repeat the last command by default if no input has been received. This behaviour was in node previously and was not removed intentionally. (Rich Trott) #6090 src: * add SIGINFO to supported signals (James Reggio) #6093 streams: * Fix a regression that caused by net streams requesting multiple chunks synchronously when combined with cork/uncork (Matteo Collina) #6164 zlib: * The flushing flag is now configurable allowing for decompression of partial data (Anna Henningsen) #6069
This was referenced Apr 21, 2016
MylesBorins pushed a commit that referenced this pull request Apr 21, 2016
PR-URL: #6090 Reviewed-By: James M Snell <[email protected]> Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Fixes: #2895
MylesBorins pushed a commit that referenced this pull request Apr 21, 2016
Buffer: * Buffer.prototype.compare can now compare sub-ranges of two Buffers (James M Snell) #5880 deps: * update to http-parser 2.7.0 (Fedor Indutny) #6279 * update ESLint to 2.7.0 (silverwind) #6132 net: * adds support for passing DNS lookup hints to createConnection() (Colin Ihrig) #6000 node: * Make the builtin libraries available for the --eval and --print CLI options (Anna Henningsen) #6207 npm: * upgrade npm to 3.8.6 (Kat Marchán) #6153 repl: * Pressing enter in the repl will repeat the last command by default if no input has been received. This behavior was in node previously and was not removed intentionally. (Rich Trott) #6090 src: * add SIGINFO to supported signals (James Reggio) #6093 streams: * Fix a regression that caused by net streams requesting multiple chunks synchronously when combined with cork/uncork (Matteo Collina) #6164 zlib: * The flushing flag is now configurable allowing for decompression of partial data (Anna Henningsen) #6069
MylesBorins pushed a commit that referenced this pull request Apr 21, 2016
Buffer: * Buffer.prototype.compare can now compare sub-ranges of two Buffers (James M Snell) #5880 deps: * update to http-parser 2.7.0 (Fedor Indutny) #6279 * update ESLint to 2.7.0 (silverwind) #6132 net: * adds support for passing DNS lookup hints to createConnection() (Colin Ihrig) #6000 node: * Make the builtin libraries available for the --eval and --print CLI options (Anna Henningsen) #6207 npm: * upgrade npm to 3.8.6 (Kat Marchán) #6153 repl: * Pressing enter in the repl will repeat the last command by default if no input has been received. This behaviour was in node previously and was not removed intentionally. (Rich Trott) #6090 src: * add SIGINFO to supported signals (James Reggio) #6093 streams: * Fix a regression that caused by net streams requesting multiple chunks synchronously when combined with cork/uncork (Matteo Collina) #6164 zlib: * The flushing flag is now configurable allowing for decompression of partial data (Anna Henningsen) #6069 PR-URL: #6322
MylesBorins pushed a commit that referenced this pull request Apr 21, 2016
Buffer: * Buffer.prototype.compare can now compare sub-ranges of two Buffers (James M Snell) #5880 deps: * update to http-parser 2.7.0 (Fedor Indutny) #6279 * update ESLint to 2.7.0 (silverwind) #6132 net: * adds support for passing DNS lookup hints to createConnection() (Colin Ihrig) #6000 node: * Make the builtin libraries available for the --eval and --print CLI options (Anna Henningsen) #6207 npm: * upgrade npm to 3.8.6 (Kat Marchán) #6153 repl: * Pressing enter in the repl will repeat the last command by default if no input has been received. This behaviour was in node previously and was not removed intentionally. (Rich Trott) #6090 src: * add SIGINFO to supported signals (James Reggio) #6093 streams: * Fix a regression that caused by net streams requesting multiple chunks synchronously when combined with cork/uncork (Matteo Collina) #6164 zlib: * The flushing flag is now configurable allowing for decompression of partial data (Anna Henningsen) #6069 PR-URL: #6322
joelostrowski pushed a commit to joelostrowski/node that referenced this pull request Apr 25, 2016
Buffer: * Buffer.prototype.compare can now compare sub-ranges of two Buffers (James M Snell) nodejs#5880 deps: * update to http-parser 2.7.0 (Fedor Indutny) nodejs#6279 * update ESLint to 2.7.0 (silverwind) nodejs#6132 net: * adds support for passing DNS lookup hints to createConnection() (Colin Ihrig) nodejs#6000 node: * Make the builtin libraries available for the --eval and --print CLI options (Anna Henningsen) nodejs#6207 npm: * upgrade npm to 3.8.6 (Kat Marchán) nodejs#6153 repl: * Pressing enter in the repl will repeat the last command by default if no input has been received. This behaviour was in node previously and was not removed intentionally. (Rich Trott) nodejs#6090 src: * add SIGINFO to supported signals (James Reggio) nodejs#6093 streams: * Fix a regression that caused by net streams requesting multiple chunks synchronously when combined with cork/uncork (Matteo Collina) nodejs#6164 zlib: * The flushing flag is now configurable allowing for decompression of partial data (Anna Henningsen) nodejs#6069 PR-URL: nodejs#6322
jasnell pushed a commit that referenced this pull request Apr 26, 2016
PR-URL: #6090 Reviewed-By: James M Snell <[email protected]> Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Fixes: #2895
jasnell pushed a commit that referenced this pull request Apr 26, 2016
Buffer: * Buffer.prototype.compare can now compare sub-ranges of two Buffers (James M Snell) #5880 deps: * update to http-parser 2.7.0 (Fedor Indutny) #6279 * update ESLint to 2.7.0 (silverwind) #6132 net: * adds support for passing DNS lookup hints to createConnection() (Colin Ihrig) #6000 node: * Make the builtin libraries available for the --eval and --print CLI options (Anna Henningsen) #6207 npm: * upgrade npm to 3.8.6 (Kat Marchán) #6153 repl: * Pressing enter in the repl will repeat the last command by default if no input has been received. This behaviour was in node previously and was not removed intentionally. (Rich Trott) #6090 src: * add SIGINFO to supported signals (James Reggio) #6093 streams: * Fix a regression that caused by net streams requesting multiple chunks synchronously when combined with cork/uncork (Matteo Collina) #6164 zlib: * The flushing flag is now configurable allowing for decompression of partial data (Anna Henningsen) #6069 PR-URL: #6322
@santigimeno
Copy link
Member

I think this should be marked as dont-land-on-v4.x because it depends on #6071 which is marked as dont-land-on-v4.x too.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-minorPRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

debugger: pressing enter doesn't run the latest action

9 participants

@Trott@jasnell@claudiorodriguez@bnoordhuis@MylesBorins@ChALkeR@cjihrig@santigimeno@Fishrock123