Is JVM-IR already supported for scripting? I had s...
# scripting
a
Is JVM-IR already supported for scripting? I had some problems running JVM-IR code from kotlin-jupyter (as always, it is serialization runtime). And JVM-IR is almost the default now.
i
There is some support, but it turned off by default. It will remain so for some time, we are not sure that it is mature enough yet. The short term plan is to fix some known issues (almost done) and after it will land on some EAP/release - announce a way to turn it on experimentally.
a
My problem is with this bug: https://github.com/Kotlin/kotlin-jupyter/issues/131. It is related to serialization, but arises only in jupyter.
The problem arises only in the xml, but it seems to be caused by the serialization runtime.
And here is the reproducer (at least in jupyter):
Copy code
@file:DependsOn("org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.1.0")
import kotlinx.serialization.builtins.*
Boolean.serializer().descriptor.isInline
cc @pdvrieze since I've reported it in the xmlutil.
It works in IDEA kts though
p
I was under the impression that isInline is available in the non-IR version of the serialization library (of the new version)
a
The problem seems to be Jupyter-specific. It substitutes the serialization runtime from the library with the one it uses itself. For Json it works probably because Json does not use this function in the code without exlicit inline objects.
i
cc: @Ilya Muradyan
a
@ilya.chernikov We've already fixed this. The problem was that jupyter kernel leaked its own classpath on top of script class-path.
i
Ah, ok, fine then.
a
But I think that it is somehow related to scripting because this leak should not be possible. As far as I can understand @Ilya Muradyan simpli bloced internal libraries propagation: https://github.com/Kotlin/kotlin-jupyter/commit/adaadf2bbedf67a4560b14b59269703b96226497
i
No, it's not related to scripting.
api
artifact needs to expose
kotlinx-serialization
as
implementation
/
api
as it's the part of its API, and it doesn't work without it (i.e. with
compileOnly
). But it adds
kotlinx-serialization
transitively to deploy configuration which is undesired for us, so I've excluded it manually.