The entry gen is incompatible with kotlin 1.5.0
The incompatibility of the entry gen with 1.5.0 comes down to one function call: getReferenceTargets(bindingContext).
with some context:
// expression: KtDotQualifiedExpression <- is a function parameter and the following is in the function body:
val receiver = expression.receiverExpression
val receiverRef = receiver.getReferenceTargets(bindingContext).firstOrNull() //returned a list with a intance derived from `FunctionDescriptor` in kotlin 1.4.32, and returns an empty list in kotlin `1.5.0`
So it seems either the "knowledge" of the BindingContext or the behaviour of getReferenceTargets has changed between 1.4.32 and 1.5.0 . Other than that everything else seems to work.
I opened an issue on youtrack (https://youtrack.jetbrains.com/issue/KT-46547) to ask if this behaviour change was intended or not. Because to me it seems getReferenceTargets is now useless.
Looking at the source code of both BindingContext and getReferenceTargets it's not obvious to me what causes the issue.
As an alternative I already started to test if I can generate everything needed with KSP (https://github.com/google/ksp).
Probably the rework of the entry gen has to be done now rather than later as i don't think the issue above can be fixed easily.
Related to #225
The entry gen is incompatible with kotlin
1.5.0
The incompatibility of the entry gen with1.5.0
comes down to one function call:getReferenceTargets(bindingContext)
. with some context:So it seems either the "knowledge" of the
BindingContext
or the behaviour ofgetReferenceTargets
has changed between1.4.32
and1.5.0
. Other than that everything else seems to work. I opened an issue on youtrack (https://youtrack.jetbrains.com/issue/KT-46547) to ask if this behaviour change was intended or not. Because to me it seemsgetReferenceTargets
is now useless. Looking at the source code of bothBindingContext
andgetReferenceTargets
it's not obvious to me what causes the issue.As an alternative I already started to test if I can generate everything needed with KSP (https://github.com/google/ksp). Probably the rework of the entry gen has to be done now rather than later as i don't think the issue above can be fixed easily. Related to #225