Skip to content

Remove Worksheet dependency on JLine #5320

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

Merged
merged 2 commits into from
Oct 29, 2018
Merged

Conversation

allanrenucci
Copy link
Contributor

The worksheet used to spawn a REPL with JLine just to be able to read
from an InputStream.

This is alternative solution that simply uses java.util.Scanner to read
from an InputStream. For that, we need to agree on a delimiter. We
choose a character within the private user area to not conflict with
the output produced by the REPL.

@allanrenucci
Copy link
Contributor Author

allanrenucci commented Oct 23, 2018

@smarter @Duhemm Should we just use the deprecated Thread::stop and run the REPL within the same process as the worksheet? Running a command in a sub-process adds a lot complexity...

The worksheet used to spawn a REPL with JLine just to be able to read
from an InputStream.

This is alternative solution that simply uses java.util.Scanner to read
from an InputStream. For that, we need to agree on a delimiter. We
choose a character within the private user area to not conflict with
the output produced by the REPL.
@smarter
Copy link
Member

smarter commented Oct 23, 2018

Running a thread in the same process does not protect against OufOtOfMemoryException, calls to System.exit, etc. Ideally I think we should have a repl server protocol and communicate with the repl process that way.

@smarter smarter requested a review from Duhemm October 24, 2018 11:54
@allanrenucci allanrenucci assigned Duhemm and unassigned smarter Oct 26, 2018
Copy link
Contributor

@Duhemm Duhemm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner 👍

@Duhemm Duhemm merged commit ff9d7ed into scala:master Oct 29, 2018
@Duhemm Duhemm deleted the worksheet branch October 29, 2018 08:35
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 this pull request may close these issues.

3 participants