Skip to content

v2024.2.0+ are incompatible with Kotlin Jupyter kernel versions <0.13.0.478 #426

@gabrielfeo

Description

@gabrielfeo

Kotlin Jupyter kernel versions <0.13.0.478 (<=0.12.0.322) cannot read Kotlin 2.1 class files as the ones published in develocity-api-kotlin v2024.2.0+, resulting in a runtime error.

org.jetbrains.kotlinx.jupyter.exceptions.ReplCompilerException: at Cell In[5], line 3, column 11: Class 'com.gabrielfeo.develocity.api.DevelocityApi.Companion' was compiled with an incompatible version of Kotlin. The actual metadata version is 2.1.0, but the compiler version 1.9.0 can read versions up to 2.0.0.
The class is loaded from /Users/gfeo/.m2/repository/com/gabrielfeo/develocity-api-kotlin/2024.3.0/develocity-api-kotlin-2024.3.0.jar!/com/gabrielfeo/develocity/api/DevelocityApi$Companion.class

Kotlin kernel compatibility table

Workarounds

  • Use the latest development version of kotlin-jupyter-kernel. 0.14.1.514 is known to work. See instructions for Conda and pip. Caveat is these kernel versions might be less stable (both are beta).
  • Upgrade kotlin-jupyter-kernel to stable version 0.14.1.550, now available for pip and conda.
  • Downgrade this library to 2024.1.1, e.g. %use develocity-api-kotlin(2024.1.1). Caveat is this library version won't contain changes to the Develocity REST API spec made for 2024.2 onward.

How this reached production

The library is integration tested against Kotlin/Jupyter using the standard testing facilites provided by Kotlin/Jupyter's Gradle plugin. However, the latest version of that plugin published to the stable Maven Central repository is much later than the version of the kernel published to pypi and Anaconda.org, corresponding to the pre-release version instead. Effectively, it means this library was being tested against the pre-release Kotlin/Jupyter kernel, rather than the stable version. Since the pre-release kernel already uses a newer version of Kotlin, the integration tests didn't fail for this incompatibility error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs in the published library, including documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions