-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KSP] Missing value class
in generics support for bindings
#4096
Comments
value class
in generics support for bindingsvalue class
in generics support for bindings
Hi, @VincentMasselis , thanks for reporting. I can reproduce it on my side. This looks like something we should fix as it was working with kapt. I'll look into this. |
For inline value types used as type arguments we should generate boxed type names. For example: For type `kotlin.collections.List<kotlin.UInt>`, we should generate `java.util.List<kotlin.UInt>` instead of `java.util.List<java.lang.Integer>`. This also applies to generic value types. So for type `kotlin.collections.List<kotlin.Result<kotlin.Int>>`, we should generate `java.util.List<kotlin.Result<java.lang.Integer>>` instead of `java.util.List<java.lang.Object>`. Bug: google/dagger#4096 Test: XTypeTest Change-Id: I3fcd8cb8e5b8f81bb503eb278cd2b8d39b1e991e
Hi, @VincentMasselis , this should be fixed now. Could you give HEAD-SNAPSHOT a try? |
Hello @kuanyingchou, the build seems to be OK ! I'll will try to run on my phone to check if it run as excepted |
Okay, I've run the app on my phone, everything works fine ! Thanks ! |
Any release date where this fix is coming? |
We're preparing for a release now. It may come out today if we get it done in time, otherwise it'll be out early next week. |
I used to work with kapt, I recently switched to 2.48.x with KSP which fired some issue on my build, thanks to your efforts 2 of them were fixed with recent releases.
Now I'm facing a new one, I suppose the new KSP compiler doesn't support
value class
when used with generics because I'm creating a binding which uses aUShort
as one of the generics but the created.java
class from KSP replaces the typeUShort
by the classicShort
.There is the exception:
You can consult the complete code used on my repo here
The binding which fails here
And an example of a failed github action build.
If your confident enough, you can directly try to build the app by yourself by fetching the sources and by simply running a
./gradlew bundleDemo
or any command you consider useful in this case, no environnement variable or plugin is required to run gradle command on this repo.The text was updated successfully, but these errors were encountered: