[ https://issues.apache.org/jira/browse/TOREE-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jakob Odersky closed TOREE-365. ------------------------------- Resolution: Won't Fix Closing as discussed in the pull request. See TOREE-368 for continuation. > 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.15#6346)