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

Cause: couldn't make a guess for com.package.TestModule #3329

Closed
vrrashkov opened this issue Apr 6, 2022 · 4 comments · May be fixed by #3364
Closed

Cause: couldn't make a guess for com.package.TestModule #3329

vrrashkov opened this issue Apr 6, 2022 · 4 comments · May be fixed by #3364

Comments

@vrrashkov
Copy link

vrrashkov commented Apr 6, 2022

When I updated to the latest version of hilt 2.41 I get the following error and the module is with almost nothing in it, it worked before but currently throws this exception. I couldn't find any info on what does that error mean. "couldn't make a guess for com.package.TestModule"

Execution failed for task ':app:hiltAggregateDepsDebug'.
> A failure occurred while executing dagger.hilt.android.plugin.task.AggregateDepsTask$WorkerAction
   > couldn't make a guess for  com.package.TestModule
@Module
@InstallIn(SingletonComponent::class)
object TestModule {

    @Provides
    @Singleton
    @TestModuleController
    fun provideTestModuleController() = null
}

@vrrashkov
Copy link
Author

It turns out that from version 2.4 > the enableAggregatingTask is true by default, when switching it to false it fixed the issue.

@bcorso
Copy link

bcorso commented Apr 6, 2022

Hi @MrCroZer,

Ideally you would not disable the aggregating task because that performs a lot of useful tasks for you (see https://dagger.dev/hilt/gradle-setup#aggregating-task).

The issue is that we assume that the fully qualified class name is ASCII and follows typical Java style (lowercase package names, UpperCamelCase class names), so I think something in your package or class name is violating that.

We may be able to fix this on our side, we'll have to take a further look. However, you should also be able to fix this on your side if you ensure you use the above practice for naming. If you can't figure out what the issue is you can share your exact package and class name here and we can try to help.

@vrrashkov
Copy link
Author

You are correct, the package indeed includes uppercase in it. Is there a way to fix this without changing the package to lowercase, because the app is already published in google play and is with uppercase, so I don't think it is allowed to lowercase it.

@bcorso
Copy link

bcorso commented Apr 6, 2022

Okay, thanks for following up. We'll look into it on our side and report back. I'll reopen this for now.

@bcorso bcorso reopened this Apr 6, 2022
copybara-service bot pushed a commit that referenced this issue Apr 12, 2022
…ges for roots, but this will help with modules inside packages that don't follow normal capitalization conventions.

Issue #3329.

RELNOTES=Address part of #3329 where modules in a package with non-standard capitalization could cause an error.
PiperOrigin-RevId: 441024848
copybara-service bot pushed a commit that referenced this issue Apr 12, 2022
…ges for roots, but this will help with modules inside packages that don't follow normal capitalization conventions.

Issue #3329.

RELNOTES=Address part of #3329 where modules in a package with non-standard capitalization could cause an error.
PiperOrigin-RevId: 441024848
copybara-service bot pushed a commit that referenced this issue Apr 13, 2022
…ges for roots, but this will help with modules inside packages that don't follow normal capitalization conventions.

Issue #3329.

RELNOTES=Address part of #3329 where modules in a package with non-standard capitalization could cause an error.
PiperOrigin-RevId: 441330899
copybara-service bot pushed a commit that referenced this issue Apr 25, 2022
Fix #3329.

RELNOTES=n/a
PiperOrigin-RevId: 442942242
copybara-service bot pushed a commit that referenced this issue Apr 26, 2022
Fix #3329.

RELNOTES=n/a
PiperOrigin-RevId: 442942242
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.

2 participants