SciProgCentre / plotly.kt

An interactive Kotlin wrapper for plotly visualization tools
https://sciprogcentre.github.io/plotly.kt/
Apache License 2.0
150 stars 21 forks source link

(Crossposting Issue) Installing Plotlykt-Core as dependency causes project build to fail (without any new code added) #45

Closed CaptainZidgel closed 4 years ago

CaptainZidgel commented 4 years ago

I have a Kotlin/JS for browser targeted program that builds fine how it is, until I add Plotlykt as a Gradle dependency. This causes one of my files, which contains Kotlinx Serialization, to fail to compile. I created an issue report for the Kotlinx Serialization repo first, but nothing suggests the issue is necessarily on that end. Please see this issue for a detailed error: https://github.com/Kotlin/kotlinx.serialization/issues/1030 and this project for a reproducible error (contains everything from the Intellij project to the Build Script): https://github.com/CaptainZidgel/Erroring_Project

I hope this finds you well, please let me know if there are any other details I can give you.

altavir commented 4 years ago

Thank you for your report. The current version is not compatible with 1.4 and new serialization. I will fix it shortly. Right now you can stick with 1.3.72 or try to remove transitive dependency on serialization runtime. I will add appropriate warning to the readme. You also do not need serialization itself to run plotly.kt. it only uses json API, not the plugin.

CaptainZidgel commented 4 years ago

Thank you for the swift response. I will try to convert my project to 1.3.7 code and dependencies that support 1.3.7 (I did not add Serialization as an imagined dependency for Plotly, I need it for my project). If I cannot do that, I will shelve the project until Plotlykt supports 1.4 or I can find another JS-capable Kotlin plotting library.

altavir commented 4 years ago

1.3.72 should work (alongside with serialization 0.20.0). The demo project is here: https://github.com/mipt-npm/plotly.kt/tree/master/js-demo.

I will make a dev build with 1.4 in a few days. All the necessary libraries are already converted. But you should remember that kotlin-js broken compatibility on 1.4 and pre-1.4 libraries are in general not compatible with post - 1.4 libraries. I've added a compatibility note to address the problem.

altavir commented 4 years ago

@CaptainZidgel I've updated the dependencies, but sadly I get https://youtrack.jetbrains.com/issue/KT-39088 on JS compilation, so we will have to wait for 1.4.20. You can safely use the current version with 1.3.72.

CaptainZidgel commented 4 years ago

Thank you for your help!

altavir commented 4 years ago

@CaptainZidgel The bug prevention Plotly core from working was fixed in 1.4.20, so we will migrate as soon as EAPs are out. For now just use 1.3.72.

altavir commented 4 years ago

https://github.com/mipt-npm/plotly.kt/releases/tag/v0.3.0-dev-3 is published. It requires Kotlin eap build, but works fine otherwise.