You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@toree.apache.org by "Jakob Odersky (JIRA)" <ji...@apache.org> on 2017/01/28 01:42:24 UTC
[jira] [Created] (TOREE-365) Certain interpreter evaluations do not
return result strings
Jakob Odersky created TOREE-365:
-----------------------------------
Summary: Certain interpreter evaluations do not return result strings
Key: TOREE-365
URL: https://issues.apache.org/jira/browse/TOREE-365
Project: TOREE
Issue Type: Bug
Reporter: Jakob Odersky
The scala interpreter currently only returns results for expressions. Import statements and declarations will not show up as results in a notebook (although they are evaluated internally).
This behaviour is related to the [ScalaInterpreter#truncateResult|(https://github.com/apache/incubator-toree/blob/master/scala-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/scala/ScalaInterpreter.scala#L165-L187] function. This function runs the result string of a REPL line through a regex, in order to remove the "resX:" part. The function returns the empty string in case the line does not start with "resX:", therefore returning an empty string for import statements and other declarations. This can have several subtle side effects, such as TOREE-340, or a toree client never completing the "onResult" callback.
A quick fix to this issue is to return the result string as-is if it does not start with "resX".
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)