Norbi
01/15/2022, 9:17 AMplugins {
...
id("com.google.devtools.ksp") version "1.6.10-1.0.2"
}
kotlin {
sourceSets {
val commonMain by getting {
dependencies {
...
api("io.arrow-kt:arrow-optics:1.0.1")
}
...
}
}
dependencies {
ksp("io.arrow-kt:arrow-optics-ksp-plugin:1.0.2-alpha.28")
}
Example.kt
...
@optics
data class Example(val p: String) {
companion object
}
But no files are generated, the build\generated\xxxMain
folders are created but remain empty.
During the build process the corresponding tasks are executed (and I see a warning):
...
The 'ksp' configuration is deprecated in Kotlin Multiplatform projects. Please use target-specific configurations like 'kspJvm' instead.
...
Task ... kspKotlinJs UP-TO-DATE
...
Task ... kspKotlinMetadata UP-TO-DATE
...
Task ... kspKotlinJvm UP-TO-DATE
...
Do you have any idea what piece is missing? Thanks.simon.vergauwen
01/15/2022, 9:30 AMksp
doesn’t work for Kotlin MPP afaik.
You need to use a special configuration for MPP KSP.
https://github.com/google/ksp/blob/main/examples/multiplatform/workload/build.gradle.ktsNorbi
01/15/2022, 9:59 AMdependencies {
val arrowPluginLib = "io.arrow-kt:arrow-optics-ksp-plugin:1.0.2-alpha.28"
add("kspMetadata", arrowPluginLib)
add("kspJvm", arrowPluginLib)
add("kspJvmTest", arrowPluginLib)
add("kspJs", arrowPluginLib)
add("kspJsTest", arrowPluginLib)
}
Norbi
01/15/2022, 10:47 AMNorbi
01/15/2022, 11:48 AMsimon.vergauwen
01/16/2022, 7:01 PMNorbi
01/19/2022, 11:35 AMsimon.vergauwen
01/19/2022, 11:49 AMAlejandro Serrano Mena
01/19/2022, 11:51 AMAlejandro Serrano Mena
01/20/2022, 12:51 PMNorbi
01/22/2022, 9:33 PMsimon.vergauwen
01/23/2022, 11:43 AM1.0.2-alpha.43
@Norbi?simon.vergauwen
01/23/2022, 11:44 AMNorbi
01/23/2022, 7:35 PMAlejandro Serrano Mena
01/24/2022, 7:53 AMNorbi
01/24/2022, 11:47 AMa
, b
, c
, d
of type arrow.core.Tuple4
but the actual names of the corresponding properties are first
, second
, third
, fourth
.
Could this be a problem of my project configuration? (As I see every Arrow dependency is of version 1.0.2-alpha.43 .)Imran/Malic
01/24/2022, 1:25 PMfirst
, second
third
prior to 1.0.0 release. So it’s agnostic to the kotlin stdlibsimon.vergauwen
01/24/2022, 2:59 PMNorbi
01/24/2022, 3:32 PMa
vs first
problem. Both projects are based on Kotlin 1.6.10, so I don't get how the Kotlin stdlib affects this...simon.vergauwen
01/24/2022, 3:40 PMa
to first
to be more in line with Kotlin Std naming, that was a change prior to 1.x.x though.simon.vergauwen
01/24/2022, 3:41 PMalpha
your way tomorrow to try if it is fixed.simon.vergauwen
01/25/2022, 10:28 AMImran/Malic
01/25/2022, 6:26 PM<https://github.com/arrow-kt/arrow/tree/1.0.3-alpha.1|1.0.3-alpha.1>
, in a few hours it should be ready for testing it out @Norbi 😄Norbi
01/25/2022, 8:38 PM