koma
koma copied to clipboard
Basic example on website fails to compile with unresolved references
The snippet
figure(1)
// Second parameter is color
plot(a, 'b', "First Run")
plot(a+1, 'y', "First Run Offset")
xlabel("Time (s)")
ylabel("Magnitude")
title("White Noise")
figure(2)
plot(b, 'g') // green
xlabel("Velocity (lightweeks/minute)")
ylabel("Intelligence")
title("Random Walk")
from https://koma.kyonifer.com/index.html fails to compile with these errors:
e: main.kt: (11, 5): Unresolved reference: figure
e: main.kt: (13, 5): Unresolved reference: plot
e: main.kt: (14, 5): Unresolved reference: plot
e: main.kt: (15, 5): Unresolved reference: xlabel
e: main.kt: (16, 5): Unresolved reference: ylabel
e: main.kt: (17, 5): Unresolved reference: title
e: main.kt: (19, 5): Unresolved reference: figure
e: main.kt: (20, 5): Unresolved reference: plot
e: main.kt: (21, 5): Unresolved reference: xlabel
e: main.kt: (22, 5): Unresolved reference: ylabel
e: main.kt: (23, 5): Unresolved reference: title
Is the plotting library really included with the listed dependency (below) or am I doing something wrong?
dependencies{
compile group: "com.kyonifer", name:"koma-core-ejml", version: "0.12"
}
The docs are missing this extra dependencies line:
compile group: "com.kyonifer", name:"koma-plotting", version: "0.12"
I got the example to work locally with the following build.gradle
:
plugins { id "org.jetbrains.kotlin.jvm" version "1.3.21" }
apply plugin: 'application'
application {
mainClassName = 'MainKt'
}
repositories {
maven {
url "http://dl.bintray.com/kyonifer/maven"
jcenter()
}
}
dependencies{
compile group: "com.kyonifer", name:"koma-core-ejml", version: "0.12"
compile group: "com.kyonifer", name:"koma-plotting", version: "0.12"
}
Is there someone with access to the docs who can fix this? Because this really keeps people from using this library and it is super easy to fix.
The proper solution to this will require fixing of the docs generation pipeline. In particular, the dokka task needs to be updated for the multiplatform build system. Additionally, the build needs updating for java versions beyond 8.
For now I've manually performed surgery on the html in 880704c7874652e7f08053f41d4a5afa9c8f5fc2, which should at least fix this issue for people browsing the docs.