s
-.txt
i
Another dependency that could help is
kotlin-scripting-impl
.
I’m not 100% sure though. I’ll try to reproduce your scenario now. But you can try to do it meanwhile.
We made some significant refactoring - scripting functionality is moved to separate jars, but seems that the scenario is not covered by our tests.
s
Nope same error with
kotlin-scripting-impl
If you want to try yourself
i
Ok. I’ll look into it.
s
Just checkout https://github.com/spring-projects/spring-framework
master
branch and remove
@Ignore
from
KotlinScriptTemplateTests
classes in
spring-mvc
and
spring-webflux
modules.
👍 1
Thanks
i
So, it seems you need the following changes to make it work:
Copy code
Index: spring-webmvc/spring-webmvc.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- spring-webmvc/spring-webmvc.gradle	(revision e84347554e586ce8470fe46277c5b3f9460e8f1a)
+++ spring-webmvc/spring-webmvc.gradle	(date 1555071039000)
@@ -74,6 +74,7 @@
 	testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
 	testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
 	testRuntime("org.jetbrains.kotlin:kotlin-compiler-embeddable:${kotlinVersion}")
+	testRuntime("org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:${kotlinVersion}")
 	testRuntime("org.jruby:jruby:9.2.6.0")
 	testRuntime("org.python:jython-standalone:2.7.1")
 	testRuntime("org.webjars:underscorejs:1.8.3")
Index: spring-webflux/spring-webflux.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- spring-webflux/spring-webflux.gradle	(revision e84347554e586ce8470fe46277c5b3f9460e8f1a)
+++ spring-webflux/spring-webflux.gradle	(date 1555072262000)
@@ -59,6 +59,7 @@
 	testCompile(project(":spring-core-coroutines"))
 	testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
 	testRuntime("org.jetbrains.kotlin:kotlin-compiler-embeddable:${kotlinVersion}")
+	testRuntime("org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:${kotlinVersion}")
 	testRuntime("org.jruby:jruby:9.2.6.0")
 	testRuntime("org.python:jython-standalone:2.7.1")
 	testRuntime("org.synchronoss.cloud:nio-multipart-parser:1.1.0")
Basically you need to add dependency to the
kotlin-scripting-compiler-embeddable
But the problem is that I don’t know how to solve it from our side at the moment. Could you tell me, how are Spring users became aware that they need to add
kotlin-compiler(-embeddable)
to the classpath?
Because it is basically the same problem now - the scripting part is being extracted into a separate jar(s)
I probably know how to solve it on the long run - by introducing a standard jar with an engine and all dependencies, but this is not something we can do in 1.3.31.
s
Maybe 1.3.40 then ?
I was hesitating to deprecate this feature before this issue
I guess we need to reach a point where this is supported correctly like any other JSR 223 technology we support or just deprecate and drop such support on our side.
i
Thank you for the comment. I answered there too. Just as a summary - I think it is possible to make some standard JSR-223 distribution for the 1.3.40 release, and we are now in a good position to do it. Hopefully this solution is good enough for you. Meanwhile, I hope that the temporary solution from above will work too.
s
Ok thanks a lot
We can probably just wait 1.3.40 for a real solution, I just hope it will be there before July 3rd.
i
Ok. According to our typical release cycles, the 1.3.40 should definitely happen before july.
s
Perfect then