Skip to content

Speculative execution in REPL shows TypeError overwriting input #54504

Closed
@mikesamuel

Description

@mikesamuel

Version

v22.6.0

Platform

Darwin Mikes-MacBook-Pro.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:00 PDT 2024; root:xnu-10063.141.2~1/RELEASE_X86_64 x86_64

Subsystem

No response

What steps will reproduce the bug?

As shown in attached video:

  1. From command line run node
  2. At the prompt, enter the following without hitting enter: '\v'.codeAt(0)
  3. As soon as the close parenthesis is typed, see:

TypeError: "
".codeAt is not a function

The vertical tab pulled the cursor away from the prompt line.

Mitigation: Hitting Ctrl-l resets the cursor to expected.

node-screen-session-typeahead.mov

How often does it reproduce? Is there a required condition?

Occurs every time

What is the expected behavior? Why is that the expected behavior?

The REPL cursor should stay on the prompt line, not overlap any error message due to speculative execution.

What do you see instead?

The vertical tab pulled the cursor away from the prompt line.

Additional information

No response

Metadata

Metadata

Assignees

Labels

confirmed-bugIssues with confirmed bugs.replIssues and PRs related to the REPL subsystem.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions