Fix compiled script caching interface
This commit is contained in:
+3
-3
@@ -15,7 +15,7 @@ import kotlin.script.experimental.jvmhost.impl.withDefaults
|
|||||||
|
|
||||||
interface CompiledJvmScriptsCache {
|
interface CompiledJvmScriptsCache {
|
||||||
fun get(script: ScriptSource, scriptCompilationConfiguration: ScriptCompilationConfiguration): CompiledScript<*>?
|
fun get(script: ScriptSource, scriptCompilationConfiguration: ScriptCompilationConfiguration): CompiledScript<*>?
|
||||||
fun store(compiledScript: CompiledScript<*>, scriptCompilationConfiguration: ScriptCompilationConfiguration)
|
fun store(compiledScript: CompiledScript<*>, script: ScriptSource, scriptCompilationConfiguration: ScriptCompilationConfiguration)
|
||||||
|
|
||||||
object NoCache : CompiledJvmScriptsCache {
|
object NoCache : CompiledJvmScriptsCache {
|
||||||
override fun get(
|
override fun get(
|
||||||
@@ -23,7 +23,7 @@ interface CompiledJvmScriptsCache {
|
|||||||
): CompiledScript<*>? = null
|
): CompiledScript<*>? = null
|
||||||
|
|
||||||
override fun store(
|
override fun store(
|
||||||
compiledScript: CompiledScript<*>, scriptCompilationConfiguration: ScriptCompilationConfiguration
|
compiledScript: CompiledScript<*>, script: ScriptSource, scriptCompilationConfiguration: ScriptCompilationConfiguration
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,7 +53,7 @@ open class JvmScriptCompiler(
|
|||||||
|
|
||||||
return compilerProxy.compile(script, refinedConfiguration).also {
|
return compilerProxy.compile(script, refinedConfiguration).also {
|
||||||
if (it is ResultWithDiagnostics.Success) {
|
if (it is ResultWithDiagnostics.Success) {
|
||||||
cache.store(it.value, refinedConfiguration)
|
cache.store(it.value, script, refinedConfiguration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user