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

Typing non-halting code in the REPL causes it to hang indefinitely #54555

Closed
winrg opened this issue Aug 25, 2024 · 1 comment
Closed

Typing non-halting code in the REPL causes it to hang indefinitely #54555

winrg opened this issue Aug 25, 2024 · 1 comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@winrg
Copy link

winrg commented Aug 25, 2024

Version

v22.4.1

Platform

Linux Aleteoryx 6.6.40-1-lts #1 SMP PREEMPT_DYNAMIC Mon, 15 Jul 2024 09:23:08 +0000 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

  1. run the node REPL
  2. type while (true) {}, without pressing enter
  3. realize your terminal has hung, and ctrl-c is unavailable

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

always. i'd assume this is the REPL trying to generate a completion and in turn executing the loop

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

perhaps the completer should be killed after a certain period? i've encountered similar issues when trying to use the node CLI to query large JSON datasets, but those all finish in finite time. i'm not sure if it would be possible, given how the event loop works, but the preferable behavior would be to have the completer be interrupted on any keypress.

What do you see instead?

see above

Additional information

No response

@RedYetiDev RedYetiDev closed this as not planned Won't fix, can't repro, duplicate, stale Aug 25, 2024
@RedYetiDev
Copy link
Member

RedYetiDev commented Aug 25, 2024

Duplicate of #54193

(Got it correct now, sorry for linking the wrong issue)

@RedYetiDev RedYetiDev marked this as a duplicate of #54504 Aug 25, 2024
@RedYetiDev RedYetiDev added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

2 participants