serebit
07/25/2020, 8:46 PMMonoClock
compiles in both common and JVM
- Usage of Monotonic
(imported directly from TimeSource
) compiles in both common and JVM
- Usage of TimeSource.Monotonic
compiles in common, but fails in JVM
All three scenarios were regarded as acceptable by the IntelliJ Kotlin plugin (version 1.4-M3), but the last one failed to compile regardless.ilya.gorbunov
07/27/2020, 3:05 AMserebit
07/27/2020, 3:14 AM> Task :client:compileKotlinJvm FAILED
e: /home/serebit/Code/strife/client/src/commonMain/kotlin/internal/network/Heart.kt: (47, 21): Unresolved reference: TimeSource
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':client:compileKotlinJvm'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork
> Compilation error. See log for more details
import kotlin.time.*
in the imports. Only if I directly import Monotonic does the code actually compile.import kotlin.time.TimeSource
either, even though it's got import kotlin.time.TimeSource
directly above it. 🤔 What have I stumbled upon?MonoClock
compiles in both common and JVM
- Usage of TimeSource
compiles in common, but fails in JVM due to an unresolved reference
When importing TimeSource
directly, it succeeds in both common and JVM. The Kotlin IDEA plugin doesn't see any issues either way.ilya.gorbunov
07/27/2020, 3:33 AMTimeSource
types/identifiers available in JVM?serebit
07/27/2020, 4:38 AMTimeSource
interface in kotlinx.coroutines
. Perhaps that should be renamed to avoid conflicts with the new kotlin.time.TimeSource
interface.ilya.gorbunov
07/30/2020, 4:20 AMTimeSource
in kotlinx.coroutines
.serebit
07/30/2020, 4:22 AM