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

NodeJS REPL first line strange behaviour #3194

Closed
ghost opened this issue Oct 5, 2015 · 19 comments
Closed

NodeJS REPL first line strange behaviour #3194

ghost opened this issue Oct 5, 2015 · 19 comments
Labels
confirmed-bug Issues with confirmed bugs. repl Issues and PRs related to the REPL subsystem. windows Issues and PRs related to the Windows platform.

Comments

@ghost
Copy link

ghost commented Oct 5, 2015

NodeJS 4.1.2, Windows 10 (x64), REPL:

C:\Users\admin\Desktop>node
> 1+1 // also ctrl+c, ctrl+d dont work here
1+1 // wtf?
2
> 1+1 // now works as intended
2
@brendanashworth brendanashworth added repl Issues and PRs related to the REPL subsystem. windows Issues and PRs related to the Windows platform. labels Oct 6, 2015
@silverwind
Copy link
Contributor

Maybe a duplicate of #2996.

@silverwind
Copy link
Contributor

Was able to reproduce in a VM and narrow it down a bit:

  • Last good: 3.0.0
  • First bad: 3.1.0

@silverwind silverwind added the confirmed-bug Issues with confirmed bugs. label Oct 6, 2015
@silverwind
Copy link
Contributor

Commit window: v3.0.0...v3.1.0. Nothing obvious there at least.

@Fishrock123
Copy link
Contributor

Fwiw, crtl+d will not exit the repl if there are still characters on the line. (Side note: it should delete them instead, but it doesn't? Probably another bug. Edit it does, to the RIGHT: https://github.com/nodejs/node/blob/master/lib/readline.js#L701-L708)

@silverwind possible commits:

1738c96 (Net interacts with stdio)
1f12e03...455ec57 (buffers...)

@silverwind
Copy link
Contributor

Looks like I was drunk when doing that regression window. Actual window is v2.3.4...v2.4.0. Suspecting bd01603, maybe 59f6b5d. cc: @rlidwka

@ghost ghost changed the title Node 4.1 REPL first line strange behaviour NodeJS REPL first line strange behaviour Oct 13, 2015
@anseki
Copy link

anseki commented Oct 17, 2015

This may be related to #2504.
This problem is existing since iojs-v2.3.2.

@silverwind
Copy link
Contributor

#2504, like #2996 look to be caused by 8cee8f5.

My earlier regression test on this issue points to an issue present since 2.4.0.

@anseki
Copy link

anseki commented Oct 17, 2015

@silverwind
I think so too.
v2.3.2, v4.2.1, etc. have issue #2504.
In v2.3.1-, no problem:

@silverwind
Copy link
Contributor

Let's not confuse ourselves here. I'll try to bisect this (#3194) issue now.

@anseki
Copy link

anseki commented Oct 17, 2015

Ok.
Of course I confirmed that the #3194 (i.e. strange in REPLE) is existing in v2.3.2.

@Fishrock123
Copy link
Contributor

@silverwind any luck?

@silverwind
Copy link
Contributor

The bug only seems to manifest on Windows 10, possibly 8, so no luck on my 7 machine. I'll have to set up a VM, it's going to take a while.

@Fishrock123
Copy link
Contributor

hmm, maybe it's something related to our handling of stdin on those machines?.

@silverwind
Copy link
Contributor

I'm positive this was fixed in af46112, seems I forgot to reference this issue.

@fatfisz
Copy link

fatfisz commented Dec 22, 2015

Is there a chance of this landing in LTS any time soon? This is a bug, not a feature :)

@MylesBorins
Copy link
Contributor

this will be landing with 4.2.4 this week

@fatfisz
Copy link

fatfisz commented Dec 22, 2015

Good to hear that, thanks.

@fatfisz
Copy link

fatfisz commented Apr 28, 2016

The exact same thing is happening in node 6 😢

@silverwind
Copy link
Contributor

silverwind commented Apr 28, 2016

Yes, it regressed again in 5.7.0, the current issue is at #5384.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. repl Issues and PRs related to the REPL subsystem. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

6 participants