| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Could have a semicolon after the }?
Sorry, something went wrong.
There was a problem hiding this comment.
Absolutely. I didn't want to change too much code with this refactor though - I've only changed how it's run (E.g. to run after the user hits enter, instead of each line). Here's the original check: https://github.com/nodejs/node/pull/6171/files/680c88111413ad25bafbe9d7578079d6c0ca5ff0#diff-b13d72249263845d8e8341db0426f9d3L426. Could definitely change to check to include a semicolon.
Sorry, something went wrong.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/3018/ Seems to me this changes enough properties that it is probably semver-major.. |
Sorry, something went wrong.
|
Looks like the CI is refusing to run with a rebase, CI without rebasing: https://ci.nodejs.org/job/node-test-pull-request/3019/ |
Sorry, something went wrong.
|
@Fishrock123 I just rebased again on top of the changes that have occurred. Is there anything I can do to make this land? It'd be very convenient for myself and others that have built custom REPLs for transpiled programming languages. I intend to use this to support running TypeScript in a REPL with multiple lines. Although not a big deal for TypeScript, since it follows JavaScript semantics, it's might be more useful for transpile language targets that may fail the existing "should code fail" checks used in the line parser. It also helps to separate the existing concerns that are mixed as new features get added to the JavaScript implementation that aren't relevant for transpiled languages. |
Sorry, something went wrong.
|
@nodejs/collaborators can someone review? |
Sorry, something went wrong.
|
@blakeembrey ... do you still want to pursue this? |
Sorry, something went wrong.
|
@jasnell I will refactor again if someone will review it and thinks it's useful. Otherwise, not really. It is still required to improve interop with transpiler REPLs where recovery/new lines can be detected differently. |
Sorry, something went wrong.
|
Yep. Understood. I'll commit to reviewing. |
Sorry, something went wrong.
|
I'll review it too. |
Sorry, something went wrong.
|
@targos @jasnell I just updated the PR and it's passing locally. I'm not sure if the CI build is meant to be running? Edit: I see I'm meant to wait (https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#ci-testing) 😄 |
Sorry, something went wrong.
|
CI 3: https://ci.nodejs.org/job/node-test-commit/8236/ EDIT: CI is green |
Sorry, something went wrong.
|
This has conflicts. |
Sorry, something went wrong.
Move the core logic from `LineParser` should fail handling into the recoverable error check for the REPL default eval.
Sorry, something went wrong.
Sorry, something went wrong.
Move the core logic from `LineParser` should fail handling into the recoverable error check for the REPL default eval. PR-URL: #6171 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
|
Landed in 39d9afe. Thank you @blakeembrey. Sorry again for this taking so long! |
Sorry, something went wrong.
|
Thanks @jasnell for landing this, and everyone else involved 😄 |
Sorry, something went wrong.
| return; | ||
| } else if (!self.bufferedCommand) { | ||
| self.outputStream.write('Invalid REPL keyword\n'); | ||
| if (trimmedCmd) { |
There was a problem hiding this comment.
I think this broke the command line debugger. Previously an empty command would be sent to the eval function. Now <enter> is silently ignored.
The CLI debugger was using <enter> for "repeat last command".
Sorry, something went wrong.
There was a problem hiding this comment.
Ugh. Ok, we can back it out if necessary but let's see if we can find a fix first.
/cc @blakeembrey
Sorry, something went wrong.
There was a problem hiding this comment.
Let's also see if we can get a regression test added since this case obviously wasn't being tested in CI :-(
Sorry, something went wrong.
There was a problem hiding this comment.
Don't think this is super urgent, was just digging through why it passed against the last 8.x nightly but not against master.
Sorry, something went wrong.
There was a problem hiding this comment.
I think the fix is as simple as removing that else branch: #11871
Sorry, something went wrong.
This fixes a regression introduced in nodejs#6171
Move the core logic from `LineParser` should fail handling into the recoverable error check for the REPL default eval. PR-URL: nodejs#6171 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This fixes a regression introduced in nodejs#6171 PR-URL: nodejs#11871 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
Added backport-requested-v6.x since that will fix #15704. PR coming soon. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
Description of change
Move the core logic from LineParser should fail handling into the recoverable error check for the REPL default eval. This was originally from #3488, and I've split it out for separate review and hopefully speed it up. The idea is to make the current recoverable check part of the default eval instead of limiting the usefulness of the REPL functionality to only JavaScript languages (E.g. enable TypeScript).