Skip to content

Update hilt-2.59.2 to hilt-2.60: compilation error of file that uses @AssistedFactory #5203

Description

@agrahn

Since tonight's hilt update through Renovate, my project does not compile anymore. I am getting a cannot find symbol error in a generated file:

/home/runner/work/Android-Password-Store/Android-Password-Store/app/build/generated/hilt/component_sources/debug/app/passwordstore/DaggerApplication_HiltComponents_SingletonC.java:15: error: cannot find symbol

import app.passwordstore.data.passfile.PasswordEntry_Factory_Impl;
> Task :app:hiltJavaCompileDebug
                                      ^
  symbol:   class PasswordEntry_Factory_Impl
  location: package app.passwordstore.data.passfile
1 error

The original file, where @AssistedFactory annotation is used, is located here: https://github.com/agrahn/Android-Password-Store/blob/develop/format/common/src/main/kotlin/app/passwordstore/data/passfile/PasswordEntry.kt

Here is some probably relevant code from that file:

package app.passwordstore.data.passfile
...
import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject
...
public class PasswordEntry @AssistedInject constructor(                                                                         
   private val clock: UserClock,                                                     
   private val totpFinder: TotpFinder,                 
   @Assisted chars: CharArray,                        
) { 
...
  @AssistedFactory
  public interface Factory {
    public fun create(chars: CharArray): PasswordEntry
  }
...
}

What can I do about this? Please help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions