Skip to content

Strange repl eager-eval behavior #37585

Closed
@bl-ue

Description

@bl-ue
  • Version: output of node -v
  • Platform: Darwin iMac.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
  • Subsystem: repl?

What steps will reproduce the bug?

  1. start the node repl: node

  2. type a few numbers in but don't press enter, e.g. 1<backspace>2<backspace>3<backspace>. no eager-eval should be printed

  3. type a number followed by a decimal point e.g. 1.<backspace>. the eager-eval should be immediately triggered. When you type in 1 again (without the decimal point), you'll see eager-eval prints 1, but only for 1, not any other numbers

  4. Type a different number followed by a period e.g. 6.<backspace>. Now eager-eval will only print when you type 6

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

Always. None.

What is the expected behavior?

eager-eval should print the number regardless of the decimal point.

What do you see instead?

eager-eval only prints the number you typed if just before you typed it, you typed the number with a decimal point

Additional information

Introduced in version 13.4.0 and 12.17.0. Looks like it's caused by #30811 (which introduced the feature in the first place)

Metadata

Metadata

Assignees

No one assigned

    Labels

    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