Skip to content

annotation: make GeneratedAppGlideModuleImpl public to fix Kotlin 2.2.20 visibility warning (#5601)#5660

Open
iVamsi wants to merge 1 commit intobumptech:masterfrom
iVamsi:fix/generated-module-visibility-5601
Open

annotation: make GeneratedAppGlideModuleImpl public to fix Kotlin 2.2.20 visibility warning (#5601)#5660
iVamsi wants to merge 1 commit intobumptech:masterfrom
iVamsi:fix/generated-module-visibility-5601

Conversation

@iVamsi
Copy link

@iVamsi iVamsi commented Mar 1, 2026

Fix Kotlin 2.2.20 visibility warning (#5601)

Description

Make GeneratedAppGlideModule and the KAPT-generated GeneratedAppGlideModuleImpl public.

The KSP processor generates GeneratedAppGlideModuleImpl as internal, which extends GeneratedAppGlideModule — a Java class with package-private visibility. Kotlin 2.2.20 introduced stricter visibility checks ([KTLC-271] https://youtrack.jetbrains.com/issue/KTLC-271)) that flag this as a warning, and it will become a hard error in Kotlin 2.4:

w: GeneratedAppGlideModuleImpl.kt:12:5 'internal' declaration exposes 'public/*package*/'
   type 'GeneratedAppGlideModule'. This will become an error in language version 2.4.

Fix: make GeneratedAppGlideModule public. Since it is by design subclassed across module boundaries by generated code, public is the correct visibility. The KAPT-generated GeneratedAppGlideModuleImpl is also made public for consistency.

Motivation and Context

Fixes #5601.

Kotlin 2.2.20 introduced KTLC-271, which warns (and will error in 2.4) when an internal Kotlin declaration exposes a type with lower visibility. Because GeneratedAppGlideModule was package-private in Java, the internal KSP-generated subclass triggered this rule. Making the base class public resolves the mismatch without changing any user-facing API.

@google-cla
Copy link

google-cla bot commented Mar 1, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kotlin 2.2.20 Compiler Warning - GeneratedAppGlideModule

1 participant