Abstract script compiled module implementation used in saving/caching
removes classloading problem when main-kts is loaded from a CL without scripting compiler. Also relax dependencies collection on saving to a jar and hide redundant logging. Running main.kts script via a run configuration works now. #KT-37765 fixed
This commit is contained in:
+2
-2
@@ -8,7 +8,7 @@ package kotlin.script.experimental.jvmhost.test
|
||||
import junit.framework.TestCase
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.jetbrains.kotlin.scripting.compiler.plugin.impl.CompiledScriptClassLoader
|
||||
import org.jetbrains.kotlin.scripting.compiler.plugin.impl.KJvmCompiledModuleInMemory
|
||||
import org.jetbrains.kotlin.scripting.compiler.plugin.impl.KJvmCompiledModuleInMemoryImpl
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader
|
||||
import org.jetbrains.org.objectweb.asm.ClassVisitor
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes
|
||||
@@ -348,7 +348,7 @@ class ScriptingHostTest : TestCase() {
|
||||
assertTrue(compiledScript is ResultWithDiagnostics.Success)
|
||||
|
||||
val jvmCompiledScript = compiledScript.valueOrNull()!! as KJvmCompiledScript
|
||||
val jvmCompiledModule = jvmCompiledScript.compiledModule as KJvmCompiledModuleInMemory
|
||||
val jvmCompiledModule = jvmCompiledScript.compiledModule as KJvmCompiledModuleInMemoryImpl
|
||||
val bytes = jvmCompiledModule.compilerOutputFiles["SavedScript.class"]!!
|
||||
|
||||
var classFileVersion: Int? = null
|
||||
|
||||
Reference in New Issue
Block a user