-
-
Notifications
You must be signed in to change notification settings - Fork 33k
repl: do not cause side effects in tab completion #59774
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
repl: do not cause side effects in tab completion #59774
Conversation
a916498
to
e518d76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for looking into it!
This should also supersede and close #58943, if I am not mistaken.
e518d76
to
5eae957
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #59774 +/- ##
==========================================
- Coverage 89.94% 89.92% -0.03%
==========================================
Files 667 669 +2
Lines 197207 197547 +340
Branches 38521 38594 +73
==========================================
+ Hits 177378 177636 +258
- Misses 12253 12302 +49
- Partials 7576 7609 +33
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 😄
(besides the test file header that I think should be removed 🙂)
A number of recent changes to the REPL tab completion logic have introduced the ability for completion to cause side effects, specifically, calling arbitrary functions or variable assignments/updates. This was first introduced in 0722023 and the problem exacerbated in 8ba66c5. Our team noticed this because our tests started failing when attempting to update to Node.js 20.19.5. Some recent commits, such as 1093f38 or 6945337, have messages or PR descriptions that imply the intention to avoid side effects, which I can can generally be agreed upon is in line with the expectations that a user has of autocomplete functionality. However, some of the tests introduced in those commts specifically verify that side effects *can* happen under specific circunmstances. I am assuming here that this is unintentional, and the corresponding tests have been removed/replaced in this commit. Fixes: nodejs#59731 Fixes: nodejs#58903 Refs: nodejs#58709 Refs: nodejs#58775 Refs: nodejs#57909 Refs: nodejs#58891
5eae957
to
7e9f266
Compare
Landed in 6cf64af |
A number of recent changes to the REPL tab completion logic have introduced the ability for completion to cause side effects, specifically, calling arbitrary functions or variable assignments/updates. This was first introduced in 0722023 and the problem exacerbated in 8ba66c5. Our team noticed this because our tests started failing when attempting to update to Node.js 20.19.5. Some recent commits, such as 1093f38 or 6945337, have messages or PR descriptions that imply the intention to avoid side effects, which I can can generally be agreed upon is in line with the expectations that a user has of autocomplete functionality. However, some of the tests introduced in those commts specifically verify that side effects *can* happen under specific circunmstances. I am assuming here that this is unintentional, and the corresponding tests have been removed/replaced in this commit. Fixes: #59731 Fixes: #58903 Refs: #58709 Refs: #58775 Refs: #57909 Refs: #58891 PR-URL: #59774 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Dario Piotrowicz <[email protected]>
A number of recent changes to the REPL tab completion logic have introduced the ability for completion to cause side effects, specifically, calling arbitrary functions or variable assignments/updates.
This was first introduced in 0722023 and the problem exacerbated in 8ba66c5. Our team noticed this because our tests started failing when attempting to update to Node.js 20.19.5.
Some recent commits, such as 1093f38 or 6945337, have messages or PR descriptions that imply the intention to avoid side effects, which I can can generally be agreed upon is in line with the expectations that a user has of autocomplete functionality.
However, some of the tests introduced in those commts specifically verify that side effects can happen under specific circunmstances. I am assuming here that this is unintentional, and the corresponding tests have been removed/replaced in this commit.
Fixes: #58903
Fixes: #59731
Refs: #58709
Refs: #58775
Refs: #57909
Refs: #58891