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

[SW-352] Flow UI Scala Repl: use paste mode to interpret commands passed through Flow UI #2209

Merged
merged 2 commits into from
Jul 2, 2020

Conversation

jakubhava
Copy link
Contributor

@jakubhava jakubhava commented Jul 1, 2020

Oldtimer JIRA. Implemented while waiting for the K8s tests to finish.

See https://0xdata.atlassian.net/browse/SW-352 for more details

try loop()
catch AbstractOrMissingHandler()
try {
val text = Iterator.continually(in.readLine("")).takeWhile(x => x != null).mkString("\n")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why "" is passed to readline?

Copy link
Contributor Author

@jakubhava jakubhava Jul 1, 2020

Choose a reason for hiding this comment

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

Based on the method readLine it seems like it's a prompt to print, but in this case, we don't need to print any, so that is why ""

 protected def readOneLine(prompt: String): String = {
   echo(prompt)
   readOneLine()
 }

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh ok, thanks!

Copy link
Collaborator

@mn-mikke mn-mikke left a comment

Choose a reason for hiding this comment

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

LGTM

@jakubhava jakubhava merged commit 58b04ff into master Jul 2, 2020
@jakubhava jakubhava deleted the jh/SW-352 branch July 2, 2020 05:24
jakubhava added a commit that referenced this pull request Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants