Resolving error.NonExistentClass in dagger
Recently ran into a problem where providing the generated type of sqldelight database directly into the dagger graph from module classes would fail with error.NonExistentClass error. Failure seemed to be happening randomly if one would invoke the clean task before assemble.
This seems to be a limitation of the kapt since all non-existent types in the declaration are replaced by NonExistentClass, which is an issue for our dagger dependency. For a workaround it’s recommended to set error type inference in stubs using: