Carter
03/04/2022, 12:22 PM@file:DependsOn("org.jetbrains.kotlinx:kotlinx-datetime:0.3.2")
%useLatestDescriptors
%use lets-plot
import java.util.Random
import kotlinx.datetime.Instant
Running that yields the error Line_214.jupyter-kts (6:25 - 32) Unresolved reference: Instant
What am I missing?altavir
03/04/2022, 12:27 PMCarter
03/04/2022, 12:30 PM@file:DependsOn("org.jetbrains.kotlinx:kotlinx-datetime-jvm:0.3.2")
{
"description": "Datetime",
"properties": {
"v": "0.3.2"
},
"link": "<https://github.com/Kotlin/kotlinx-datetime>",
"dependencies": [
"org.jetbrains.kotlinx:kotlinx-datetime-jvm:$v"
],
"imports": [
"kotlinx.datetime.Instant"
]
}
Then
%use @file[/data/notebook_files/datetime.json]
Which gives effectively the same error
The problem is found in one of the loaded libraries: check library imports, dependencies and repositories
Error compiling code:
@file:DependsOn("org.jetbrains.kotlinx:kotlinx-datetime-jvm:0.3.2")
import kotlinx.datetime.Instant
Errors:
Line_247.jupyter-kts (2:25 - 32) Unresolved reference: Instant
altavir
03/04/2022, 12:33 PMCarter
03/04/2022, 12:38 PMaltavir
03/04/2022, 12:38 PMCarter
03/04/2022, 12:39 PMaltavir
03/04/2022, 12:39 PMCarter
03/04/2022, 12:40 PM@file
in its own cell before import
2. Need to document using -jvm
suffix for multiplatform libraries
3. Possibly some bug in the kernel that didn’t get cleared by re-running the cell. I’ll have to see if I can reproduce itIlya Muradyan
03/04/2022, 12:55 PMCarter
03/04/2022, 12:59 PM