bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.67k stars 6.12k forks source link

LibraryGlideModules [] are included more than once, keeping only one! #5303

Closed TWiStErRob closed 1 year ago

TWiStErRob commented 1 year ago

Glide Version: 4.16.0, 5.0.0-rc01

Integration libraries: none

Device/Android Version: N/A

Issue details / Repro steps / Use case background: I have 1 LibraryGlideModule in an AGP library module, that applies ksp and generates the index. No other GlideModule annotated classes.

I imagine that having an empty list in that warning message is a bug.

Repro:

Note: build\generated\ksp\debug\kotlin\com\bumptech\glide\annotation\ksp\GlideIndexer_GlideModule_com_example_MyGlideLibModule.kt is generated with contents:

package com.bumptech.glide.`annotation`.ksp

@Index(modules = [
"com.example.MyGlideLibModule",
])
public class GlideIndexer_GlideModule_com_example_MyGlideLibModule

which seems correct.

Stack trace / LogCat:

> Task :glide4-helpers:kspDebugKotlin
w: [ksp] LibraryGlideModules [] are included more than once, keeping only one!

Related code: https://github.com/bumptech/glide/blob/b3fd2bc1b68b988202e50fac757a318274c16be8/annotation/ksp/src/main/kotlin/com/bumptech/glide/annotation/ksp/LibraryGlideModules.kt#L40-L54