Kotlin kernel for Jupyter/IPython

Overview

JetBrains official project PyPI Anaconda Gradle plugin Maven Central GitHub Binder

Kotlin kernel for IPython/Jupyter

Kotlin (1.6.20-dev-6372) kernel for Jupyter.

Beta version. Tested with Jupyter Notebook 6.0.3, Jupyter Lab 1.2.6 and Jupyter Console 6.1.0 on Windows, Ubuntu Linux and macOS.

Screenshot in Jupyter

To start using Kotlin kernel for Jupyter take a look at introductory guide.

Example notebooks can be found in the samples folder

Try samples online: Binder

Installation

There are three ways to install the kernel:

Conda

If you have conda installed, just run the following command to install stable package version:

conda install -c jetbrains kotlin-jupyter-kernel (package home)

To install conda package from the dev channel:

conda install -c jetbrains-dev kotlin-jupyter-kernel (package home)

Uninstall: conda remove kotlin-jupyter-kernel

Pip

You can also install this package through pip:

Stable: pip install kotlin-jupyter-kernel (package home)

Dev: pip install -i https://test.pypi.org/simple/ kotlin-jupyter-kernel (package home)

Uninstall: pip uninstall kotlin-jupyter-kernel

From sources

git clone --recurse-submodules https://github.com/Kotlin/kotlin-jupyter.git
cd kotlin-jupyter
./gradlew install

Default installation path is ~/.ipython/kernels/kotlin/. To install to some other location use option -PinstallPath=, but note that Jupyter looks for the kernel specs files only in predefined places. For more detailed info see Jupyter docs.

Uninstall: ./gradlew uninstall

Troubleshooting

There could be a problem with kernel spec detection because of different python environments and installation modes. If you are using pip or conda to install the package, try running post-install fixup script:

python -m kotlin_kernel fix-kernelspec-location

This script replaces kernel specs to the "user" path where they are always detected. Don't forget to re-run this script on the kernel update.

Usage

  • jupyter console --kernel=kotlin
  • jupyter notebook
  • jupyter lab

To start using kotlin kernel inside Jupyter Notebook or JupyterLab create a new notebook with kotlin kernel.

The default kernel will use the JDK pointed to by the environment variable KOTLIN_JUPYTER_JAVA_HOME, or JAVA_HOME if the first is not set.

JVM arguments will be set from the environment variable KOTLIN_JUPYTER_JAVA_OPTS or JAVA_OPTS if the first is not set. Additionally, arguments from KOTLIN_JUPYTER_JAVA_OPTS_EXTRA will be added. Arguments are parsed using shlex.split.

Creating Kernels

To create a kernel for a specific JDK, JVM arguments, and environment variables, you can use the add-kernel script:

python -m kotlin_kernel add-kernel [--name name] [--jdk jdk_home_dir] [--set-jvm-args] [--jvm-arg arg]* [--env KEY VALUE]* [--force]

The command uses argparse, so --help, @argfile (you will need to escape the @ in powershell), and --opt=value are all supported. --jvm-arg=arg in particular is needed when passing JVM arguments that start with -.

If jdk not specified, name is required. If name is not specified but jdk is the name will be JDK $vendor $version detected from the JDK. Regardless, the actual name of the kernel will be Kotlin ($name), and the directory will be kotlin_$name with the spaces in name replaced by underscores (so make sure it's compatible with your file system).

JVM arguments are joined with a ' ', so multiple JVM arguments in the same argument are supported. The arguments will be added to existing ones (see above section) unless --set-jvm-args is present, in which case they will be set to KOTLIN_JUPYTER_JAVA_OPTS. Note that both adding and setting work fine alongside KOTLIN_JUPYTER_JAVA_OPTS_EXTRA.

While jupyter kernel environment variable substitutions are supported in env, note that if the used environment variable doesn't exist, nothing will be replaced.

An example:

python -m kotlin_kernel add-kernel --name "JDK 15 Big 2 GPU" --jdk ~/.jdks/openjdk-15.0.2 --jvm-arg=-Xmx8G --env CUDA_VISIBLE_DEVICES 0,1

Supported functionality

REPL commands

The following REPL commands are supported:

  • :help - display help
  • :classpath - show current classpath
  • :vars - get visible variables values

Dependencies resolving annotations

It is possible to add dynamic dependencies to the notebook using the following annotations:

  • @file:DependsOn(<coordinates>) - adds artifacts to classpath. Supports absolute and relative paths to class directories or jars, ivy and maven artifacts represented by the colon separated string
  • @file:Repository(<absolute-path>) - adds a directory for relative path resolution or ivy/maven repository. To specify Maven local, use @file:Repository("*mavenLocal").

Note that dependencies in remote repositories are resolved via Ivy resolver. Caches are stored in ~/.ivy2/cache folder by default. Sometimes, due to network issues or running several artifacts resolutions in parallel, caches may get corrupted. If you have some troubles with artifacts resolution, please remove caches, restart kernel and try again.

Default repositories

The following maven repositories are included by default:

Line Magics

The following line magics are supported:

  • %use - injects code for supported libraries: artifact resolution, default imports, initialization code, type renderers. Usage example: %use klaxon(5.5), lets-plot
  • %trackClasspath - logs any changes of current classpath. Useful for debugging artifact resolution failures. Usage example: %trackClasspath [on|off]
  • %trackExecution - logs pieces of code that are going to be executed. Useful for debugging of libraries support. Usage example: %trackExecution [all|generated|off]
  • %useLatestDescriptors - use latest versions of library descriptors available. By default, bundled descriptors are used. Usage example: %useLatestDescriptors [on|off]
  • %output - output capturing settings. Usage example: %output --max-cell-size=1000 --no-stdout --max-time=100 --max-buffer=400
  • %logLevel - set logging level. Usage example: %logLevel [off|error|warn|info|debug]

See detailed info about line magics here.

Supported Libraries

When a library is included with %use keyword, the following functionality is added to the notebook:

  • repositories to search for library artifacts
  • artifact dependencies
  • default imports
  • library initialization code
  • renderers for special types, e.g. charts and data frames

This behavior is defined by json library descriptor. Descriptors for all supported libraries can be found in libraries repository. A library descriptor may provide a set of properties with default values that can be overridden when library is included. The major use case for library properties is to specify a particular version of library. If descriptor has only one property, it can be defined without naming:

%use krangl(0.10)

If library descriptor defines more than one property, property names should be used:

%use spark(scala=2.11.10, spark=2.4.2)

Several libraries can be included in single %use statement, separated by ,:

%use lets-plot, krangl, mysql(8.0.15)

You can also specify the source of library descriptor. By default, it's taken from the libraries repository. If you want to try descriptor from another revision, use the following syntax:

// Specify some git tag from this repository
%use [email protected]
// Specify commit sha, with more verbose syntax
%use lets-plot@ref[24a040fe22335648885b106e2f4ddd63b4d49469]
// Specify git ref along with library arguments
%use krangl@dev(0.10)

Other options are resolving library descriptor from a local file or from remote URL:

// Load library from file
%use mylib@file[/home/user/lib.json]
// Load library from file: kernel will guess it's a file actually
%use @/home/user/libs/lib.json
// Or use another approach: specify a directory and file name without 
// extension (it should be JSON in such case) before it
%use lib@/home/user/libs
// Load library descriptor from a remote URL
%use herlib@url[https://site.com/lib.json]
// If your URL responds with 200(OK), you may skip `url[]` part:
%use @https://site.com/lib.json
// You may omit library name for file and URL resolution:
%use @file[lib.json]

List of supported libraries:

  • combinatoricskt - A combinatorics library for Kotlin
  • coroutines - Asynchronous programming and reactive streams support
  • dataframe - Kotlin framework for structured data processing
  • deeplearning4j - Deep learning library for the JVM
  • deeplearning4j-cuda - Deep learning library for the JVM (CUDA support)
  • default - Default imports: dataframe and Lets-Plot libraries
  • exposed - Kotlin SQL framework
  • fuel - HTTP networking library
  • gral - Java library for displaying plots
  • jdsp - Java library for signal processing
  • kaliningraph - Graph library with a DSL for constructing graphs and visualizing the behavior of graph algorithms
  • khttp - HTTP networking library
  • klaxon - JSON parser for Kotlin
  • kmath - Experimental Kotlin algebra-based mathematical library
  • kotlin-dl - KotlinDL library which provides Keras-like API for deep learning
  • kotlin-statistics - Idiomatic statistical operators for Kotlin
  • krangl - Kotlin DSL for data wrangling
  • kravis - Kotlin grammar for data visualization
  • lets-plot - ggplot-like interactive visualization for Kotlin
  • lets-plot-dataframe - A bridge between Lets-Plot and dataframe libraries
  • lets-plot-gt - Lets-Plot visualisation for GeoTools toolkit
  • lib-ext - Extended functionality for Jupyter kernel
  • londogard-nlp-toolkit - A Natural Language Processing (NLP) toolkit for Kotlin on the JVM
  • multik - Multidimensional array library for Kotlin
  • mysql - MySql JDBC Connector
  • plotly - [beta] Plotly.kt jupyter integration for static plots.
  • plotly-server - [beta] Plotly.kt jupyter integration for dynamic plots.
  • rdkit - Open-Source Cheminformatics Software
  • reflection - Imports for Kotlin Reflection
  • roboquant - Algorithmic trading platform for Kotlin
  • serialization - Kotlin multi-format reflection-less serialization
  • smile - Statistical Machine Intelligence and Learning Engine
  • spark - Unified analytics engine for large-scale data processing

Rich output

By default, the return values from REPL statements are displayed in the text form. To use richer representations, e.g. to display graphics or html, it is possible to send MIME-encoded result to the client using the MIME helper function:

fun MIME(vararg mimeToData: Pair<String, String>): MimeTypedResult 

E.g.:

MIME("text/html" to "<p>Some <em>HTML</em></p>", "text/plain" to "No HTML for text clients")

HTML outputs can also be rendered with HTML helper function:

fun HTML(text: String): MimeTypedResult

Autocompletion

Press TAB to get the list of suggested items for completion. In Jupyter Notebook, you don't need to press TAB, completion is requested automatically. Completion works for all globally defined symbols and for local symbols which were loaded into notebook during cells evaluation.

Error analysis

If you use Jupyter Notebook as Jupyter client, you will also see that compilation errors and warnings are underlined in red and in yellow correspondingly. This is achieved by kernel-level extension of Jupyter notebook which sends error-analysis requests to kernel and renders their results. If you hover the cursor over underlined text, you will get an error message which can help you to fix the error.

Debugging

  1. Run ./gradlew installDebug. Use option -PdebugPort= to specify port address for the debugger. Default port is 1044.
  2. Run jupyter-notebook
  3. Attach a remote debugger to JVM with specified port

Adding new libraries

Read this article if you want to support new JVM library in the kernel.

Documentation

There is a site with rendered KDoc comments from the codebase. If you are a library author you may be interested in api module (see adding new libraries). There is also a lib module which contains entities available from the Notebook cells and shared-compiler module which may be used for Jupyter REPL integration into standalone application or IDEA plugin.

Comments
  • Adding a new library to kotlin notebook using API

    Adding a new library to kotlin notebook using API

    Hi, I am trying to add a kotlin library, which i wrote, to use in kotlin jupyter notebook. Briefly, I have added kotlin("jupyter.api") version "0.10.0-188" to gradle

    Let's say I want to import all classes from my library (inside the library the classes have it's own standard libraries' imports). So I have added the following Integration class:

    class Integration {
        @JupyterLibrary
        internal class Integration : JupyterIntegration() {
            override fun Builder.onLoaded() {
                import("com.mizraelson.*")
                import("com.mizraelson.tools.*")
            }
        }
    }
    

    I have build the project into .jar file.

    Then in the notebook I add the library as follows: @file:DependsOn("/path/to/file.jar")

    But it seems the integration doesn't take any effect and no imports are available.

    Could you please point me in the right direction? Does jupyter looks for a JupyterIntegration() class by itself or maybe I should somehow refer to it?

    bug 
    opened by mizraelson 25
  • Pass args on JVM startup

    Pass args on JVM startup

    Hi !

    I'm hitting the 8G memory limit and wanted to pass the -Xmx startup flag but couldn't find how to it. I believe it's useful to be able to customize how the JVM starts up. I'm not familiar with Jupyter's internals, but is this where the args should be passed ? https://github.com/Kotlin/kotlin-jupyter/blob/3e3ebaa0e47ac885f41552583b12b9110bd40740/distrib/run_kotlin_kernel/run_kernel.py#L42

    Or should we pass them somewhere else ?

    Cheers !

    PS : If you have any tips on how to change the memory limit, I'm still interested :)

    feature 
    opened by adriendengreville 14
  • Is it possible to define a custom (cell) magic

    Is it possible to define a custom (cell) magic

    This is more of an inquiry/research question: I recently started playing around with Jep a bit and found it quite useful for combining the Java image processing library ImgLib2 and Kotlin extensions/operators with NumPy ndarray in native CPython. This all works with shared memory, really cool! I learned about library descriptors, which I could use to add Jep and a Python interpreter to the Kernel. Users could then call

    interpreter.exec
    

    and similar functions to execute their Python code.

    Then I thought, maybe I can mark an entire cell as Python code via some custom cell magic, and the magic handler would then pass the Python code to the Python interpreter object that the Kernel holds. To make this work, I would need some way (that may or may not exist) to add a custom cell magic. Before I spend more time on it, I would like to know if something like that would be possible, in principle, or if I would be wasting my time.

    Thank you!

    feature 
    opened by hanslovsky 12
  • Can kotlin-jupyter be run on IntelliJ IDEA?

    Can kotlin-jupyter be run on IntelliJ IDEA?

    Environment

    Build #IU-203.6682.115, built on December 23, 2020 Runtime version: 11.0.9.1+11-b1145.63 x86_64 Non-Bundled Plugins: IdeaVIM, org.jetbrains.kotlin, Pythonid, com.jetbrains.edu

    When run on IntelliJ IDEA image

    question feature 
    opened by takahirom 12
  • How to use a dynamic library?

    How to use a dynamic library?

    Hi,
    thanks a lot for this cool project!!

    I would like to explore it for cheminformatics analysis and would therefore like to use the Java bindings of the RDKit toolkit. The bindings consist of a jar artifact and a dynamic library (.so for Linux). In the Idea IDE, I configure the program for the location of the dynamic library with this line in the build.gradle.kts:

    jvmArgs = listOf("-Djava.library.path=$rdkitKnime")

    with rdkitKnime being the path to the dynamic library.

    Then, in the program, I call System.loadLibrary("GraphMolWrap") once, to actually load the library.

    Is there a corresponding possibility to modify the java.library.path in kotlin-jupyter?

    @file:Repository("file:///home/pahl/dev/github/knime-rdkit/org.rdkit.knime.bin.linux.x86_64/os/linux/x86_64")

    followed by

    System.loadLibrary("GraphMolWrap")

    in a new cell does not work, it gives a no GraphMolWrap in java.library.path error.

    Many thanks for your help.

    Kind regards,
    Axel

    bug REPL involved 
    opened by apahl 10
  • Create specialized kernels w/ JDK, JVM args, and environment variables

    Create specialized kernels w/ JDK, JVM args, and environment variables

    Fixes #284. Fixes #72.

    I'd like to note this somewhere in the readme (and that it can be set per-kernel with env in the kernelspec), any preference on where?

    I also thought about a few possible further features:

    1. Creating kernels for each detected JDK version on install (presumably in install_user, although I can't find where it gets called on initial install).
    2. Adding a fix-kernelspec-location-like task to create a kernel for a specific JDK.
    3. Adding a kotlin-jupyter specific environment variable that overrides JAVA_HOME, i.e. KOTLIN_JUPYTER_JAVA, incase you want jupyter on a different JDK than say gradle (although that's doable via the kernelspec).

    Thoughts on any of them?

    opened by rnett 9
  • Integration testing Jupyter notebook support

    Integration testing Jupyter notebook support

    Does the Gradle plugin provide a way to mock a Jupyter notebook? If not, it would be convenient to provide a way for libraries to integration test their Jupyter notebook support on some sample notebooks. I could not find any examples of this on GitHub.

    feature 
    opened by breandan 9
  • Failed to load maven-central dependency with @DependsOn

    Failed to load maven-central dependency with @DependsOn

    @file:DependsOn("org.apache.commons:commons-math3:3.6.1")

    Failed to resolve org.apache.commons:commons-math3:3.6.1: File 'org.apache.commons:commons-math3:3.6.1' not found unresolved dependency: org.apache.commons#commons-math3;3.6.1: configuration not found in org.apache.commons#commons-math3;3.6.1: 'master'. It was required from org.apache.commons#commons-math3-caller;working default

    Not sure it is a general problem, or just that precise installation. Leaving it here just in case.

    bug 
    opened by altavir 9
  • Cannot start jupyther notebook

    Cannot start jupyther notebook

    After download and install kernel with ./gradlew install , start new notebook got error

    Starting server: KernelConfig(ports=[64057, 64053, 64056, 64055, 64054], transport=tcp, signatureScheme=hmac-sha256, signatureKey=9f641ffe-cea077832b193c4d7a1d72e4, pollingIntervalMillis=100, classpath=[/Users/eggcaker/.ipython/kernels/kotlin/kotlin-stdlib-1.2.21.jar, /Users/eggcaker/.ipython/kernels/kotlin/jupyter-lib-0.6.0.jar, /Users/eggcaker/.ipython/kernels/kotlin/annotations-13.0.jar])
    [main] INFO ikotlin - start listening
    Exception in thread "main" java.lang.NoClassDefFoundError: org/jetbrains/kotlin/com/intellij/openapi/diagnostic/Logger
    	at uy.kohesive.keplin.kotlin.script.resolver.AnnotationTriggeredScriptDefinition.<clinit>(AnnotationTriggeredScriptDefinition.kt:70)
    	at org.jetbrains.kotlin.jupyter.ReplForJupyter.<init>(repl.kt:22)
    	at org.jetbrains.kotlin.jupyter.IkotlinKt.kernelServer(ikotlin.kt:62)
    	at org.jetbrains.kotlin.jupyter.IkotlinKt.main(ikotlin.kt:41)
    Caused by: java.lang.ClassNotFoundException: org.jetbrains.kotlin.com.intellij.openapi.diagnostic.Logger
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    	... 4 more
    
    opened by eggcaker 9
  • Make platform available to LibraryDefinitionProducer

    Make platform available to LibraryDefinitionProducer

    I'm looking at adding integration for tensorflow. There is a large native dependency, and while I can just depend on the all-platforms bundle, I would like to depend on only the current platform's (or error if it's not supported). Presumably the way to do this would be via a LibraryDefinitionProducer, but as far as I can see there is no way to get the platform. Will there be issues if I use the current JVM's methods (i.e. System.getProperty("os.name") in my LibraryDefinitionProducer)?

    question 
    opened by rnett 8
  • Dead kernel and couln't load notebook

    Dead kernel and couln't load notebook

    Hello! I'm using Ubuntu where I install the kotlin kernerl for jupyter. When i start the every notebook - i got Dead kernel and restart. After kotlin works. I print hello-world script, save and re-open. I got empty notebook with Снимок экрана от 2021-06-05 16-03-57 Снимок экрана от 2021-06-05 16-04-05 Снимок экрана от 2021-06-05 16-04-34

    What am I doing wrong with kotlin kernel?

    bug 
    opened by permiakover 8
  • Cannot access class 'jupyter.kotlin.MimeTypedResult'

    Cannot access class 'jupyter.kotlin.MimeTypedResult'

    Hello,

    I am running jupyter with the latest kotlin kernel Kotlin kernel v. 0.11.0.170, Kotlin v. 1.8.0-dev-3517

    jupyter_version

    I am using kotlin-jupyter-api version 0.11.0-183-1.

        <dependency>
            <groupId>org.jetbrains.kotlinx</groupId>
            <artifactId>kotlin-jupyter-api</artifactId>
            <version>0.11.0-183-1</version>
        </dependency>
    

    I tried to put a MIME object (a png) to display in a cell by calling the API. E.g., return new MimeTypedResult(singletonMap("text/html", html), false, null);

    The MimeTypedResult returned is of class org.jetbrains.kotlinx.jupyter.api.MimeTypedResult in kotlin-jupyter-api version 0.11.0-183-1.

    However, the notebook gives this error: Line_19.jupyter-kts (4:3 - 7) Cannot access class 'jupyter.kotlin.MimeTypedResult'. Check your module classpath for missing or conflicting dependencies

    I cannot understand why it is looking for 'jupyter.kotlin.MimeTypedResult' instead of 'org.jetbrains.kotlinx.jupyter.api.MimeTypedResult'

    mime_error

    I searched the source code in here but can't find anything about jupyter.kotlin.MimeTypedResult or jupyter-kts.

    Can someone point me to the right direction please?

    bug 
    opened by haksunlinm 3
  • Can't find JVM bin

    Can't find JVM bin

    I installed kotlin-jupyter using miniconda, with jupyter and kotlin-jupyter being the only packages installed in a new conda environment.

    When running jupyter console --kernel=kotlin I get the following error - it seems the Homeexport directory in the final line is the problem, given that the file /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java exsists

    ❯ jupyter console --kernel=kotlin
    Traceback (most recent call last):
      File "/Users/avneeshsarwate/opt/miniconda3/envs/kotlin-env/lib/python3.10/runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/Users/avneeshsarwate/opt/miniconda3/envs/kotlin-env/lib/python3.10/runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "/Users/avneeshsarwate/opt/miniconda3/envs/kotlin-env/lib/python3.10/site-packages/run_kotlin_kernel/__main__.py", line 10, in <module>
        main(sys.argv)
      File "/Users/avneeshsarwate/opt/miniconda3/envs/kotlin-env/lib/python3.10/site-packages/run_kotlin_kernel/__main__.py", line 6, in main
        run_kernel(*args[1:])
      File "/Users/avneeshsarwate/opt/miniconda3/envs/kotlin-env/lib/python3.10/site-packages/run_kotlin_kernel/run_kernel.py", line 12, in run_kernel
        run_kernel_impl(*args)
      File "/Users/avneeshsarwate/opt/miniconda3/envs/kotlin-env/lib/python3.10/site-packages/run_kotlin_kernel/run_kernel.py", line 72, in run_kernel_impl
        subprocess.call([java] + jvm_args + ['-jar'] + debug_list + jar_args)
      File "/Users/avneeshsarwate/opt/miniconda3/envs/kotlin-env/lib/python3.10/subprocess.py", line 345, in call
        with Popen(*popenargs, **kwargs) as p:
      File "/Users/avneeshsarwate/opt/miniconda3/envs/kotlin-env/lib/python3.10/subprocess.py", line 969, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/Users/avneeshsarwate/opt/miniconda3/envs/kotlin-env/lib/python3.10/subprocess.py", line 1845, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: '/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Homeexport/bin/java'
    
    bug 
    opened by AvneeshSarwate 2
  • Kernel fails after new version of a resolved dependency is published to maven local

    Kernel fails after new version of a resolved dependency is published to maven local

    I use local build of the dataframe in a notebook to test some things.

    @file:Repository("*mavenLocal")
    @file:DependsOn("org.jetbrains.kotlinx:dataframe:0.9.0-dev")
    

    After publishing a new version, i get this error when running cells:

    Exception
    ZipFile invalid LOC header (bad signature)
    java.util.zip.ZipException: ZipFile invalid LOC header (bad signature)
    	at java.base/java.util.zip.ZipFile$ZipFileInputStream.initDataOffset(ZipFile.java:1009)
    	at java.base/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:1019)
    	at java.base/java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:469)
    	at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:159)
    	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:133)
    	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
    	at kotlin.io.ByteStreamsKt.copyTo(IOStreams.kt:106)
    	at kotlin.io.ByteStreamsKt.copyTo$default(IOStreams.kt:103)
    	at kotlin.io.ByteStreamsKt.readBytes(IOStreams.kt:136)
    	at kotlin.io.TextStreamsKt.readBytes(ReadWrite.kt:150)
    	at org.jetbrains.kotlinx.jupyter.libraries.LibrariesScanner.scanForLibraries(LibrariesScanner.kt:59)
    	at org.jetbrains.kotlinx.jupyter.libraries.LibrariesScanner.addLibrariesFromClassLoader(LibrariesScanner.kt:50)
    	at org.jetbrains.kotlinx.jupyter.libraries.LibrariesScanner.addLibrariesFromClassLoader$default(LibrariesScanner.kt:49)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$3.invoke(CellExecutorImpl.kt:98)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$3.invoke(CellExecutorImpl.kt:97)
    	at org.jetbrains.kotlinx.jupyter.config.LoggingKt.catchAll(logging.kt:41)
    	at org.jetbrains.kotlinx.jupyter.config.LoggingKt.catchAll$default(logging.kt:40)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl.execute(CellExecutorImpl.kt:97)
    	at org.jetbrains.kotlinx.jupyter.repl.CellExecutor$DefaultImpls.execute$default(CellExecutor.kt:14)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$ExecutionContext.execute(CellExecutorImpl.kt:203)
    	at org.jetbrains.kotlinx.dataframe.jupyter.Integration.onLoaded$execute(Integration.kt:115)
    	at org.jetbrains.kotlinx.dataframe.jupyter.Integration.onLoaded$execute-19(Integration.kt:124)
    	at org.jetbrains.kotlinx.dataframe.jupyter.Integration.access$onLoaded$execute-19(Integration.kt:51)
    	at org.jetbrains.kotlinx.dataframe.jupyter.Integration$onLoaded$4.invoke(Integration.kt:128)
    	at org.jetbrains.kotlinx.dataframe.jupyter.Integration$onLoaded$4.invoke(Integration.kt:127)
    	at org.jetbrains.kotlinx.dataframe.jupyter.Integration$onLoaded$$inlined$updateVariable$1.execute(JupyterIntegration.kt:178)
    	at org.jetbrains.kotlinx.jupyter.codegen.FieldsProcessorImpl$process$2.invoke(FieldsProcessorImpl.kt:43)
    	at org.jetbrains.kotlinx.jupyter.codegen.FieldsProcessorImpl$process$2.invoke(FieldsProcessorImpl.kt:42)
    	at org.jetbrains.kotlinx.jupyter.exceptions.ReplLibraryExceptionKt.rethrowAsLibraryException(ReplLibraryException.kt:27)
    	at org.jetbrains.kotlinx.jupyter.codegen.FieldsProcessorImpl.process(FieldsProcessorImpl.kt:42)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$1.invoke(CellExecutorImpl.kt:86)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$1.invoke(CellExecutorImpl.kt:85)
    	at org.jetbrains.kotlinx.jupyter.config.LoggingKt.catchAll(logging.kt:41)
    	at org.jetbrains.kotlinx.jupyter.config.LoggingKt.catchAll$default(logging.kt:40)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl.execute(CellExecutorImpl.kt:85)
    	at org.jetbrains.kotlinx.jupyter.repl.CellExecutor$DefaultImpls.execute$default(CellExecutor.kt:14)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl$evalEx$1.invoke(repl.kt:438)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl$evalEx$1.invoke(repl.kt:427)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.withEvalContext(repl.kt:391)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.evalEx(repl.kt:427)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.eval(repl.kt:475)
    	at org.jetbrains.kotlinx.jupyter.messaging.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:301)
    	at org.jetbrains.kotlinx.jupyter.messaging.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:300)
    	at org.jetbrains.kotlinx.jupyter.JupyterConnection$runExecution$execThread$1.invoke(connection.kt:180)
    	at org.jetbrains.kotlinx.jupyter.JupyterConnection$runExecution$execThread$1.invoke(connection.kt:178)
    	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
    
    ZipFile invalid LOC header (bad signature)
    java.util.zip.ZipException: ZipFile invalid LOC header (bad signature)
    	at java.base/java.util.zip.ZipFile$ZipFileInputStream.initDataOffset(ZipFile.java:1009)
    	at java.base/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:1019)
    	at java.base/java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:469)
    	at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:159)
    	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:133)
    	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
    	at kotlin.io.ByteStreamsKt.copyTo(IOStreams.kt:106)
    	at kotlin.io.ByteStreamsKt.copyTo$default(IOStreams.kt:103)
    	at kotlin.io.ByteStreamsKt.readBytes(IOStreams.kt:136)
    	at kotlin.io.TextStreamsKt.readBytes(ReadWrite.kt:150)
    	at org.jetbrains.kotlinx.jupyter.libraries.LibrariesScanner.scanForLibraries(LibrariesScanner.kt:59)
    	at org.jetbrains.kotlinx.jupyter.libraries.LibrariesScanner.addLibrariesFromClassLoader(LibrariesScanner.kt:50)
    	at org.jetbrains.kotlinx.jupyter.libraries.LibrariesScanner.addLibrariesFromClassLoader$default(LibrariesScanner.kt:49)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$3.invoke(CellExecutorImpl.kt:98)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$3.invoke(CellExecutorImpl.kt:97)
    	at org.jetbrains.kotlinx.jupyter.config.LoggingKt.catchAll(logging.kt:41)
    	at org.jetbrains.kotlinx.jupyter.config.LoggingKt.catchAll$default(logging.kt:40)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl.execute(CellExecutorImpl.kt:97)
    	at org.jetbrains.kotlinx.jupyter.repl.CellExecutor$DefaultImpls.execute$default(CellExecutor.kt:14)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$ExecutionContext.execute(CellExecutorImpl.kt:203)
    	at org.jetbrains.kotlinx.dataframe.jupyter.Integration$onLoaded$$inlined$updateVariable$1.execute(JupyterIntegration.kt:182)
    	at org.jetbrains.kotlinx.jupyter.codegen.FieldsProcessorImpl$process$2.invoke(FieldsProcessorImpl.kt:43)
    	at org.jetbrains.kotlinx.jupyter.codegen.FieldsProcessorImpl$process$2.invoke(FieldsProcessorImpl.kt:42)
    	at org.jetbrains.kotlinx.jupyter.exceptions.ReplLibraryExceptionKt.rethrowAsLibraryException(ReplLibraryException.kt:27)
    	at org.jetbrains.kotlinx.jupyter.codegen.FieldsProcessorImpl.process(FieldsProcessorImpl.kt:42)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$1.invoke(CellExecutorImpl.kt:86)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$1.invoke(CellExecutorImpl.kt:85)
    	at org.jetbrains.kotlinx.jupyter.config.LoggingKt.catchAll(logging.kt:41)
    	at org.jetbrains.kotlinx.jupyter.config.LoggingKt.catchAll$default(logging.kt:40)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl.execute(CellExecutorImpl.kt:85)
    	at org.jetbrains.kotlinx.jupyter.repl.CellExecutor$DefaultImpls.execute$default(CellExecutor.kt:14)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl$evalEx$1.invoke(repl.kt:438)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl$evalEx$1.invoke(repl.kt:427)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.withEvalContext(repl.kt:391)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.evalEx(repl.kt:427)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.eval(repl.kt:475)
    	at org.jetbrains.kotlinx.jupyter.messaging.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:301)
    	at org.jetbrains.kotlinx.jupyter.messaging.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:300)
    	at org.jetbrains.kotlinx.jupyter.JupyterConnection$runExecution$execThread$1.invoke(connection.kt:180)
    	at org.jetbrains.kotlinx.jupyter.JupyterConnection$runExecution$execThread$1.invoke(connection.kt:178)
    	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
    
    ZipFile invalid LOC header (bad signature)
    java.util.zip.ZipException: ZipFile invalid LOC header (bad signature)
    	at java.base/java.util.zip.ZipFile$ZipFileInputStream.initDataOffset(ZipFile.java:1009)
    	at java.base/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:1019)
    	at java.base/java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:469)
    	at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:159)
    	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:133)
    	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
    	at kotlin.io.ByteStreamsKt.copyTo(IOStreams.kt:106)
    	at kotlin.io.ByteStreamsKt.copyTo$default(IOStreams.kt:103)
    	at kotlin.io.ByteStreamsKt.readBytes(IOStreams.kt:136)
    	at kotlin.io.TextStreamsKt.readBytes(ReadWrite.kt:150)
    	at org.jetbrains.kotlinx.jupyter.libraries.LibrariesScanner.scanForLibraries(LibrariesScanner.kt:59)
    	at org.jetbrains.kotlinx.jupyter.libraries.LibrariesScanner.addLibrariesFromClassLoader(LibrariesScanner.kt:50)
    	at org.jetbrains.kotlinx.jupyter.libraries.LibrariesScanner.addLibrariesFromClassLoader$default(LibrariesScanner.kt:49)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$3.invoke(CellExecutorImpl.kt:98)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$3.invoke(CellExecutorImpl.kt:97)
    	at org.jetbrains.kotlinx.jupyter.config.LoggingKt.catchAll(logging.kt:41)
    	at org.jetbrains.kotlinx.jupyter.config.LoggingKt.catchAll$default(logging.kt:40)
    	at org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl.execute(CellExecutorImpl.kt:97)
    	at org.jetbrains.kotlinx.jupyter.repl.CellExecutor$DefaultImpls.execute$default(CellExecutor.kt:14)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl$evalEx$1.invoke(repl.kt:438)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl$evalEx$1.invoke(repl.kt:427)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.withEvalContext(repl.kt:391)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.evalEx(repl.kt:427)
    	at org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.eval(repl.kt:475)
    	at org.jetbrains.kotlinx.jupyter.messaging.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:301)
    	at org.jetbrains.kotlinx.jupyter.messaging.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:300)
    	at org.jetbrains.kotlinx.jupyter.JupyterConnection$runExecution$execThread$1.invoke(connection.kt:180)
    	at org.jetbrains.kotlinx.jupyter.JupyterConnection$runExecution$execThread$1.invoke(connection.kt:178)
    	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
    

    I cannot re-run cell with dependencies, only restart of the kernel helps

    bug help wanted 
    opened by koperagen 2
  • Adding new kernel fails with python <3.8

    Adding new kernel fails with python <3.8

    Fails because the unsupported feature is used in install script:

    Installing kernel to /Users/pavel.gorgulov/Library/Jupyter/kernels/kotlin_JDK_11_kernel
    Traceback (most recent call last):
      File "/opt/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "/opt/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "/opt/anaconda3/lib/python3.7/site-packages/kotlin_kernel/__main__.py", line 32, in <module>
        main(sys.argv)
      File "/opt/anaconda3/lib/python3.7/site-packages/kotlin_kernel/__main__.py", line 24, in main
        commands[command](args)
      File "/opt/anaconda3/lib/python3.7/site-packages/kotlin_kernel/__main__.py", line 5, in <lambda>
        commands = {'add-kernel': lambda x: add_kernel(x), 'detect-jars-location': 
      File "/opt/anaconda3/lib/python3.7/site-packages/kotlin_kernel/add_kernel.py", line 83, in add_kernel
        install_base_kernel(kernel_name)
      File "/opt/anaconda3/lib/python3.7/site-packages/kotlin_kernel/install_user.py", line 32, in install_base_kernel
        shutil.copytree(src, dst, dirs_exist_ok=True)
    TypeError: copytree() got an unexpected keyword argument 'dirs_exist_ok'
    

    Either state in the documentation that only python >= 3.8 should be used, or rewrite it to support lower versions.

    bug help wanted documentation good first issue 
    opened by ileasile 1
  • Unable to upgrade past 0.11.0-125

    Unable to upgrade past 0.11.0-125

    I recently tried updating from 0.11.0-125 to 0.11.0-134, however compilation failed after doing so with the following error:

    Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
    

    In order to resolve it, I added the following snippet to my build.gradle.kts file:

    kotlin {
      jvm {
        compilations.all {
          kotlinOptions {
            kotlinOptions.jvmTarget = "11"
          }
        }
      }
    }
    

    This compiled, but subsequently produced the following error when running ./gradlew allTests:

    RenderingTests[jvm] > random matrix is rendered to bmp()[jvm] FAILED
        org.jetbrains.kotlinx.jupyter.exceptions.ReplLibraryException: The problem is found in one of the loaded libraries: check library imports, dependencies and repositories
            at app//org.jetbrains.kotlinx.jupyter.exceptions.ReplLibraryExceptionKt.rethrowAsLibraryException(ReplLibraryException.kt:29)
            at app//org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$ExecutionContext.addLibraries(CellExecutorImpl.kt:145)
            at app//org.jetbrains.kotlinx.jupyter.libraries.LibrariesScanner.addLibrariesFromClassLoader(LibrariesScanner.kt:59)
            at app//org.jetbrains.kotlinx.jupyter.libraries.LibrariesScanner.addLibrariesFromClassLoader$default(LibrariesScanner.kt:49)
            at app//org.jetbrains.kotlinx.jupyter.testkit.ReplProvider$Companion$initializeWithCurrentClasspath$1.invoke(ReplProvider.kt:49)
            at app//org.jetbrains.kotlinx.jupyter.testkit.ReplProvider$Companion$initializeWithCurrentClasspath$1.invoke(ReplProvider.kt:49)
            at app//org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl.execute(CellExecutorImpl.kt:119)
            at app//org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.eval(repl.kt:490)
            at app//org.jetbrains.kotlinx.jupyter.testkit.ReplProvider$Companion.initializeWithCurrentClasspath(ReplProvider.kt:49)
            at app//org.jetbrains.kotlinx.jupyter.testkit.ReplProvider$Companion.withoutLibraryResolution$lambda-1(ReplProvider.kt:17)
            at app//org.jetbrains.kotlinx.jupyter.testkit.JupyterReplTestCase.<init>(JupyterReplTestCase.kt:15)
            at app//org.jetbrains.kotlinx.jupyter.testkit.JupyterReplTestCase.<init>(JupyterReplTestCase.kt:12)
            at app//ai.hypergraph.kaliningraph.notebook.RenderingTests.<init>(NotebookTest.kt:11)
    
            Caused by:
            org.jetbrains.kotlinx.jupyter.exceptions.ReplCompilerException: Unable to initialize repl compiler:
              DEBUG Using JVM IR backend
              ERROR MainCommandLineProcessor::pluginOptions accessed before thread local parameters have been set: java.lang.IllegalStateException: MainCommandLineProcessor::pluginOptions accessed before thread local parameters have been set
                at app//org.jetbrains.kotlinx.jupyter.repl.impl.JupyterCompilerImpl.compileSync(JupyterCompilerImpl.kt:174)
                at app//org.jetbrains.kotlinx.jupyter.repl.impl.InternalEvaluatorImpl.eval(InternalEvaluatorImpl.kt:99)
                at app//org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$result$1.invoke(CellExecutorImpl.kt:71)
                at app//org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$result$1.invoke(CellExecutorImpl.kt:69)
                at app//org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.withHost(repl.kt:635)
                at app//org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl.execute(CellExecutorImpl.kt:69)
                at app//org.jetbrains.kotlinx.jupyter.repl.CellExecutor$DefaultImpls.execute$default(CellExecutor.kt:15)
                at app//org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$ExecutionContext.execute(CellExecutorImpl.kt:204)
                at app//org.jetbrains.kotlinx.jupyter.api.libraries.CodeExecution$toExecutionCallback$1.invoke(CodeExecution.kt:20)
                at app//org.jetbrains.kotlinx.jupyter.api.libraries.CodeExecution$toExecutionCallback$1.invoke(CodeExecution.kt:16)
                at app//org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$ExecutionContext.execute(CellExecutorImpl.kt:226)
                at app//org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$ExecutionContext.runChild(CellExecutorImpl.kt:136)
                at app//org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$ExecutionContext.runChild(CellExecutorImpl.kt:132)
                at app//org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$ExecutionContext.access$runChild(CellExecutorImpl.kt:122)
                at app//org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$ExecutionContext$addLibraries$1.invoke(CellExecutorImpl.kt:146)
                at app//org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$ExecutionContext$addLibraries$1.invoke(CellExecutorImpl.kt:145)
                at app//org.jetbrains.kotlinx.jupyter.exceptions.ReplLibraryExceptionKt.rethrowAsLibraryException(ReplLibraryException.kt:27)
                ... 12 more
    
                Caused by:
                java.lang.IllegalStateException: Unable to initialize repl compiler:
                  DEBUG Using JVM IR backend
                  ERROR MainCommandLineProcessor::pluginOptions accessed before thread local parameters have been set: java.lang.IllegalStateException: MainCommandLineProcessor::pluginOptions accessed before thread local parameters have been set
                    at org.jetbrains.kotlin.scripting.compiler.plugin.impl.KJvmReplCompilerBase$Companion.createCompilationState(KJvmReplCompilerBase.kt:337)
                    at org.jetbrains.kotlin.scripting.ide_services.compiler.KJvmReplCompilerWithIdeServices$1.invoke(KJvmReplCompilerWithIdeServices.kt:30)
                    at org.jetbrains.kotlin.scripting.ide_services.compiler.KJvmReplCompilerWithIdeServices$1.invoke(KJvmReplCompilerWithIdeServices.kt:29)
                    at org.jetbrains.kotlin.scripting.compiler.plugin.repl.JvmReplCompilerState.initializeCompilation(jvmReplCompilation.kt:61)
                    at org.jetbrains.kotlin.scripting.compiler.plugin.repl.JvmReplCompilerState.getCompilationState(jvmReplCompilation.kt:47)
                    at org.jetbrains.kotlin.scripting.compiler.plugin.impl.KJvmReplCompilerBase.compile$suspendImpl(KJvmReplCompilerBase.kt:74)
                    at org.jetbrains.kotlin.scripting.compiler.plugin.impl.KJvmReplCompilerBase.compile(KJvmReplCompilerBase.kt)
                    at kotlin.script.experimental.api.ReplCompiler$DefaultImpls.compile(replCompilation.kt:49)
                    at org.jetbrains.kotlin.scripting.compiler.plugin.impl.KJvmReplCompilerBase.compile(KJvmReplCompilerBase.kt:54)
                    at org.jetbrains.kotlinx.jupyter.repl.impl.JupyterCompilerImpl$compileSync$resultWithDiagnostics$1.invokeSuspend(JupyterCompilerImpl.kt:173)
                    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
                    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
                    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
                    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
                    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
                    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
                    at org.jetbrains.kotlinx.jupyter.repl.impl.JupyterCompilerImpl.compileSync(JupyterCompilerImpl.kt:173)
                    ... 28 more
    

    After encountering this error, I decided to add the following line to the build.gradle.kts file:

      jvm {
        compilations.all {
          kotlinOptions {
            kotlinOptions.jvmTarget = "11"
            useOldBackend = true
          }
        }
      }
    

    However I then encountered the following issue:

    w: Language version is automatically inferred to 1.5 when using the old JVM backend. Consider specifying -language-version explicitly, or remove -Xuse-old-backend
    

    This resulted in the second error reappearing. Currently it is unclear how to proceed, any advice would be appreciated.

    bug 
    opened by breandan 6
Owner
Kotlin
Kotlin Tools and Libraries
Kotlin
Kotlin-oop - Repositório criado para ser utilizado pelo projeto de Kotlin OOP desenvolvido em Kotlin nas aulas feitas através da plataforma Alura.

Projeto React OOP Repositório criado para ser utilizado pelo projeto de Kotlin OOP desenvolvido em Kotlin nas aulas feitas através da plataforma Alura

Marcos Felipe 1 Jan 5, 2022
Kotlin-koans - Kotlin Koans are a series of exercises to get you familiar with the Kotlin Syntax

kotlin-koans-edu Kotlin Koans are a series of exercises to get you familiar with

null 1 Jan 11, 2022
Kotlin TodoMVC – full-stack Kotlin application demo

Kotlin full stack TodoMVC This project is an example implementation of the TodoMVC app written in Kotlin. More specifically, it's the Kotlin port of t

Gyula Voros 22 Oct 3, 2022
Integration Testing Kotlin Multiplatform Kata for Kotlin Developers. The main goal is to practice integration testing using Ktor and Ktor Client Mock

This kata is a Kotlin multiplatform version of the kata KataTODOApiClientKotlin of Karumi. We are here to practice integration testing using HTTP stub

Jorge Sánchez Fernández 29 Oct 3, 2022
Small kotlin library for persisting _single instances_ of kotlin data classes

PerSista Small library for persisting single instances of kotlin data classes. NB: PerSista uses typeOf() internally which is marked as @ExperimentalS

Eric Donovan 5 Nov 13, 2022
Kotlin Leaning Notes from Udacity Course | Kotlin Bootcamp for Programmers by Google

Kotlin Beginners Notes These are all personal notes taken from the Udacity Course (ud9011) of Kotlin Bootcamp for Programmers by Google as well as oth

Süha Tanrıverdi 34 Dec 10, 2022
Saga pattern implementation in Kotlin build in top of Kotlin's Coroutines.

Module Saga Website can be found here Add in build.gradle.kts repositories { mavenCentral() } dependencies { implementation("io.github.nomisr

Simon Vergauwen 50 Dec 30, 2022
Kotlin microservices with REST, and gRPC using BFF pattern. This repository contains backend services. Everything is dockerized and ready to "Go" actually "Kotlin" :-)

Microservices Kotlin gRPC Deployed in EC2, Check it out! This repo contains microservices written in Kotlin with BFF pattern for performing CRUD opera

Oguzhan 18 Apr 21, 2022
A sample skeleton backend app built using Spring Boot kotlin, Expedia Kotlin Graphql, Reactive Web that can be deployed to Google App Engine Flexible environmennt

spring-kotlin-gql-gae This is a sample skeleton of a backend app that was built using: Spring Boot(Kotlin) Reactive Web Sprinng Data R2DBC with MYSQL

Dario Mungoi 7 Sep 17, 2022
Modular Android architecture which showcase Kotlin, MVVM, Navigation, Hilt, Coroutines, Jetpack compose, Retrofit, Unit test and Kotlin Gradle DSL.

SampleCompose Modular Android architecture which showcase Kotlin, MVVM, Navigation, Hilt, Coroutines, Jetpack compose, Retrofit, Unit test and Kotlin

Mohammadali Rezaei 7 Nov 28, 2022
Learn-kotlin - Learning more about Kotlin in various content

Kotlin study roadmap https://kotlinlang.org/docs/reference/ Getting Started Basi

Danilo Silva 0 Jan 7, 2022
Mis experimentos con Kotlin para JetBrains Academy, certificación de Kotlin donde voy resolviendo proyectos de evaluación y haciendo actividades de cada tema.

Kotlin Academy Mis experimentos con Kotlin para JetBrains donde voy resolviendo proyectos de evaluación y haciendo actividades de cada tema. Acerca de

José Luis González Sánchez 1 Jan 10, 2022
Repositório criado para ser utilizado pelo projeto de Kotlin Collections desenvolvido em Kotlin nas aulas feitas através da plataforma Alura.

Projeto Kotlin Collections Repositório criado para ser utilizado pelo projeto de Kotlin Collections desenvolvido em Kotlin nas aulas feitas através da

Marcos Felipe 1 Jan 17, 2022
Kotlin-GraphQL-Apollo - Sencillo cliente para consumir una API GraphQL con Apollo usando Kotlin

Kotlin GraphQL Apollo Sencillo cliente para consumir una API GraphQL con Apollo

José Luis González Sánchez 2 Jan 25, 2022
DS-for-Kotlin - Some classic data sturctures write in kotlin for fun

DS-for-Kotlin Just write some classic data structure by kotlin during my leisure

ccyyxx 2 Jan 30, 2022
Account-hexa-service-kotlin - Microservice with Kotlin using Hexagonal architecture

Microservice Construindo microservice de conta para fins Didáticos. Objetivos Cr

Adriano Marcião 1 Jan 30, 2022
Akka-in-action-kotlin - Accompanying source code for Akka in Action by Kotlin

Akka実践バイブル Kotlin版サンプルコード ( Accompanying source code for Akka in Action by Kotli

nrs 7 Jul 26, 2022
Kotlin-phoenix - A set of tools aimed to bridge Phoenix with the Kotlin Multiplatform world

Kotlin Phoenix This project is aimed to allow developers to work with Phoenix Ch

Adrien Jacquier Bret 5 Sep 21, 2022
Spring-kotlin - Learning API Rest with Kotlin, Spring and PostgreSQL

Kotlin, Spring, PostgreSQL and Liquibase Database Migrations Learning Kotlin for

Andre L S Ferreira 2 Feb 14, 2022