Status Update
Comments
da...@google.com <da...@google.com>
au...@google.com <au...@google.com> #4
The issue is still there with KGP 2.1.20-RC-105 and KSP 2.1.20-Beta2-1.0.29
RC will releases soon, do you have suggested fixes or can I disable these tests in the meantime?
da...@google.com <da...@google.com> #5
Can you please apply the following patch:
Both failures are related to KAPT (low priority) so working around them for now instead of disabling the tests and losing KSP coverage.
au...@google.com <au...@google.com> #6
It seems like only XAnnotationTest.typeReference_kotlin
is a regression and that XTypeTest.missingTypes_names
is just a change in log message.
Given that RC is coming soon, do you have some hints on what we should put in the bug for KAPT?
da...@google.com <da...@google.com> #7
If you are filling a bug about the KAPT, then the following will help them:
Given the following source files:
// src/kotlin/Subject.kt
@MyAnnotation(singleType = Long::class)
class Subject {
}
// src/kotlin/MyAnnotation.java
public @interface MyAnnotation {
Class<?> singleType();
}
in Kotlin KSP 2.1.20-Beta2 the KAPT stub is:
@MyAnnotation(singleType = kotlin.Long.class)
@kotlin.Metadata(mv = {2, 1, 0}, k = 1, xi = 48, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u0001B\u0007\u00a2\u0006\u0004\b\u0002\u0010\u0003\u00a8\u0006\u0004"}, d2 = {"LSubject;", "", "<init>", "()V", "kapt-2.1.20-issue"})
public final class Subject {
public Subject() {
super();
}
}
where as in Kotlin 2.1.10 it is:
@MyAnnotation(singleType = long.class)
@kotlin.Metadata(mv = {1, 9, 0}, k = 1, xi = 48, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\b\u0007\u0018\u00002\u00020\u0001B\u0005\u00a2\u0006\u0002\u0010\u0002\u00a8\u0006\u0003"}, d2 = {"LSubject;", "", "()V", "kapt-2.1.20-issue"})
public final class Subject {
public Subject() {
super();
}
}
Notice the change in the value singleType
, it is not being interop. Similarly if singleType = String::class
is used, then the KAPT sub in 2.1.10 is @MyAnnotation(singleType = java.lang.String.class)
where as in 2.1.20-Beta2 it is @MyAnnotation(singleType = kotlin.String.class)
which is not right.
If you link the issue here I can also give them a sample project to repro.
Description
When attempting to upgrade to KGPhttps://r.android.com/q/topic:%22kotlin-2.1.20%22 ) there are 3 failing room tests:
2.1.0-Beta1-26
and KSP built from HEAD (topicandroidx.room.compiler.processing.XAnnotationBoxTest#typeReference_kotlin[preCompiled_false]
androidx.room.compiler.processing.XAnnotationTest#typeReference_kotlin[preCompiled_false]
androidx.room.compiler.processing.XTypeTest#missingTypes_names