dave08
01/08/2019, 7:42 PMwriteObject { ... }
and nextLongOrNull()
etc...jw
01/08/2019, 7:43 PMjw
01/08/2019, 7:44 PMjw
01/08/2019, 7:45 PMdave08
01/08/2019, 7:48 PMdave08
01/09/2019, 1:28 PMjw
01/15/2019, 11:45 PMrook
01/18/2019, 3:01 PMmoshi-kotlin
working properly. I finally got it Proguarding correctly (I think), but now I’m getting reflection crashes on my models. I’m able to work around it by providing defaults for all the constructor parameters. Is this just a requirement of using moshi-kotlin
?
The stack trace for the crash I’m experiencing:```kotlin.reflect.jvm.internal.KotlinReflectionInternalError: This callable does not support a default call: public constructor Session(@com.squareup.moshi.Json token: kotlin.String?, vehicle: com.company.driver.entities.Vehicle?, driver: com.company.driver.entities.Driver, @com.squareup.moshi.Json latestDvir: com.company.driver.entities.Dvir?, preferences: kotlin.collections.List<kotlin.string> = ..., @com.squareup.moshi.Json lmKey: kotlin.String?) defined in com.company.driver.entities.Session[DeserializedClassConstructorDescriptor@f1c45f0]
at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod(KCallableImpl.kt:153)
at kotlin.reflect.jvm.internal.KCallableImpl.callBy(KCallableImpl.kt:110)
at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapter.fromJson(KotlinJsonAdapter.kt:104)
at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137)
at retrofit2.converter.moshi.MoshiResponseBodyConverter.convert(MoshiResponseBodyConverter.java:45)
at retrofit2.converter.moshi.MoshiResponseBodyConverter.convert(MoshiResponseBodyConverter.java:27)
at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:223)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:121)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)```eric
01/18/2019, 3:02 PMrook
01/18/2019, 3:03 PMrook
01/18/2019, 3:14 PMmoshi-kotlin
pniederw
01/18/2019, 8:31 PMpublic abstract static
rather than public static abstract
?pniederw
01/18/2019, 8:32 PMjw
01/18/2019, 8:33 PMModifier
enum of the JDK and whatever order it definesjw
01/18/2019, 8:33 PMjw
01/18/2019, 8:33 PMpniederw
01/18/2019, 8:38 PMpublic abstract static
pniederw
01/18/2019, 8:39 PMjw
01/18/2019, 8:39 PMrook
01/18/2019, 10:08 PMkotlin.reflect.jvm.internal.KotlinReflectionInternalError: Could not compute caller for function: public constructor DriverStatsResponse(summary: com.company.driver.entities.Summary, events: kotlin.collections.List<com.company.driver.entities.Event>) defined in com.company.driver.entities.DriverStatsResponse[DeserializedClassConstructorDescriptor@9293a] (member = null)
rook
01/18/2019, 10:09 PMcoletz
01/20/2019, 2:07 PMkotlinpoet
. Basically I am doing myAnnotatedInterface.enclosedElements[0].asType().asTypeName()
and it is giving me an error: Unexpected type mirror: ()java.lang.String
. Am I doing something wrong? Why is this ()
before the type added? Of course this is just an example, but it's returning me this error everywhere I use myType.asTypeName()
EDIT: seems like it's (kinda) correct when using interfacesNikky
01/21/2019, 7:49 AMdavid.bilik
01/21/2019, 4:01 PMwire-kotlin-generator
in https://github.com/square/wire project, is it WIP or I can somehow use it in my app?jw
01/21/2019, 4:49 PMegorand
01/22/2019, 3:07 AMpniederw
01/22/2019, 7:59 AMpniederw
01/22/2019, 11:44 PMefemoney
01/24/2019, 4:50 PMMyEnum.myFunction(...)
bdawg.io
02/06/2019, 7:32 PMresponse.body()
call? (ie, could I have a rendezvous channel type configured for moshi to lazily convert from a JSON array)