https://kotlinlang.org logo
Title
e

efemoney

04/14/2022, 2:16 PM
This might be a bug in ksp so I’m just posting here for awareness but did something change in ksp (from 1.0.2 to 1.0.5) regarding typealiases? https://github.com/square/moshi/issues/1530
👀 2
t

Ting-Yuan Huang

04/14/2022, 5:58 PM
There was a change in 1.0.5, where type arguments are now returned for the reference, instead of the complete, underlying type. In this case, it is a reference to an alias and therefore the arguments defined in declaration of the alias are not included. Let me look into Moshi a little bit to see how it is used and how we should resolve this.
👍🏼 1
👍 1
y

yigit

04/15/2022, 4:57 AM
https://github.com/google/ksp/issues/881 is the relevant bug fix in KSP.
t

Ting-Yuan Huang

04/15/2022, 7:47 AM
KotlinPoet relies on the old behavior. Bumping KSP to 1.0.5 breaks its test. Luckily calls to
KSType.arguments
is limited in
KSType.toTypeName
: https://github.com/square/kotlinpoet/blob/master/interop/ksp/src/main/kotlin/com/squareup/kotlinpoet/ksp/ksTypes.kt#L78 I'm still trying to see how to update it.
e

efemoney

04/19/2022, 12:15 PM
Whats the decision on this? I can create an issue on kotlinpoet if needed.