[ https://issues.apache.org/jira/browse/TOREE-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16048205#comment-16048205 ]
ASF GitHub Bot commented on TOREE-380: -------------------------------------- Github user rdblue commented on a diff in the pull request: https://github.com/apache/incubator-toree/pull/104#discussion_r121757635 --- Diff: scala-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/scala/ScalaInterpreter.scala --- @@ -18,30 +18,34 @@ package org.apache.toree.kernel.interpreter.scala import java.io.ByteArrayOutputStream -import java.net.{URL, URLClassLoader} -import java.nio.charset.Charset import java.util.concurrent.ExecutionException - import com.typesafe.config.{Config, ConfigFactory} +import jupyter.Displayers import org.apache.spark.SparkContext import org.apache.spark.sql.SparkSession import org.apache.spark.repl.Main - import org.apache.toree.interpreter._ -import org.apache.toree.kernel.api.{KernelLike, KernelOptions} +import org.apache.toree.kernel.api.KernelLike import org.apache.toree.utils.TaskManager import org.slf4j.LoggerFactory import org.apache.toree.kernel.BuildInfo - +import org.apache.toree.kernel.protocol.v5.MIMEType import scala.annotation.tailrec +import scala.collection.JavaConverters._ import scala.concurrent.{Await, Future} import scala.language.reflectiveCalls import scala.tools.nsc.Settings import scala.tools.nsc.interpreter.{IR, OutputStream} import scala.tools.nsc.util.ClassPath -import scala.util.{Try => UtilTry} +import scala.util.matching.Regex class ScalaInterpreter(private val config:Config = ConfigFactory.load) extends Interpreter with ScalaInterpreterSpecific { + import ScalaInterpreter._ + + ScalaDisplayers.ensureLoaded() --- End diff -- This makes sure that the registration in `ScalaDisplayers` happens when that class loads. > Interpreters should be allowed to send results other than text/plain. > --------------------------------------------------------------------- > > Key: TOREE-380 > URL: https://issues.apache.org/jira/browse/TOREE-380 > Project: TOREE > Issue Type: Improvement > Reporter: Ryan Blue > Assignee: Ryan Blue > > Jupyter allows kernels to send results using different content types, but > this isn't allowed by Toree for its interpreters. This prevents custom > display logic. The basic problem is that {{ExecuteOutput}} is a {{String}} > and not a {{Map[String, String]}} like {{CellMagicOutput}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029)