Run invalidating script caches when reindexing is ready (KT-14538)
Explanation why it leads to red code after new project opening 1. No script files are found after project initialization. 2. KotlinScriptDependenciesIndexableSetContributor triggers caching classpath via getAllScriptsClasspath(). Empty classpath is cached. 3. KotlinScriptDependenciesClassFinder.calcClassRoots() always get empty classpath. #KT-14538 In Progress
This commit is contained in:
+5
-3
@@ -57,9 +57,11 @@ class KotlinScriptConfigurationManager(
|
||||
reloadScriptDefinitions()
|
||||
|
||||
StartupManager.getInstance(project).runWhenProjectIsInitialized {
|
||||
cacheAllScriptsExtraImports()
|
||||
invalidateLocalCaches()
|
||||
notifyRootsChanged()
|
||||
DumbService.getInstance(project).smartInvokeLater {
|
||||
cacheAllScriptsExtraImports()
|
||||
invalidateLocalCaches()
|
||||
notifyRootsChanged()
|
||||
}
|
||||
}
|
||||
|
||||
project.messageBus.connect().subscribe(VirtualFileManager.VFS_CHANGES, object : BulkFileListener.Adapter() {
|
||||
|
||||
Reference in New Issue
Block a user