Implement params to pass args to generic and remote repls to support script templates with params

This commit is contained in:
Ilya Chernikov
2016-09-22 11:36:19 +02:00
parent f0d2f458e0
commit 43037373d7
6 changed files with 30 additions and 7 deletions
@@ -35,7 +35,9 @@ open class KotlinRemoteReplClientBase(
targetPlatform: CompileService.TargetPlatform,
templateClasspath: List<File>,
templateClassName: String,
compilerMessagesOutputStream: OutputStream,
scriptArgs: Array<Any?>? = null,
scriptArgsTypes: Array<Class<*>>? = null,
compilerMessagesOutputStream: OutputStream = System.err,
evalOutputStream: OutputStream? = null,
evalErrorStream: OutputStream? = null,
evalInputStream: InputStream? = null,
@@ -49,6 +51,8 @@ open class KotlinRemoteReplClientBase(
CompilerCallbackServicesFacadeServer(port = port),
templateClasspath,
templateClassName,
scriptArgs,
scriptArgsTypes,
RemoteOutputStreamServer(compilerMessagesOutputStream, port),
evalOutputStream?.let { RemoteOutputStreamServer(it, port) },
evalErrorStream?.let { RemoteOutputStreamServer(it, port) },
@@ -104,6 +108,8 @@ class KotlinRemoteReplEvaluator(
targetPlatform: CompileService.TargetPlatform,
templateClasspath: List<File>,
templateClassName: String,
scriptArgs: Array<Any?>?,
scriptArgsTypes: Array<Class<*>>?,
compilerMessagesOutputStream: OutputStream,
evalOutputStream: OutputStream?,
evalErrorStream: OutputStream?,
@@ -117,6 +123,8 @@ class KotlinRemoteReplEvaluator(
targetPlatform = targetPlatform,
templateClasspath = templateClasspath,
templateClassName = templateClassName,
scriptArgs = scriptArgs,
scriptArgsTypes = scriptArgsTypes,
compilerMessagesOutputStream = compilerMessagesOutputStream,
evalOutputStream = evalOutputStream,
evalErrorStream = evalErrorStream,