ursus
08/06/2021, 12:01 AMExecution optimizations have been disabled for task ':radost:user:discount:impl:kspDebugKotlin' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: 'C:\Users\ursus\AndroidStudioProjects\mo2-android\radost\user\discount\impl\build\generated\sqldelight\code\AppDatabase\debug'. Reason: Task ':radost:user:discount:impl:kspDebugKotlin' uses this output of task ':radost:user:discount:impl:generateDebugAppDatabaseInterface' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to <https://docs.gradle.org/7.1.1/userguide/validation_problems.html#implicit_dependency> for more details about this problem.
mbonnin
08/06/2021, 10:04 AMursus
08/06/2021, 11:57 AMVampire
08/06/2021, 12:54 PMsample
project of sqlight has a bug.
And the build of ursus has a similar bug.
And Gradle 7 started to see and complain about this bug.
Staying at ursus message, the task :radost:user:discount:impl:kspDebugKotlin
has as output the directory C:\Users\ursus\AndroidStudioProjects\mo2-android\radost\user\discount\impl\build\generated\sqldelight\code\AppDatabase\debug
.
The task :radost:user:discount:impl:kspDebugKotlin
uses this same directory as input, for example because it processes all sources, including the ones generated by the other task.
But there is no dependency between the tasks, neither explicit nor implicit, that guarantees their ordering, so if it works correctly, that is just accidental and can change anytime.mbonnin
08/06/2021, 1:02 PMcompileKotlin
?mbonnin
08/06/2021, 1:06 PMSourceDirectorySet.srcDir()
carry task dependencies?Vampire
08/06/2021, 1:07 PMVampire
08/06/2021, 1:10 PMVampire
08/06/2021, 1:11 PMmbonnin
08/06/2021, 1:32 PMString
to srcDir()
: https://github.com/cashapp/sqldelight/blob/e0c21da0a4238a8580f8c45460bf16755270982[…]ain/kotlin/com/squareup/sqldelight/gradle/SqlDelightDatabase.kt so that'd be a pretty good indication that consumers other than compileKotlin
have no way of knowing about the task dependencymbonnin
08/06/2021, 1:32 PMregisterJavaGeneratingTask
Vampire
08/06/2021, 1:42 PMVampire
08/06/2021, 1:42 PMmbonnin
08/06/2021, 1:42 PMVampire
08/06/2021, 1:46 PMmbonnin
08/06/2021, 1:50 PMursus
08/07/2021, 2:31 AMVampire
08/07/2021, 2:33 AMVampire
08/07/2021, 2:34 AMdependsOn
relation and Martins PR will hopefully fix it in the sqldelight plugin actuallyursus
08/07/2021, 2:35 AMVampire
08/07/2021, 2:36 AMursus
08/07/2021, 2:36 AMVampire
08/07/2021, 2:37 AMursus
08/07/2021, 2:38 AMmbonnin
08/07/2021, 8:05 AMregisterJavaGeneratingTask
. Adding to the "main" SourceDirectorySet works as well and lazily too.mbonnin
08/07/2021, 8:07 AMAndroidSourceSet
which uses reflection at the moment.