in src/main/kotlin/org/jetbrains/tinygoplugin/configuration/CachedGoRootUpdater.kt [31:55]
override fun changed(module: Module, batchUpdate: Boolean) {
logger.debug("cached GOROOT update signal caught")
val project = module.project
val settings = project.tinyGoConfiguration()
if (!settings.enabled) return
val tinyGoSettings: TinyGoConfiguration = ConfigurationWithHistory(project)
TinyGoServiceScope.getScope(project).launch {
project.service<TinyGoInfoExtractor>()
.extractTinyGoInfo(tinyGoSettings, CachedGoRootInvalidator(project)) { _, output ->
TinyGoServiceScope.getScope(project).launch {
tinyGoSettings.extractTinyGoInfo(output)
edtWriteAction {
tinyGoSettings.saveState(project)
propagateGoFlags(project, tinyGoSettings)
updateExtLibrariesAndCleanCache(project)
}
}
}
}
logger.debug("cached GOROOT update signal processed")
}