Skip to content
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

No dependencies reported for generated source after 2.53 and Kotlin 2.1.0 update #4526

Closed
G00fY2 opened this issue Dec 3, 2024 · 5 comments · Fixed by #4529
Closed

No dependencies reported for generated source after 2.53 and Kotlin 2.1.0 update #4526

G00fY2 opened this issue Dec 3, 2024 · 5 comments · Fixed by #4529

Comments

@G00fY2
Copy link

G00fY2 commented Dec 3, 2024

After we updated to Dagger 2.53 and Kotlin 2.1.0 we now see a lot of similar warnings already reported in the past: #4182.

There is also already a new bug in the issue tracker: https://issuetracker.google.com/issues/381887333

Since we did not see any errors with Kotlin 2.0.21 and Dagger 2.52 I think this is not caused by our dependency or project setup.

This warning is shown only for every androidx.lifecycle.ViewModel and no other classes in our project:

w: [ksp] No dependencies reported for generated source

MyViewModel_HiltModules_KeyModule_Provide_LazyMapKey.java which willprevent incremental compilation.

MyViewModel_ViewModel_HiltModules_BindsModule_Binds_LazyMapKey.java which willprevent incremental compilation.
  • AGP: 8.7.3
  • Gradle: 8.11.1
  • Dagger: 2.53
  • Kotlin: 2.1.0
  • AndroidX lifecycle-viewmodel-ktx 2.8.7
@jrodbx
Copy link

jrodbx commented Dec 3, 2024

Also seeing this with Dagger 2.53 and Kotlin 2.0.21, so looks like this might be isolated to the Dagger 2.53 release?

@bcorso
Copy link

bcorso commented Dec 3, 2024

Thanks for reporting this!

I think the issue is that the new LazyMapKeyProxyGenerator does not add an originating element.

I'll fix this and release a 2.53.1 update.

@lassem
Copy link

lassem commented Dec 4, 2024

I had a feeling the room link for the issue tracking was misleading! Oh well 👍🏻

copybara-service bot pushed a commit that referenced this issue Dec 4, 2024
Forgetting the originating element was an oversight. Gradle's incremental processing requires originating elements to determine when to reprocess files. This CL fixes `LazyMapKeyProxyGenerator` by extending `SourceFileGenerator`, which takes care of assigning the originating element. In addition, it removes some duplicate code that's already handled in `SourceFileGenerator` (e.g. adding the generated and suppress annotations).

Fixes #4526

RELNOTES=Fixes #4526: Add the originating element in LazyMapKeyProxyGenerator.
PiperOrigin-RevId: 702804185
@akingyin1987
Copy link

When will the next version be released?

@bcorso
Copy link

bcorso commented Dec 9, 2024

I plan on doing a release today.

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 a pull request may close this issue.

5 participants