<@UQ8NE6A86> does notebook kernel do any magic wit...
# science
a
@Ilya Muradyan does notebook kernel do any magic with the classpath? For some reason, I can't access ktor server package. The CIO Jar is properly added to the classpath, but I can't access it.
i
Magic is done only with classloaders, so if the library tries to find something in the system classloader, it will probably fail. It should use current classloader to succeed. I don't know what's exactly the logic implemented in ktor
a
It should be the basic logic. It sees some of the packages, but not the server. Maybe there is something to do with multiplatform. But the proper JVM library is on the classpath
If I add JVM version explicitely, then I get very strange message:
the object is obviously resolved in the notebook, but it could not be seen from the library.
i
Resolution in the plugin works a bit differently, it uses the same classpath, but not the same classloader
a
Making all dependencies in integration library "api" and explicitely adding jvm variants to the notebook fixes thigs. It seems like multiplatform dependency resolution fails somewhere.
i
Probably adding CIO JAR before
%use ktor
should also fix the problem. I recall something very similar
a
I've added explicit dependencies and it fixed things. But for some reason classpath include common artifacts instead of JVM ones.
Maybe the problem is that I have Ktor <- JVM <- MPP <- MPP Notebook chain.
i
Consider executing
SessionOptions.resolveMpp = true
a
Yeah, it works. Takes tons of time on the first load to download all dependencies (I thing kind of status messages are needed).
Erm... it takes tons of time on each run...
Not very useful. But at least we know, where the problem comes from.