From 5985e14d11b873dfb4e65d211d4175732a153dc8 Mon Sep 17 00:00:00 2001 From: Alexander Koshevoy Date: Mon, 13 Oct 2025 23:38:11 +0100 Subject: [PATCH] [wsm] IJPL-178632 Remove redundant SDK entity filtering in GlobalSdkBridgesLoader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop `shouldSkipEntityProcessing` and the related filtering, so SDK bridges are always created for all SDK entities. The previous revision conditionally omitted bridge creation for some SDKs, leading to mismatches between Workspace Model state and legacy SDK bridges (e.g., inconsistent SDK availability and updates). To avoid re‑introducing the need for ad‑hoc filtering, distinguish SDK entities earlier during deserialization and separate them by source/environment there. This keeps SDK initialization simple and makes bridge creation deterministic across cache loads and environments. GitOrigin-RevId: 7ed58a394c59310a35e72110ea3eb20c753275b8 --- .../impl/legacyBridge/sdk/GlobalSdkBridgesLoader.kt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/workspaceModel/ide/impl/legacyBridge/sdk/GlobalSdkBridgesLoader.kt b/platform/lang-impl/src/com/intellij/workspaceModel/ide/impl/legacyBridge/sdk/GlobalSdkBridgesLoader.kt index da18256eb629..db0e4fe8ac33 100644 --- a/platform/lang-impl/src/com/intellij/workspaceModel/ide/impl/legacyBridge/sdk/GlobalSdkBridgesLoader.kt +++ b/platform/lang-impl/src/com/intellij/workspaceModel/ide/impl/legacyBridge/sdk/GlobalSdkBridgesLoader.kt @@ -54,14 +54,7 @@ private class GlobalSdkBridgesLoader(private val eelMachine: EelMachine) : Globa thisLogger().debug("Initial load of SDKs") for ((entity, sdkBridge) in sdks) { - if (shouldSkipEntityProcessing(entity)) { - // The SDKs are populated from a single file for now. All loaded SDK entities go to the same entity storage - // We want to avoid having alien SDKs in storages, hence we filter them - mutableStorage.removeEntity(entity) - } - else { - mutableStorage.mutableSdkMap.addIfAbsent(entity, sdkBridge) - } + mutableStorage.mutableSdkMap.addIfAbsent(entity, sdkBridge) } return {} } @@ -72,10 +65,6 @@ private class GlobalSdkBridgesLoader(private val eelMachine: EelMachine) : Globa val addChanges = sdkChanges.filterIsInstance>() for (addChange in addChanges) { - if (shouldSkipEntityProcessing(addChange.newEntity)) { - continue - } - // Will initialize the bridge if missing builder.mutableSdkMap.getOrPutDataByEntity(addChange.newEntity) { val sdkEntityCopy = SdkBridgeImpl.createEmptySdkEntity("", "", "")