Scripts: do not throw roots change event in case when roots are empty
This commit is contained in:
+5
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user