Kris Wong
05/03/2019, 8:35 PMNikky
05/03/2019, 10:04 PMserebit
05/05/2019, 3:58 AMkotlin-multiplatform
plugin, version 1.3.31
)galex
05/05/2019, 4:27 AMkotlin.NotImplementedError: An operation is not implemented: Obtaining serializer from KClass is not available on native due to the lack of reflection. Use .serializer() directly on serializable class.
at 0 mu51k-ios 0x0000000108ff28a5 kfun:kotlin.Error.<init>(kotlin.String?)kotlin.Error + 21
at 1 mu51k-ios 0x00000001090f8bd5 kfun:kotlin.NotImplementedError.<init>(kotlin.String)kotlin.NotImplementedError + 21
at 2 mu51k-ios 0x0000000109134802 kfun:kotlinx.serialization.compiledSerializer@kotlin.reflect.KClass<#GENERIC_kotlin.Any>.()Generic + 226
at 3 mu51k-ios 0x00000001091342c1 kfun:kotlinx.serialization.serializer@kotlin.reflect.KClass<#GENERIC_kotlin.Any>.()Generic + 97
at 4 mu51k-ios 0x000000010913e9b0 kfun:kotlinx.serialization.modules.getContextualOrDefault@kotlinx.serialization.modules.SerialModule.(kotlin.reflect.KClass<#GENERIC_kotlin.Any>)Generic + 144
at 5 mu51k-ios 0x000000010913dbf8
It’s weird because the type response the API returns is indeed registered:
actual val networkHttpClient: HttpClient
get() = HttpClient {
install(JsonFeature) {
serializer = KotlinxSerializer().apply {
setMapper(CheckEmailResponse::class, CheckEmailResponse.serializer())
setMapper(AuthResponse::class, AuthResponse.serializer())
setMapper(ActionResponse::class, ActionResponse.serializer())
}
}
}
Does this error mean the http-client doesn’t know what to do with String? Are we supposed to register simple types ourselves?Shameek Sarkar
05/06/2019, 10:04 AMhudsonb
05/06/2019, 11:01 PMvmichalak
05/07/2019, 3:04 PMSimon Schubert
05/07/2019, 10:38 PMbasher
05/08/2019, 3:50 AMRuckus
05/08/2019, 1:30 PMexpect class Grade : Comparable<Grade> {
val rough: Int
val fine: Int
// Apparently I can't implement this here
override fun compareTo(other: Grade) {
var result = rough.compareTo(other.rough)
if (result == 0) result = fine.compareTo(other.fine)
return result
}
}
Marc Knaup
05/08/2019, 1:40 PMexpect
or not?
common module:
sealed class Test {
object A : Test()
}
If I don't use `expect`:
fun Test.print() {
when (this) {
is Test.A -> print() // calls method below
}
}
fun Test.A.print() { // gets called
println("A")
}
If I use `expect`:
fun Test.print() {
when (this) {
is Test.A -> print() // recursive call
}
}
expect fun Test.A.print() // not called
max.denissov
05/08/2019, 1:45 PMMarc Knaup
05/08/2019, 5:52 PMA POM cannot have multiple artifacts with the same type and classifier. Already have MavenArtifact fluid-stdlib-metadata:jar.asc:asc:null, trying to add MavenArtifact fluid-stdlib-metadata:jar.asc:asc:null(same here, unanswered: https://stackoverflow.com/questions/54318156/kotlin-multiplatform-library-project-upload-issue-pom-multiple-artifacts) configuration: https://github.com/fluidsonic/fluid-library/blob/master/sources/FluidLibraryVariantConfiguration.kt#L168
basher
05/08/2019, 6:52 PMDeclaration annotated with '@OptionalExpectation' can only be used in common module sources
recently? I've found old SO posts saying it's fixed. It just started happening on my machine for an @SharedImmutable
in our common sources, for a declaration that has been in our codebase building fine for awhile now. Using 1.3.31altavir
05/09/2019, 12:29 PMenableFeaturePreview("GRADLE_METADATA")
. And then I have a library which is also build with gradle meta. According to documentation, all I need is to declare it in the commonMain
block of mpp, and I will automatically get dependencies for all branches. It does not work. I have to write platform-specific dependencies for all platforms and additional metadata for common. What am I doing wrong?Jan Stoltman
05/10/2019, 9:50 AMKris Wong
05/10/2019, 8:14 PMtylerwilson
05/11/2019, 6:02 PMMohammadsss1
05/13/2019, 2:04 AMribesg
05/13/2019, 9:12 AM@Test
annotation?
2. Can you have top-level tests instead of having to put them in a class?
Andy Victors
05/13/2019, 12:42 PMktor
in MPP environment, specifically on iOS where currently only Main-Thread Dispatcher is offered (https://github.com/Kotlin/kotlinx.coroutines/issues/462)?Jan Stoltman
05/13/2019, 1:22 PMany
matcher match objects of one specific class? I imagine something like this: any<MyClass::class>()
ribesg
05/14/2019, 1:07 PMmain
dependencies added to the corresponding test
sourceSet automatically? I need to duplicate all dependencies defined in commonMain
in commonTest
if I want to use them. Same for androidMain
and androidTest
. I didn’t test it, but I suppose it’s the same for iOSbasher
05/14/2019, 3:38 PMuhe
05/15/2019, 8:55 AMkotlinOptions
in a multiplatform lib project. As per the docs I added this to the kotlin
section in the lib's `build.gradle`:
targets.all {
compilations.all {
kotlinOptions {
suppressWarnings = true // just to see if it's applied
}
}
}
But it does not work (warnings are still displayed in the IDE). Anybody else having issues with these compiler options? I'm using IntelliJ Idea 2019.1.2 and gradle 5.1.1Jan Stoltman
05/15/2019, 9:16 AMo.semen
05/15/2019, 11:00 AM> Task :app:cinteropFirebaseIos UP-TO-DATE
> Task :app:linkDebugFrameworkIos
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FIRDatabase", referenced from:
objc-class-ref in combined.o
ld: symbol(s) not found for architecture x86_64
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
> Task :app:linkDebugFrameworkIos FAILED
pablisco
05/16/2019, 10:06 AMpardom
05/16/2019, 4:22 PMactual
implementations restricted to the expect
declaration module?Benjamin Charais
05/16/2019, 6:49 PMactual
keyword on a class to implement an expect.
IntelliJ gives me the warning: The feature "multi platform projects" is experimental and should be enabled explicitly
I have found that in IntelliJ there would be an expectation under :
Preferences ->
Build, Execution, Deployment ->
Kotlin Compiler ->
Additional command line parameters:
To add the flag -Xmulti-platform
I am driving my project settings from gradle and found I can include this block for my subprojects:
targets.all {
compilations.all {
kotlinOptions {
freeCompilerArgs += '-Xmulti-platform'
}
}
}
I am still getting the error and it does not seem to have any effect in the IDE understanding that the feature has been adjusted.
Am I missing something obvious here? Did I implement my gradle wrong?Benjamin Charais
05/16/2019, 6:49 PMactual
keyword on a class to implement an expect.
IntelliJ gives me the warning: The feature "multi platform projects" is experimental and should be enabled explicitly
I have found that in IntelliJ there would be an expectation under :
Preferences ->
Build, Execution, Deployment ->
Kotlin Compiler ->
Additional command line parameters:
To add the flag -Xmulti-platform
I am driving my project settings from gradle and found I can include this block for my subprojects:
targets.all {
compilations.all {
kotlinOptions {
freeCompilerArgs += '-Xmulti-platform'
}
}
}
I am still getting the error and it does not seem to have any effect in the IDE understanding that the feature has been adjusted.
Am I missing something obvious here? Did I implement my gradle wrong?buildTypes {
all {
kotlinOptions {
freeCompilerArgs = [
'-Xmulti-platform',
'-Xuse-experimental=kotlin.Experimental'
]
}
}
}
Tried this in many other places to no avail.gildor
05/16/2019, 11:23 PMBenjamin Charais
05/16/2019, 11:59 PMgildor
05/17/2019, 12:15 AMBenjamin Charais
05/17/2019, 4:15 PMgildor
05/17/2019, 4:25 PM