This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Embedded interpreter Scala 2.9

No replies
Niels
Joined: 2011-06-04,
User offline. Last seen 42 years 45 weeks ago.

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?

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland