Explicitly request rebuild when untracked java file is removed
Previously a rebuild was happenning because FileNotFoundException was thrown when getting psiFile of removed file.
This commit is contained in:
+6
@@ -224,6 +224,12 @@ class IncrementalJvmCompilerRunner(
|
||||
|
||||
for (javaFile in javaFiles) {
|
||||
if (!caches.platformCache.isTrackedFile(javaFile)) {
|
||||
if (!javaFile.exists()) {
|
||||
// todo: can we do this more optimal?
|
||||
reporter.report { "Could not get changed for untracked removed java file $javaFile" }
|
||||
return false
|
||||
}
|
||||
|
||||
val psiFile = javaFile.psiFile()
|
||||
if (psiFile !is PsiJavaFile) {
|
||||
reporter.report { "[Precise Java tracking] Expected PsiJavaFile, got ${psiFile?.javaClass}" }
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Compiling files:
|
||||
src/TheClass.kt
|
||||
src/other.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
|
||||
================ Step #2 =================
|
||||
|
||||
Compiling files:
|
||||
End of files
|
||||
Exit code: OK
|
||||
|
||||
Reference in New Issue
Block a user