From efcfd55f1f627ccba42334ef6663247f024f52b2 Mon Sep 17 00:00:00 2001 From: Yuriy Artamonov Date: Mon, 10 Nov 2025 16:45:52 +0100 Subject: [PATCH] [plugins] IJPL-217751 Incompatible plugins reported as installed and update checked on import settings GitOrigin-RevId: 558825c720599440a8980f6a681c2cc724f822d7 --- .../ide/plugins/marketplace/MarketplaceRequests.kt | 6 +++++- .../openapi/updateSettings/impl/UpdateChecker.kt | 14 ++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/plugins/marketplace/MarketplaceRequests.kt b/platform/platform-impl/src/com/intellij/ide/plugins/marketplace/MarketplaceRequests.kt index 01f749731317..895aa24a69ac 100644 --- a/platform/platform-impl/src/com/intellij/ide/plugins/marketplace/MarketplaceRequests.kt +++ b/platform/platform-impl/src/com/intellij/ide/plugins/marketplace/MarketplaceRequests.kt @@ -158,6 +158,9 @@ class MarketplaceRequests(private val coroutineScope: CoroutineScope) : PluginIn throwExceptions: Boolean = false, updateCheck: Boolean = false, ): List { + LOG.info("Looking for the last compatible plugin updates for:\n$allIds\n" + + "Is update check: $updateCheck") + val chunks = mutableListOf>() chunks.add(ArrayList(100)) @@ -190,8 +193,9 @@ class MarketplaceRequests(private val coroutineScope: CoroutineScope) : PluginIn allIds: Set, buildNumber: BuildNumber? = null, throwExceptions: Boolean = false, + updateCheck: Boolean = false, ): List { - return loadLastCompatiblePluginUpdate(allIds, buildNumber, throwExceptions, updateCheck = true) + return loadLastCompatiblePluginUpdate(allIds, buildNumber, throwExceptions, updateCheck) } @RequiresBackgroundThread diff --git a/platform/platform-impl/update-checker/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.kt b/platform/platform-impl/update-checker/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.kt index cce5ed4ec31b..da12bc1e12ad 100644 --- a/platform/platform-impl/update-checker/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.kt +++ b/platform/platform-impl/update-checker/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.kt @@ -19,12 +19,7 @@ import com.intellij.openapi.components.service import com.intellij.openapi.diagnostic.debug import com.intellij.openapi.diagnostic.logger import com.intellij.openapi.extensions.PluginId -import com.intellij.openapi.progress.EmptyProgressIndicator -import com.intellij.openapi.progress.ProgressIndicator -import com.intellij.openapi.progress.ProgressManager -import com.intellij.openapi.progress.Task -import com.intellij.openapi.progress.runBlockingCancellable -import com.intellij.openapi.progress.runBlockingMaybeCancellable +import com.intellij.openapi.progress.* import com.intellij.openapi.project.Project import com.intellij.openapi.ui.Messages import com.intellij.openapi.util.* @@ -369,7 +364,9 @@ object UpdateChecker { for (host in RepositoryHelper.getPluginHosts()) { try { if (host == null && ApplicationInfoEx.getInstanceEx().usesJetBrainsPluginRepository()) { - findUpdatesInJetBrainsRepository(updateable, toUpdate, toUpdateDisabled, buildNumber, state, indicator) + // consider it as updateCheck only if we collected plugins here, and they are not passed from outside + findUpdatesInJetBrainsRepository(updateable, toUpdate, toUpdateDisabled, buildNumber, state, indicator, + updateCheck = updateablePluginsMap == null) } else { RepositoryHelper.loadPluginModels(host, buildNumber, indicator).forEach { model -> @@ -468,10 +465,11 @@ object UpdateChecker { buildNumber: BuildNumber?, state: InstalledPluginsState, indicator: ProgressIndicator?, + updateCheck: Boolean = false, ) { val marketplacePluginIds = MarketplaceRequests.getInstance().getMarketplacePlugins(indicator) val idsToUpdate = updateable.keys.filter { it in marketplacePluginIds }.toSet() - val updates = MarketplaceRequests.checkLastCompatiblePluginUpdate(idsToUpdate, buildNumber) + val updates = MarketplaceRequests.checkLastCompatiblePluginUpdate(idsToUpdate, buildNumber, false, updateCheck) for ((id, descriptor) in updateable) { val lastUpdate = updates.find { it.pluginId == id.idString } if (lastUpdate != null &&