-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Hilt: Compiler processor doesn't recognize options dagger.fastInit, dagger.hilt.android.internal.disableAndroidSuperclassValidation #2040
Comments
Hi @jt-9, I wasn't able to reproduce this. Do you have a minimal reproducible example app that you could share that demonstrates the behavior? |
Could it be that a module that reports this doesn't use some of the Hilt features? Maybe the module that reports this doesn't use any |
Hi @bcorso, sorry for late response. Here is reproducible example app https://github.com/jt-9/HiltMultiModuleMRP, if you build it with command
As for other warning with @lukas1 Thanks for sharing an idea, will try it. |
@bcorso I updated the repository with app that reproduces warnings https://github.com/jt-9/HiltMultiModuleMRP Thanks to @lukas1 point I added module
|
Thanks for the repro @jt-9! Unfortunately, I don't think there's much we can do on our end about it. This appears to be a It seems In your case, SolutionThere's a couple options here:
|
I'm going to close this since there doesn't seem to be much we can do about this warning from our side. |
Thank you, I think I will file a bug to Kotlin team |
@jt-9 Did you ever end up filing an issue on the Kotlin issue tracker? |
… points When Hilt Android is run on a module that contains no entry points, KAPT will log an error about disableAndroidSuperclassValidation not being a support option. This is because the Hilt Gradle plugin will add this option when applied but if no entry points exists, no processor actually accepts that option. With this fix, all hilt processors accept these options (though they are unused). This will prevent KAPT from logging these warnings in most cases. It is still possible for warnings to be logged, for example if the Hilt plugin is applied, but Hilt isn't used but for those cases the user can simply skip applying the plugin. This fixes google#2040
… points When Hilt Android is run on a module that contains no entry points, KAPT will log an error about disableAndroidSuperclassValidation not being a support option. This is because the Hilt Gradle plugin will add this option when applied but if no entry points exists, no processor actually accepts that option. With this fix, all hilt processors accept these options (though they are unused). This will prevent KAPT from logging these warnings in most cases. It is still possible for warnings to be logged, for example if the Hilt plugin is applied, but Hilt isn't used but for those cases the user can simply skip applying the plugin. This fixes google#2040
… points When Hilt Android is run on a module that contains no entry points, KAPT will log an error about disableAndroidSuperclassValidation not being a support option. This is because the Hilt Gradle plugin will add this option when applied but if no entry points exists, no processor actually accepts that option. With this fix, all hilt processors accept these options (though they are unused). This will prevent KAPT from logging these warnings in most cases. It is still possible for warnings to be logged, for example if the Hilt plugin is applied, but Hilt isn't used but for those cases the user can simply skip applying the plugin. This fixes google#2040
This issue can partially be solved by dagger. I opened a PR to fix it: #2372 |
… points. When Hilt Android is run on a module that contains no entry points, KAPT will log an error about `disableAndroidSuperclassValidation` not being a support option. This is because the Hilt Gradle plugin will add this option when applied but if no entry points exists, no processor actually accepts that option. With this fix, all Hilt processors accept these options (though they are unused). This will prevent KAPT from logging these warnings in most cases. It is still possible for warnings to be logged, for example if the Hilt plugin is applied, but Hilt isn't used but for those cases the user can simply skip applying the plugin. Fixes #2040 Closes #2372 RELNOTES="Reduce the possibility of KAPT logging warnings due to no processor supporting `disableAndroidSuperclassValidation` when no Android entry points are in the source module." PiperOrigin-RevId: 360770265
… points. When Hilt Android is run on a module that contains no entry points, KAPT will log an error about `disableAndroidSuperclassValidation` not being a support option. This is because the Hilt Gradle plugin will add this option when applied but if no entry points exists, no processor actually accepts that option. With this fix, all Hilt processors accept these options (though they are unused). This will prevent KAPT from logging these warnings in most cases. It is still possible for warnings to be logged, for example if the Hilt plugin is applied, but Hilt isn't used but for those cases the user can simply skip applying the plugin. Fixes #2040 Closes #2372 RELNOTES="Reduce the possibility of KAPT logging warnings due to no processor supporting `disableAndroidSuperclassValidation` when no Android entry points are in the source module." PiperOrigin-RevId: 360770265
… points. When Hilt Android is run on a module that contains no entry points, KAPT will log an error about `disableAndroidSuperclassValidation` not being a support option. This is because the Hilt Gradle plugin will add this option when applied but if no entry points exists, no processor actually accepts that option. With this fix, all Hilt processors accept these options (though they are unused). This will prevent KAPT from logging these warnings in most cases. It is still possible for warnings to be logged, for example if the Hilt plugin is applied, but Hilt isn't used but for those cases the user can simply skip applying the plugin. Fixes #2040 Closes #2372 RELNOTES="Reduce the possibility of KAPT logging warnings due to no processor supporting `disableAndroidSuperclassValidation` when no Android entry points are in the source module." PiperOrigin-RevId: 360836064
I had same problem. |
@JerryApplegarth and what does that mean? where did you add that? |
ok, I added to 'plugins', getting exception: The compiler option dagger.hilt.android.internal.projectType is not a recognized Hilt option. Is there a typo? |
For me adding this to the build file (in the android block) fixed it:
|
Hi Team, I tried possible fixes suggested nothing works. Is there any other ticket open related to this ? |
@GeorgePeterPandian do you have more information on what you're hitting? The main issue should have been solved by c70cf2d. The actual error you're hitting plus your Dagger/Hilt version would be helpful. Also, note that the fix we put in helps with cases where you only use part of the Hilt APIs, but if you have a module where you have the Hilt processors and use none of the Hilt annotations, then I think this problem still exists and you would need to remove the Hilt processors from that module. |
As reported on StackOverflow, you can get rid of these warnings if you:
But if you're using KSP (and so don't have any kapt plugin), that workaround won't help. Just tested with 2.50. |
Can you tell me please how you fixed that warning |
Any fixes? ksp already at the bottom of plugins, hilt config added to android config in gradle build, but stil same warning |
same problem |
Any fixes? I am having same issue and tried everything which is on the thread but nothing works to silence this warning. As I am using kapt for databinding and ksp for room db. Any help / tip / reference / code sample share it with us. |
Hello.
I am developing multi-module Android project with Hilt version
2.28.3-alpha
. I have included dagger compiler to every module which requests or provides. After compilation in Android studio4.0.1
I seewarnings
in every module:Though these are
warnings
I was taught to pay attention to them as well, since they might indicate a potential problem with logic or performance, or anything else.Applications seems to compile and run successfully, but are these warnings important? May be I am missing some
Dagger Hilt
setting?Thank you.
The text was updated successfully, but these errors were encountered: