Open opLW opened 1 year ago
I have tested these case.
Only the case 3 got error above, there maybe a bug for Glide?
Thanks for the detail! Something similar was reported in #5269
Are you able to run kapt for the data binding processor and ksp for the glide processor? Unfortunately it's pretty painful to test this scenario.
Ah ok I think I know why the ksp processor generates indexes in a separate package name that the java processor does not check. I guess I was thinking people would go from kapt -> ksp, but not the other way around.
Yeah ok so we write the Indexer intermediates to a different package in KSP than in the java processor and with a different annotation. This is something we could change. However, I think it's probably better if you just use ksp at the top level for your Glide annotation processing. As far as I can tell, you should be able to do that and continue to use kapt for data binding.
Does that sound like a reasonable option?
Using kapt for databinding and ksp for Glide is useful for me. Oh, is a solution that i never been thought. Thanks for your suggest!! Whether Glide have a post or document which can help me to know more about how Glide adapt ksp.
Glide: 4.16.0
1. Background introduction. I have a custom LibraryGlideModule to custom image url. The code are below:
2. Error appear when using KAPT,i can use
ScreenWidthUrl
like below:But after migrate to KSP,i get an error:
3. Try to solve error I have searched without solution. So i print message in function`s body and find the diff between KAPT and KSP.
The above code snippets are both in
GeneratedAppGlideModuleImpl
which generated automatically inbuild/generated/source/kapt/developDebug/com/bumptech/glide/GeneratedAppGlideModuleImpl.java
of app module. The lack ofnew ResizeableUrlGlideModule().registerComponents(context, glide, registry);
, so i get the error.4. Discussion My app module is still using KAPT, because it using
DataBinding
. AndResizeableUrlGlideModule
is in library module which use KSP. When library module use KAPT too, everything is ok. When library module use KSP, i got error above. Can anyone tell me how to solve this? thanks!