You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EmptyResolutionInfoProvider is created by an [object declaration](https://kotlinlang.org/docs/object-declarations.html#object-declarations) which fails to import in pure java code. The `embedKernel` method is intended to be called inside pure Java code that simply has the compiled kotlin kernel jars available as a dependency, but the former signature after the refactor in 782f088#diff-3c1c4b1ddbb3338fe28601f266bb3c492ac38a395dafb1c3ad4b60a8ffeedc62R85 makes this impossible. This commit makes the `resolutionInfoProvider` nullable again, which also means that existing code using the method and passing null, still works with the the signature using `ResolutionInfoProvider`
Copy file name to clipboardexpand all lines: src/main/kotlin/org/jetbrains/kotlinx/jupyter/ikotlin.kt
+6-2
Original file line number
Diff line number
Diff line change
@@ -80,13 +80,17 @@ fun main(vararg args: String) {
80
80
/**
81
81
* This function is to be run in projects which use kernel as a library,
82
82
* so we don't have a big need in covering it with tests
83
+
*
84
+
* The expected use case for this function is embedding into a Java application that doesn't necessarily support extensions written in Kotlin
85
+
* The signature of this function should thus be simple, and e.g. allow resolutionInfoProvider to be null instead of having to pass EmptyResolutionInfoProvider
86
+
* because EmptyResolutionInfoProvider is a Kotlin singleton object and cannot be imported in Java code.
0 commit comments