Skip to content

lib: avoid REPL exit on completion error - #3358

Merged
Trott merged 1 commit into
nodejs:masterfrom
Trott:fix-issue-3346
Oct 21, 2015
Merged

lib: avoid REPL exit on completion error#3358
Trott merged 1 commit into
nodejs:masterfrom
Trott:fix-issue-3346

Conversation

@Trott

Copy link
Copy Markdown
Member

If a tab completion is attempted on an undefined reference inside of a
function, the REPL was exiting without reporting an error or anything
else. This change results in the REPL reporting the ReferenceError and
continuing.

Fixes: #3346

@Trott

Copy link
Copy Markdown
MemberAuthor

@mscdexmscdex added the repl Issues and PRs related to the REPL subsystem. label Oct 14, 2015
@Trott

Copy link
Copy Markdown
MemberAuthor

Fixed borkage. CI take two: https://ci.nodejs.org/job/node-test-commit/836/

@Trott

Copy link
Copy Markdown
MemberAuthor

Removed a line, so one more CI: https://ci.nodejs.org/job/node-test-commit/837/

@Trott

Copy link
Copy Markdown
MemberAuthor

More tweaks! I should go to sleep. Last CI for a while I hope: https://ci.nodejs.org/job/node-test-commit/838/

@bnoordhuis

Copy link
Copy Markdown
Member

LGTM. The addition of the .top property makes it technically a semver-minor, I think?

@Trott

Copy link
Copy Markdown
MemberAuthor

@bnoordhuis Since it's intended for internal use only, perhaps I can hide it a bit by making the property key a Symbol rather than the string top. Or if that's overkill, maybe I can at least prefix it with _.

@bnoordhuis

Copy link
Copy Markdown
Member

I'd go with a symbol.

@Trott

Copy link
Copy Markdown
MemberAuthor

@bnoordhuis I did a Symbol implementation but then went a step further and hid the properties entirely using a WeakMap. PTAL

@Trott

Copy link
Copy Markdown
MemberAuthor

@Trott

Copy link
Copy Markdown
MemberAuthor

Bump. I think this is good for a merge... /cc @bnoordhuis

@jasnell

Copy link
Copy Markdown
Member

LGTM... err. I mean, WTIC /cc @Trott

@jasnell

Copy link
Copy Markdown
Member

@Trott ... can I ask you to squash the commits and I'll get it landed.

If a tab completion is attempted on an undefined reference inside of a
function, the REPL was exiting without reporting an error or anything
else. This change results in the REPL reporting the ReferenceError and
continuing.
Fixes: nodejs#3346
PR-URL: nodejs#3358
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott
Trottforce-pushed the fix-issue-3346 branch 2 times, most recently from f8e494b to b354be7CompareOctober 21, 2015 22:35
@Trott

Copy link
Copy Markdown
MemberAuthor

Rebased to master, squashed, running one last CI before landing on master: https://ci.nodejs.org/job/node-test-commit/909/

@Trott
Trott merged commit b354be7 into nodejs:masterOct 21, 2015
@Trott

Copy link
Copy Markdown
MemberAuthor

Landed in b354be7

Trott added a commit that referenced this pull request Oct 22, 2015
If a tab completion is attempted on an undefined reference inside of a
function, the REPL was exiting without reporting an error or anything
else. This change results in the REPL reporting the ReferenceError and
continuing.
Fixes: #3346
PR-URL: #3358
Reviewed-By: James M Snell <jasnell@gmail.com>
Trott added a commit that referenced this pull request Oct 26, 2015
If a tab completion is attempted on an undefined reference inside of a
function, the REPL was exiting without reporting an error or anything
else. This change results in the REPL reporting the ReferenceError and
continuing.
Fixes: #3346
PR-URL: #3358
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell

Copy link
Copy Markdown
Member

Landed in v4.x-staging in 1888f84

Trott added a commit that referenced this pull request Oct 29, 2015
If a tab completion is attempted on an undefined reference inside of a
function, the REPL was exiting without reporting an error or anything
else. This change results in the REPL reporting the ReferenceError and
continuing.
Fixes: #3346
PR-URL: #3358
Reviewed-By: James M Snell <jasnell@gmail.com>
@Fishrock123

Copy link
Copy Markdown
Contributor

@Trott just noticing this, could you please make sure to be more specific for the subsystem? i.e. repl instead of lib (Only use lib when it really affects like everything, or more than 2-3). :D

@Trott

Trott commented Nov 3, 2015

Copy link
Copy Markdown
MemberAuthor

👍

@Trott
Trott deleted the fix-issue-3346 branch January 13, 2022 22:29
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

replIssues and PRs related to the REPL subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Trott@bnoordhuis@jasnell@Fishrock123@mscdex