-
Notifications
You must be signed in to change notification settings - Fork 285
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 Processing order doesn't process room class first before typealias #881
Comments
Can you share the stacktrace and/or a sample project that we can reproduce it? |
Hi Ting-Yuan I made a simple version of the app, with typealias using Room data, but
|
Hi Ting-Yuan Could you please check newer build here In Test.kt, Adding foreign key
Seems to produce same error. |
Any advice? last link contains simple app that can reproduce the error. Please let me know if I can be any helpful. |
I don't know why Room only expects ClassName and ArrayTypeName, while TypeName can also be ParameterizedTypeName, TypeVariableName and WildcardTypeName. From the given exception, it looks like that the type passed is indeed a parameterized type. What if It looks like to me that type type alias is correctly "un-aliased". Can you file a bug with Room and see what they say? |
Thanks for your insight. Will do. Could you please suggest me the correct room repo? I accidentally created to the wrong repo. |
So the reason this is happening is that, when we observe |
Thanks for the explanation. Will fix in KSP. |
Btw, playing a bit more with it, this might also have some interesting equality considerations. If I change the test there to use |
repro: I changed the test a little bit to print type arguments in the signature as well and also group by final signature for equality checks. Good news, equality checks seems to be working, bad news; it is printing the extra type arguments.
Where
|
I change the code to |
The fix will be available in 1.6.20-1.0.5 soon. |
Got it. Thank you! |
(cherry picked from commit 99518cb)
With room being KSP dependent, if I have this code,
And in other file in the same package, But different fille
This compiration with ksp with room gives me
`
[ksp] java.lang.IllegalStateException: Unexpected type name for KSType: com.mypackage.Identifier<com.mypackage.DataProvider>
`
This makes me think that alias processing happenes before ksp is processing room annotation.
The text was updated successfully, but these errors were encountered: