We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to use Knit to test some .kts scripts. I've had lots of problems though, even though the code works when I run it within a main() function.
.kts
main()
Here's an example of a script that fails
import java.io.ByteArrayOutputStream import java.io.PrintStream import javax.script.ScriptEngineManager import kotlin.io.path.Path import kotlin.test.* @Test fun testBasicEval() { val engine = ScriptEngineManager().getEngineByExtension("main.kts")!! val res1 = engine.eval("val x = 3") assertNull(res1) val res2 = engine.eval("x + 2") assertEquals(5, res2) }
The test is from https://github.com/Kotlin/kotlin-script-examples/tree/master/jvm/jsr223/jsr223-main-kts.
It produces this error whenever I declare Knit as a dependency.
ERROR Unable to initialize repl compiler: DEBUG Using JVM IR backend ERROR 'void org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.<init>(org.jetbrains.kotlin.com.intellij.psi.PsiManager)': java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.<init>(org.jetbrains.kotlin.com.intellij.psi.PsiManager)': java.lang.IllegalStateException: Unable to initialize repl compiler: DEBUG Using JVM IR backend ERROR 'void org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.<init>(org.jetbrains.kotlin.com.intellij.psi.PsiManager)': java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.<init>(org.jetbrains.kotlin.com.intellij.psi.PsiManager)' javax.script.ScriptException: ERROR Unable to initialize repl compiler: DEBUG Using JVM IR backend ERROR 'void org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.<init>(org.jetbrains.kotlin.com.intellij.psi.PsiManager)': java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.<init>(org.jetbrains.kotlin.com.intellij.psi.PsiManager)': java.lang.IllegalStateException: Unable to initialize repl compiler: DEBUG Using JVM IR backend ERROR 'void org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.<init>(org.jetbrains.kotlin.com.intellij.psi.PsiManager)': java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.<init>(org.jetbrains.kotlin.com.intellij.psi.PsiManager)'
I'm following the example in this repo: https://github.com/Kotlin/kotlin-script-examples/tree/master/jvm/jsr223/jsr223-main-kts
Here's a quick reproduction: https://github.com/asemy/kotlinx-knit/tree/bug/41-jsr223-error
The text was updated successfully, but these errors were encountered:
reproduce Kotlin#41
5cd65d6
No branches or pull requests
I'm trying to use Knit to test some
.kts
scripts. I've had lots of problems though, even though the code works when I run it within amain()
function.Here's an example of a script that fails
The test is from https://github.com/Kotlin/kotlin-script-examples/tree/master/jvm/jsr223/jsr223-main-kts.
It produces this error whenever I declare Knit as a dependency.
I'm following the example in this repo: https://github.com/Kotlin/kotlin-script-examples/tree/master/jvm/jsr223/jsr223-main-kts
Here's a quick reproduction: https://github.com/asemy/kotlinx-knit/tree/bug/41-jsr223-error
The text was updated successfully, but these errors were encountered: