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

watch: --watch=true flag runs infinite loop #51159

Closed
pulkit-30 opened this issue Dec 14, 2023 · 0 comments · Fixed by #51160
Closed

watch: --watch=true flag runs infinite loop #51159

pulkit-30 opened this issue Dec 14, 2023 · 0 comments · Fixed by #51160

Comments

@pulkit-30
Copy link
Contributor

pulkit-30 commented Dec 14, 2023

Version

v20.10.0 (also on v22.0.0-pre)

Platform

Darwin Pulkits-MacBook-Air.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:12 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T8103 arm64

Subsystem

No response

What steps will reproduce the bug?

code:

console.log("hello world!");

run this with node --watch=true index.mjs. (can also reproduced with --test flag).

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

Always

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

simple behavior same as with node --watch index.mjs.

What do you see instead?

pulkitgupta@Pulkits-MacBook-Air node % ./node --watch=true index.mjs
(node:26067) ExperimentalWarning: Watch mode is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26068) ExperimentalWarning: Watch mode is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26069) ExperimentalWarning: Watch mode is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26070) ExperimentalWarning: Watch mode is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26071) ExperimentalWarning: Watch mode is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26072) ExperimentalWarning: Watch mode is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26073) ExperimentalWarning: Watch mode is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26074) ExperimentalWarning: Watch mode is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26075) ExperimentalWarning: Watch mode is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26076) ExperimentalWarning: Watch mode is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26077) ExperimentalWarning: Watch mode is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
^C%              

Additional information

Edit: Maybe passing watch flag as --watch=false is wrong way, but an infinite loop is not something I was expecting :/

Edit: More in dept, i figured out it is not related to test_runner.

@pulkit-30 pulkit-30 changed the title test_runner: --watch=true flag runs infinite loop fs_watch: --watch=true flag runs infinite loop Dec 15, 2023
@pulkit-30 pulkit-30 changed the title fs_watch: --watch=true flag runs infinite loop watch: --watch=true flag runs infinite loop Dec 15, 2023
nodejs-github-bot pushed a commit that referenced this issue Dec 16, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
PR-URL: #51160
Fixes: #51159
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
RafaelGSS pushed a commit that referenced this issue Jan 2, 2024
PR-URL: #51160
Fixes: #51159
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
richardlau pushed a commit that referenced this issue Mar 25, 2024

Verified

This commit was signed with the committer’s verified signature.
richardlau Richard Lau
PR-URL: #51160
Fixes: #51159
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant