Get rid of eval on daemon completely, fixes also JSR 223 examples

This commit is contained in:
Ilya Chernikov
2017-02-09 10:00:01 +01:00
parent a3a782613a
commit 63aae56b11
7 changed files with 20 additions and 52 deletions
@@ -534,12 +534,12 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
fun testDaemonReplLocalEvalNoParams() {
withDaemon { daemon ->
val repl = KotlinRemoteReplCompilerClient(daemon!!, null, CompileService.TargetPlatform.JVM,
emptyArray(),
TestMessageCollector(),
classpathFromClassloader(),
ScriptWithNoParam::class.qualifiedName!!,
ScriptArgsWithTypes(emptyArray(), emptyArray()))
withDisposable { disposable ->
val repl = KotlinRemoteReplCompilerClient(daemon!!, null, CompileService.TargetPlatform.JVM,
emptyArray(),
TestMessageCollector(),
classpathFromClassloader(),
ScriptWithNoParam::class.qualifiedName!!)
val localEvaluator = GenericReplEvaluator(emptyList(), Thread.currentThread().contextClassLoader)
@@ -550,11 +550,11 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
fun testDaemonReplLocalEvalStandardTemplate() {
withDaemon { daemon ->
val repl = KotlinRemoteReplCompilerClient(disposable, daemon!!, null, CompileService.TargetPlatform.JVM, emptyArray(),
TestMessageCollector(),
classpathFromClassloader(),
"kotlin.script.templates.standard.ScriptTemplateWithArgs",
ScriptArgsWithTypes(emptyArray(), emptyArray()))
withDisposable { disposable ->
val repl = KotlinRemoteReplCompilerClient(daemon!!, null, CompileService.TargetPlatform.JVM, emptyArray(),
TestMessageCollector(),
classpathFromClassloader(),
"kotlin.script.templates.standard.ScriptTemplateWithArgs")
val localEvaluator = GenericReplEvaluator(emptyList(), Thread.currentThread().contextClassLoader,
ScriptArgsWithTypes(arrayOf(emptyArray<String>()), arrayOf(Array<String>::class)))
@@ -609,8 +609,7 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
emptyArray(),
TestMessageCollector(),
classpathFromClassloader(),
ScriptWithNoParam::class.qualifiedName!!,
ScriptArgsWithTypes(emptyArray(), emptyArray()))
ScriptWithNoParam::class.qualifiedName!!)
val compilerState = replCompiler.createState()