Scripts: do not throw roots change event in case when roots are empty

This commit is contained in:
Natalia Selezneva
2020-06-26 07:07:36 +03:00
parent 16c5ba0988
commit 6ec13ab38a
@@ -165,9 +165,13 @@ class ScriptClassRootsCache(
class FullUpdate(override val cache: ScriptClassRootsCache) : Updates {
override val changed: Boolean get() = true
override val hasNewRoots: Boolean get() = true
override val hasUpdatedScripts: Boolean get() = true
override fun isScriptChanged(scriptPath: String): Boolean = true
override val hasNewRoots: Boolean
get() {
return cache.allDependenciesClassFiles.isNotEmpty() || cache.allDependenciesSources.isNotEmpty()
}
}
class NotChanged(override val cache: ScriptClassRootsCache) : Updates {