- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Embedded interpreter Scala 2.9
Wed, 2011-07-06, 14:04
I'd like to port an application I have written in Scala 2,8.1 to Scala
2.9, but I run into an incompatible change in the Interpreter.
The application uses an embedded interpreter to dynamically assemble
classes from a set of predefined traits. In Scala 2,8.1, I set up the
interpreter calling the constructor of
scala.tools.nsc.Interpreter(scala.tools.nsc.Settings) and subsequently
call compileAndSaveRun(String, String) with the class definition I
want to generate.
In Scala 2.9.0-1 the Interpreter class no longer has a
compileAndSaveRun(String, String) method.
What is the recommended way to embed an interpreter in Scala 2.9?