From 94bb74198b8479d55bd1217ea204b3db016cacf8 Mon Sep 17 00:00:00 2001 From: Eliezer Graber Date: Thu, 8 Feb 2024 00:19:12 -0500 Subject: [PATCH] Fix for KSAnnotation package null - https://github.com/google/ksp/issues/1721 --- .../ksp/src/main/kotlin/me/tatarka/inject/compiler/ksp/Util.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kotlin-inject-compiler/ksp/src/main/kotlin/me/tatarka/inject/compiler/ksp/Util.kt b/kotlin-inject-compiler/ksp/src/main/kotlin/me/tatarka/inject/compiler/ksp/Util.kt index 54201f74..19fe5b62 100644 --- a/kotlin-inject-compiler/ksp/src/main/kotlin/me/tatarka/inject/compiler/ksp/Util.kt +++ b/kotlin-inject-compiler/ksp/src/main/kotlin/me/tatarka/inject/compiler/ksp/Util.kt @@ -35,7 +35,7 @@ private fun KSAnnotation.hasName(packageName: String, simpleName: String): Boole // we can skip resolving if the short name doesn't match if (shortName.asString() != simpleName) return false val declaration = annotationType.resolve().declaration - return declaration.packageName.asString() == packageName + return declaration.qualifiedName?.asString() == "$packageName.$simpleName" } /**