Thanks for the PR. Sorry I didn’t notice it timely. Pinging us on github might get a sooner response, in case you need us in similar scenarios in the future.
z
Zac Sweers
09/13/2021, 5:37 AM
No rush! Feedback welcome still, we’re actively working on this so this won’t be the last PR and open to change. Actually have another one up now with some more interop APIs plus starting test infra for it https://github.com/square/kotlinpoet/pull/1148
j
Jiaxiang
09/14/2021, 4:52 AM
#1146 looks good overall. Have a minor comment on #1148 but I assume that is not very related to KSP itself
i
Islam Assem
09/29/2021, 7:13 PM
Excellent work
but I have an error here
[ksp] java.lang.IllegalArgumentException: no type arguments: .User
where kstype is the type is List<User>
Islam Assem
09/29/2021, 7:16 PM
solved it by adding this line
Copy code
is KSClassDeclaration -> {
if (decl.typeParameters.isEmpty())
decl.toClassName()
else decl.toClassName()
.parameterizedBy(
arguments.map {
it.toTypeName(typeParamResolver)
})
}
in KsTypes
Copy code
public fun KSType.toTypeName(
typeParamResolver: TypeParameterResolver = TypeParameterResolver.EMPTY
): TypeName {
val type = when (val decl = declaration) {
is KSClassDeclaration -> {
z
Zac Sweers
09/29/2021, 7:43 PM
please use the issue tracker with a repro case in the future