Database interface occasionally not resolved
See original GitHub issueOur project has one module (named sqldelight
) that depends on SqlDelight directly, and all SqlDelight code (sq files, Kotlin classes referenced in sql files, etc…) as well as some helpers that wrap the generated Database
for certain things is in that module. There is another module (models
) that has an api dependency on our sqldelight
module, and any other module that needs access to Database
depends on models
.
For the past few months on our CI machines, the :sqldelight:compileReleaseKotlin
occasionally fails with every file in that module that references Database
saying that it is an unresolved reference. Running it again usually works. We originally though it was a build cache issue, but we’ve disabled that and it still happens.
Lately it has also been happening in Android Studio. Database
is highlighted in red with the error Unresolved reference: Database
but compilation works, and the generated interface is in the build directory. The only way to fix it is to restart and invalidate caches.
I’ve noticed that it tends to happen more often when switching between our dev branch and a long lived feature branch that we have (around 50k lines difference between them and many modules renamed, created, and removed).
What’s the best way to further debug this?
Build Environment SQLDelight version: 1.4.4 OS: Ubuntu 20.04 Gradle version: 6.7.1 Kotlin version: 1.4.20 AGP Version (if applicable): 4.1.1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:23 (11 by maintainers)
Top GitHub Comments
this should be fixed on master now that we dont reuse an outputdirectory for different variants
@RamenSea If you’re referring to this block:
then
Database
can be whatever name you want. Maybe you just need to renamedatabase
toDatabase
here? If not, please create a separate issue with the details.