replpp.scripting

Members list

Type members

Classlikes

Main entrypoint for ScriptingDriver, i.e. it takes commandline arguments and executes a script on the current JVM. Note: because it doesn't spawn a new JVM it doesn't work in all setups: e.g. when starting from sbt test with fork := false it runs into classloader/classpath issues. Same goes for some IDEs, depending on their classloader setup. Because of these issues, the forking ScriptRunner is the default option. It simply spawns a new JVM and invokes the NonForkingScriptRunner :)

Main entrypoint for ScriptingDriver, i.e. it takes commandline arguments and executes a script on the current JVM. Note: because it doesn't spawn a new JVM it doesn't work in all setups: e.g. when starting from sbt test with fork := false it runs into classloader/classpath issues. Same goes for some IDEs, depending on their classloader setup. Because of these issues, the forking ScriptRunner is the default option. It simply spawns a new JVM and invokes the NonForkingScriptRunner :)

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object ScriptRunner

Executes a script by spawning/forking a new JVM process and then invoking the NonForkingScriptRunner.

Executes a script by spawning/forking a new JVM process and then invoking the NonForkingScriptRunner.

Alternatively you can directly invoke the NonForkingScriptRunner, but some environments have complex classloader setups which cause issues with the non-forking ScriptRunner - examples include some IDEs and sbt (e.g. test|console) in non-fork mode. Therefor, this forking ScriptRunner is the default one.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
class ScriptingDriver(compilerArgs: Array[String], scriptFile: Path, scriptArgs: Array[String], verbose: Boolean) extends Driver

Runs a given script on the current JVM.

Runs a given script on the current JVM.

Similar to dotty.tools.scripting.ScriptingDriver, but simpler and faster. Main difference: we don't (need to) recursively look for main method entrypoints in the entire classpath, because we have a fixed class and method name that ScriptRunner uses when it embeds the script and predef code.

Attributes

Companion
object
Supertypes
class Driver
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
case class ScriptingException(msg: String) extends RuntimeException

Attributes

Supertypes
trait Product
trait Equals
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all