Comments (4)
Hi, @nitinsethi86 ,
Thanks for reporting. I was able to reproduce. This should be due to an issue in the KSP library where a type defined as ITestDelegate<? extends InterfaceUsedInGenerics>
would be seen as ITestDelegate<InterfaceUsedInGenerics>
. While this is fine in Kotlin because ITestDelegate
has declaration-site variance, it becomes incompatible with your TestDelegate
in Java. I just filed the issue at google/ksp#1969.
As a workaround I would try migrating the place where you inject ITestDelegate
to Kotlin.
from dagger.
@kuanyingchou Thanks for the reply.
The classes involved is considerably large. So, the workaround is slightly challenging.
Is there any other workaround that we can apply?
from dagger.
You can create a wrapper in Kotlin and inject that wrapper instead. Something like:
class DelegateWrapper @Inject constructor(
val testDelegate: ITestDelegate<InterfaceUsedInGenerics>)
Note that due to another issue in an underlying library Dagger uses, the value of suppress
in @JvmSuppressWildcards
is not respected. Please use @JvmWildcard
instead. For example, @JvmSuppressWildcards(suppress = false) ITestDelegate<InterfaceUsedInGenerics>
in your code should be replaced with ITestDelegate<@JvmWildcard InterfaceUsedInGenerics>
.
from dagger.
That works. Thanks. I will wait for the stable support of KSP in dagger.
from dagger.
Related Issues (20)
- Transitive vulnerability from symbol-processing-api HOT 1
- java.lang.IllegalArgumentException: CreationExtras must have a value by `SAVED_STATE_REGISTRY_OWNER_KEY` HOT 4
- Update of different dependency: Error "package javax.annotation.processing is not visible" HOT 4
- java.lang.IllegalArgumentException: Multiple entries with same key HOT 4
- Execution failed for task ':app:kaptDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction > java.lang.reflect.InvocationTargetException (no error message) HOT 2
- Stackoverflow when exposing parents of Subcomponents HOT 7
- Hilt not working with android testFixtures? HOT 2
- Hilt 2.44.2 - Class not found when use @AndroidEntryPoint at WidgetReceiver HOT 1
- Does Dagger 2.51 support JDK17 and JDK21? HOT 1
- [KSP] Intersection type bounds are not ordered correctly in generated factories HOT 1
- [KSP] KSP mode does not check for `@Provides` on interface methods HOT 1
- [KSP] Multibinding example from developer docs does not compile under Kotlin + KSP HOT 1
- [KSP] How to pass compiler argument to KSP? HOT 4
- The lack of sprite in the Friday Night Funkin character
- Subcomponent MembersInjector error in 2.51 HOT 1
- Does Hilt always execute app module during instrumented test? HOT 3
- [KSP] Dagger-KSP does not see typealiased dagger annotations HOT 3
- Cannot invoke getAnnotationValue because "annotation" is null HOT 13
- Creator-less subcomponents are not visible to modules HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dagger.