Skip to content

Instantly share code, notes, and snippets.

@ScalaWilliam

ScalaWilliam/sample.bash

Last active Feb 12, 2017
Embed
What would you like to do?
Scala ScriptEngine doesn't seem to be working as before in 2.12.1/2.12.0 via SBT.
# SBT + 2.11.8 gives us an IMain
$ sbt
> set scalaVersion := "2.11.8"
> console
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
scala> new javax.script.ScriptEngineManager().getEngineByName("scala")
res0: javax.script.ScriptEngine = scala.tools.nsc.interpreter.IMain@52f09302
# Loading SBT + 2.12.1 gives us a null
$ sbt
> set scalaVersion := "2.12.1"
> console
Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
scala> new javax.script.ScriptEngineManager().getEngineByName("scala")
res0: javax.script.ScriptEngine = null
# Here it loads a completely different class from IMain. Why is this?
$ scala
Welcome to Scala 2.12.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
scala> new javax.script.ScriptEngineManager().getEngineByName("scala")
res0: javax.script.ScriptEngine = scala.tools.nsc.interpreter.Scripted@71cea1b8
# I can't seem to find anything about this on www.scala-lang.org/news/2.12.0
@lare96

This comment has been minimized.

Copy link

@lare96 lare96 commented Feb 12, 2017

Any updates on why this is happening? Super frustrating!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment