-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Index annotation cannot be resolved on generated code by ksp #4911
Comments
Thanks for reporting this and providing the workaround. I don't see this in a single module project. Could you share your project structure? Do you have a single module, or multiple modules? If you have multiple modules, do the submodules contain LibraryGlideModules? Or an AppGlideModule? |
Hello.
|
The processor will produce a Index annotated class for each LibraryGlideModule in given compilation unit. If the Index annotation is in the ksp module, it will not be accessible in parent modules, causing a compilation failure. To work around that, we'll follow the same pattern as we did for Java and place the annotation in the annotations package, but with package private visibility. Any compilation unit that uses our annotation processor must already have a dependency on annotation, so the Index annotation will be available. Fixes bumptech#4911.
The processor will produce a Index annotated class for each LibraryGlideModule in given compilation unit. If the Index annotation is in the ksp module, it will not be accessible in parent modules, causing a compilation failure. To work around that, we'll follow the same pattern as we did for Java and place the annotation in the annotations package, but with package private visibility. Any compilation unit that uses our annotation processor must already have a dependency on annotation, so the Index annotation will be available. Fixes bumptech#4911.
The processor will produce a Index annotated class for each LibraryGlideModule in given compilation unit. If the Index annotation is in the ksp module, it will not be accessible in parent modules, causing a compilation failure. To work around that, we'll follow the same pattern as we did for Java and place the annotation in the annotations package, but with package private visibility. Any compilation unit that uses our annotation processor must already have a dependency on annotation, so the Index annotation will be available. Fixes #4911.
|
Glide Version: 4.14.1
Integration libraries: N/A
Device/Android Version: N/A
Issue details / Repro steps / Use case background:
Generated codes by KSP cannot be compiled after setup project as ksp guideline
@Index
annotation is undercom.bumptech.glide.annotation.ksp
package, but kotlin compiler cannot reference it.After add
compileOnly
configuration on dependency block, compile can be succeeded.The text was updated successfully, but these errors were encountered: