Some errors appear after updating Kotlin to 1.7.20...
# kvision
n
Some errors appear after updating Kotlin to 1.7.20 and KVision to 5.16.0, and running the compileKotlinFrontend Gradle task. Below is the build output (trimmed for brevity):
Copy code
> Task :kotlinNpmInstall
warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > css-loader@6.7.1" has unmet peer dependency "webpack@^5.0.0".
warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > style-loader@3.3.1" has unmet peer dependency "webpack@^5.0.0".
warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > imports-loader@4.0.1" has unmet peer dependency "webpack@^5.0.0".
warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > gettext.js > po2json@1.0.0-beta-3" has unmet peer dependency "commander@^6.0.0".
warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > gettext.js > po2json@1.0.0-beta-3" has unmet peer dependency "gettext-parser@2.0.0".
warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > gettext.js > po2json@1.0.0-beta-3" has unmet peer dependency "gettext-to-messageformat@0.3.1".
warning Ignored scripts due to flag.

> Task :frontendGenerateExternalsIntegrated SKIPPED
> Task :kotlinStoreYarnLock UP-TO-DATE
> Task :transformCommonMainDependenciesMetadata
> Task :kspCommonMainKotlinMetadata
> Task :kspKotlinFrontend

> Task :compileKotlinFrontend FAILED

e: .. build/generated/ksp/metadata/commonMain/kotlin/io/kvision/remote/GeneratedKVServiceManager.kt: (9, 51): Unresolved reference: KVServiceManager
e: .. build/generated/ksp/metadata/commonMain/kotlin/io/kvision/remote/GeneratedKVServiceManager.kt: (13, 35): Unresolved reference: KVServiceManager
e: .. build/generated/ksp/metadata/commonMain/kotlin/io/kvision/remote/GeneratedKVServiceManager.kt: (16, 56): Unresolved reference: KVServiceManager
r
I see the problem in your
conduit-server
project
You are using KVision in a multiplatform project, but not using the remote module at all.
The KSP plugin generates some code you don't need and can't compile.
I think I need to add some more checks about the environment before generating this code.
For now please disable code generation by adding
io.kvision.plugin.enableKsp=false
to your
gradle.properties
n
Presumably there isn't anything in the KVision Issue Tracker on Kotlin Native support (for integrating with backends using this Kotlin development platform); just some "food for thought". Having the assumption that all Kotlin backends are Kotlin JVM based doesn't hold true these days, considering that some Kotlin backend libraries/frameworks (eg Ktor Server - https://ktor.io/docs/native-server.html ) are available for Kotlin Native. FYI Kotlin Native's meta programming capabilities are extremely limited. As such many Kotlin based libraries/frameworks supporting Kotlin Native tend to avoid using meta programming as much as possible.
Hypothetically if KVision were to support integration with Kotlin Native backends, how difficult would it be to pull it off when Kvision has a reasonable reliance on meta programming?
r
I don't think meta programming is a blocker here. KSP generates very simple code, which some time ago was just written manually. The main problem is probably the DI engine, but I'm already supporting Koin instead of Guice, as a first step towards native support.
The question for the moment is whether the koin-ktor module supports Ktor native server.