Michal Klimczak
08/08/2022, 2:31 PMtschuchortdev:kotlin-compile-testing
library to test the processor.
It all works fine until I start to use expect
keyword in my jvmTest tested source. It complains that The feature "multi platform projects" is experimental and should be enabled explicitly
.
Fail even if I add kotlin.mpp.stability.nowarn=true
to gradle.properties
and gradle-wrapper.properties
. Any ideas what might be wrong or how can I structure my tests differently?ephemient
08/08/2022, 3:01 PMexpect
in common sourceset, actual
in jvm or other platform-specific sourcesets. if you have no common sourceset, there's no place for expect.Michal Klimczak
08/08/2022, 3:33 PMactual
in common code - I checked that recently. And if I have multi layered structure like common-ios-iosArm64/iosX64 then I should be able to use expect
in ios and actual
in iosArm64 and iosX64? There's probably hardly any use case for that, but nevertheless?ephemient
08/08/2022, 3:37 PMMichal Klimczak
08/08/2022, 3:41 PMMichal Klimczak
08/08/2022, 4:05 PMexpect
fail exactly the same (other tests continue to work just fine). The compiled code looks sth like this but with expect interface InterfaceGenerationExample
. I assume the problem is that this source file from kotline-compile-testing is not really the same thing as the original source set that runs the tests and therefore different rules applyephemient
08/08/2022, 4:06 PMexpect
in your code at compile-time and actual
in runtime-generated code? that won't workMichal Klimczak
08/08/2022, 4:11 PMexpect
type. ultimately the library will only probably generate code without expect/actual, even if the annotated type is expect
. But right now I'm just trying to write a failing, but compiling test for this.ephemient
08/08/2022, 4:13 PMMichal Klimczak
08/08/2022, 4:13 PMThe feature "multi platform projects" is experimental and should be enabled explicitly
which doesn't sound rightMichal Klimczak
08/08/2022, 4:13 PMephemient
08/08/2022, 4:14 PMexpect
in a JVM-only project (yes, it's misleading)